/* =========================================================================
   Click Copapel — layout novo
   Carregado depois do styles.css (que continua atendendo as páginas antigas).
   Tudo do layout novo usa o prefixo .cp-
   ========================================================================= */

:root {
    --cp-brand: #0d5e52;
    --cp-brand-700: #0a4a41;
    --cp-brand-50: #e8f2ef;
    --cp-green: #62ad46;
    --cp-green-600: #519838;
    --cp-green-50: #edf6e8;
    --cp-green-100: #d9edcf;
    --cp-text: #1d2a2e;
    --cp-text-2: #4a5558;
    --cp-muted: #7b8588;
    --cp-bg: #f5f5f3;
    --cp-surface: #fff;
    --cp-surface-2: #f1f2f0;
    --cp-border: #e6e8e5;
    --cp-border-2: #d6dad6;
    --cp-yellow: #ffd84d;
    --cp-red: #d23c3c;
    --cp-red-50: #fdeeee;
    --cp-amber-50: #fff7e0;
    --cp-amber: #a36b00;
    --cp-radius: 12px;
    --cp-radius-sm: 8px;
    --cp-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 6px rgba(16, 24, 40, .05);
    --cp-shadow-lg: 0 16px 40px rgba(16, 24, 40, .14);
    --cp-font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --cp-container: 1320px;
}

/* ---------- Base (sobrescreve o styles.css antigo) ---------- */
html, body { height: auto; }
body.cp-body {
    background: var(--cp-bg);
    color: var(--cp-text);
    font-family: var(--cp-font);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
.cp-body input, .cp-body button, .cp-body select, .cp-body textarea { font-family: var(--cp-font); font-size: 14px; }
.cp-body a { color: inherit; }
.cp-body a:hover { text-decoration: none; }
.cp-body h1, .cp-body h2, .cp-body h3 { color: var(--cp-text); opacity: 1; margin: 0; letter-spacing: -.01em; }
.cp-body [hidden] { display: none !important; }
.cp-ico { flex: none; display: inline-block; vertical-align: middle; }
.cp-app { min-height: 100vh; display: flex; flex-direction: column; }
.cp-main { flex: 1 0 auto; padding: 18px 0 64px; }
.cp-container { width: 100%; max-width: var(--cp-container); margin: 0 auto; padding: 0 24px; }
.cp-body :focus-visible { outline: 2px solid var(--cp-brand) !important; outline-offset: 2px; }
.cp-body input:focus-visible, .cp-body select:focus-visible, .cp-body textarea:focus-visible { outline: none !important; }

/* ---------- Topbar ---------- */
.cp-topbar { background: #ecedea; color: var(--cp-text); font-size: 13px; }
.cp-topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 42px; }
.cp-topbar-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--cp-text) !important; }
.cp-topbar-link .cp-ico { color: var(--cp-green-600); }
.cp-topbar-link:hover { color: var(--cp-brand) !important; }
.cp-topbar-msg { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; }
.cp-topbar-msg .cp-ico { color: var(--cp-green-600); }
.cp-topbar-msg a { color: var(--cp-green-600) !important; font-weight: 600; }
.cp-topbar-msg a:hover { text-decoration: underline; }
.cp-topbar-right { display: flex; align-items: center; gap: 20px; }
.cp-topbar-cliente { display: inline-flex; align-items: center; gap: 6px; max-width: 280px; }
.cp-topbar-cliente span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-idiomas { display: inline-flex; align-items: center; gap: 8px; color: var(--cp-text-2); }
.cp-idiomas a { font-weight: 600; font-size: 12px; color: var(--cp-text-2) !important; }
.cp-idiomas a:hover { color: var(--cp-brand) !important; }

/* ---------- Header ---------- */
.cp-body header.cp-header { padding: 0; background: var(--cp-surface); border-bottom: 1px solid var(--cp-border); position: relative; z-index: 40; }
.cp-header-inner { display: flex; align-items: center; gap: 28px; min-height: 78px; }
.cp-logo { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.cp-logo-copapel { height: 38px; width: auto; }
.cp-logo-click { height: 26px; width: auto; padding-left: 12px; border-left: 1px solid var(--cp-border-2); }
.cp-search { flex: 1 1 auto; max-width: 520px; position: relative; display: flex; align-items: center; margin: 0; }
.cp-search .cp-ico { position: absolute; left: 16px; color: var(--cp-muted); pointer-events: none; }
.cp-search input {
    width: 100%; height: 48px; border: 1px solid transparent; border-radius: 10px; background: var(--cp-surface-2);
    padding: 0 16px 0 48px; color: var(--cp-text); transition: border-color .15s, background .15s, box-shadow .15s;
}
.cp-search input::placeholder { color: var(--cp-muted); }
.cp-search input:focus { background: #fff; border-color: var(--cp-brand); box-shadow: 0 0 0 3px rgba(13, 94, 82, .12); outline: none; }
.cp-header-actions { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.cp-action {
    display: inline-flex; align-items: center; gap: 8px; position: relative; background: none; border: 0; padding: 6px 0;
    font-weight: 500; color: var(--cp-text) !important; cursor: pointer; white-space: nowrap;
}
.cp-action:hover { color: var(--cp-brand) !important; }
.cp-action .cp-ico { color: var(--cp-brand); }
.cp-action-icon { padding: 6px; }
.cp-badge {
    position: absolute; top: -4px; right: -8px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
    background: var(--cp-green); color: #fff; font-size: 11px; font-weight: 700; line-height: 19px; text-align: center;
    border: 2px solid #fff; box-sizing: content-box;
}
.cp-badge.is-zero { display: none; }
.cp-badge-alerta { background: var(--cp-red); }
.cp-badge-inline { position: static; border: 0; margin-left: auto; }

/* Menu do usuário */
.cp-user { position: relative; }
.cp-user-seta { transition: transform .15s; color: var(--cp-text-2) !important; }
.cp-user.is-open .cp-user-seta { transform: rotate(180deg); }
.cp-user-menu {
    position: absolute; right: 0; top: calc(100% + 10px); width: 280px; background: #fff; border: 1px solid var(--cp-border);
    border-radius: var(--cp-radius); box-shadow: var(--cp-shadow-lg); padding: 8px; display: none; z-index: 60;
}
.cp-user.is-open .cp-user-menu { display: block; }
.cp-user-menu-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--cp-border); }
.cp-user-menu-head strong { display: block; font-size: 14px; line-height: 1.3; }
.cp-user-menu-head small { display: block; color: var(--cp-muted); font-size: 12px; line-height: 1.3; }
.cp-user-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font-weight: 500; color: var(--cp-text) !important; }
.cp-user-menu a .cp-ico { color: var(--cp-text-2); }
.cp-user-menu a:hover { background: var(--cp-surface-2); }
.cp-user-menu .cp-user-sair { color: var(--cp-red) !important; border-top: 1px solid var(--cp-border); border-radius: 0 0 8px 8px; margin-top: 6px; padding-top: 12px; }
.cp-user-menu .cp-user-sair .cp-ico { color: var(--cp-red); }

.cp-avatar {
    display: inline-flex; align-items: center; justify-content: center; flex: none; width: 38px; height: 38px; border-radius: 50%;
    background: var(--cp-brand); color: #fff; font-weight: 600; font-size: 13px; letter-spacing: .02em;
}
.cp-avatar-lg { width: 46px; height: 46px; font-size: 15px; }
.cp-avatar-icone { background: var(--cp-brand-50); color: var(--cp-brand); }

/* Categorias (barra) */
.cp-catnav { background: var(--cp-surface); box-shadow: 0 6px 16px -10px rgba(16, 24, 40, .18); position: relative; z-index: 30; }
.cp-catnav .cp-container { position: relative; }
.cp-catnav .cp-container::after { content: ''; position: absolute; top: 0; right: 24px; bottom: 0; width: 48px; background: linear-gradient(90deg, rgba(255,255,255,0), #fff); pointer-events: none; }
.cp-catnav ul { display: flex; align-items: center; list-style: none; margin: 0; padding: 0 40px 0 0; overflow-x: auto; scrollbar-width: none; }
.cp-catnav ul::-webkit-scrollbar { display: none; }
.cp-catnav li { flex: none; display: flex; align-items: center; }
.cp-catnav li + li::before { content: ''; width: 1px; height: 16px; background: var(--cp-border-2); }
.cp-catnav a { display: block; padding: 14px 14px; font-size: 13px; font-weight: 500; color: var(--cp-text) !important; white-space: nowrap; position: relative; }
.cp-catnav li:first-child a { padding-left: 0; }
.cp-catnav a:hover { color: var(--cp-brand) !important; }
.cp-catnav a.is-active { color: var(--cp-brand) !important; font-weight: 600; }
.cp-catnav a.is-active::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--cp-green); }
.cp-catnav li:first-child a.is-active::after { left: 0; }

/* ---------- Comuns ---------- */
.cp-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--cp-muted); margin: 6px 0 18px; }
.cp-breadcrumb a { color: var(--cp-muted) !important; }
.cp-breadcrumb a:hover { color: var(--cp-brand) !important; }
.cp-breadcrumb span[aria-current] { color: var(--cp-text); font-weight: 500; max-width: 420px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-breadcrumb .cp-ico { color: var(--cp-border-2); }

.cp-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.cp-body .cp-page-title { font-size: 26px; font-weight: 600; line-height: 1.25; margin: 0 0 6px; color: var(--cp-text); }
.cp-page-sub { margin: 0; color: var(--cp-text-2); font-size: 13.5px; }

.cp-card { background: var(--cp-surface); border: 1px solid var(--cp-border); border-radius: var(--cp-radius); box-shadow: var(--cp-shadow); }
.cp-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.cp-body .cp-card-head h2 { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; }
.cp-card-head h2 .cp-ico { color: var(--cp-brand); }

.cp-tag { display: inline-block; align-self: flex-start; background: var(--cp-surface-2); color: var(--cp-text-2); border-radius: 6px; padding: 3px 8px; font-size: 12px; font-weight: 500; line-height: 1.4; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-tag-lg { font-size: 13px; padding: 4px 10px; }
.cp-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--cp-surface-2); color: var(--cp-text-2); font-size: 12px; font-weight: 600; }
.cp-chip-alerta { background: var(--cp-red-50); color: var(--cp-red); }
.cp-status { display: inline-block; border-radius: 6px; padding: 1px 7px; font-size: 11.5px; font-weight: 600; }
.cp-status-ok { background: var(--cp-green-50); color: var(--cp-green-600); }

.cp-link { color: var(--cp-brand) !important; font-weight: 600; font-size: 13px; }
.cp-link:hover { text-decoration: underline !important; }
.cp-link-seta { display: inline-flex; align-items: center; gap: 4px; color: var(--cp-text) !important; font-weight: 500; font-size: 13px; }
.cp-link-seta:hover { color: var(--cp-brand) !important; }
.cp-link-limpar { font-size: 12.5px; font-weight: 600; color: var(--cp-brand) !important; }
.cp-link-acao { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; color: var(--cp-brand) !important; }
.cp-link-acao:hover { text-decoration: underline !important; }

/* Botões */
.cp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: var(--cp-radius-sm);
    border: 1.5px solid transparent; font-weight: 600; font-size: 14px; line-height: 1; cursor: pointer; white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s; text-decoration: none !important;
}
.cp-btn:active { transform: translateY(1px); }
.cp-btn[disabled], .cp-btn.is-disabled { opacity: .5; pointer-events: none; }
.cp-btn-primary { background: var(--cp-green); color: #fff !important; }
.cp-btn-primary:hover { background: var(--cp-green-600); color: #fff !important; }
.cp-btn-brand { background: var(--cp-brand); color: #fff !important; }
.cp-btn-brand:hover { background: var(--cp-brand-700); color: #fff !important; }
.cp-btn-outline { background: #fff; border-color: var(--cp-brand); color: var(--cp-brand) !important; }
.cp-btn-outline:hover { background: var(--cp-brand-50); }
.cp-btn-whats { background: #fff; border-color: var(--cp-green); color: var(--cp-text) !important; }
.cp-btn-whats .cp-ico { color: var(--cp-green-600); }
.cp-btn-whats:hover { background: var(--cp-green-50); }
.cp-btn-lg { height: 52px; padding: 0 24px; font-size: 15px; }
.cp-btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.cp-btn-block { display: flex; width: 100%; }

.cp-icone-btn {
    display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none; border-radius: 8px;
    border: 1px solid var(--cp-border); background: #fff; color: var(--cp-text-2) !important; transition: all .15s;
}
.cp-icone-btn:hover { border-color: var(--cp-brand); color: var(--cp-brand) !important; background: var(--cp-brand-50); }
.cp-icone-btn-perigo { color: var(--cp-red) !important; border-color: #f2c9c9; }
.cp-icone-btn-perigo:hover { background: var(--cp-red-50); border-color: var(--cp-red); color: var(--cp-red) !important; }

/* Campos */
.cp-input, .cp-select {
    width: 100%; height: 46px; border: 1px solid var(--cp-border-2); border-radius: var(--cp-radius-sm); background: #fff;
    padding: 0 14px; color: var(--cp-text); transition: border-color .15s, box-shadow .15s; box-shadow: none;
}
textarea.cp-input { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.cp-input::placeholder { color: #9aa2a4; }
.cp-input:focus, .cp-select:focus { border-color: var(--cp-brand) !important; box-shadow: 0 0 0 3px rgba(13, 94, 82, .12) !important; outline: none; }
.cp-input:disabled { background: var(--cp-surface-2); color: var(--cp-text-2); }
.cp-select, select.cp-input {
    -webkit-appearance: none; appearance: none; padding-right: 38px; cursor: pointer;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231d2a2e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
}
.cp-input-arquivo { padding: 9px 12px; height: 46px; font-size: 13px; }
.cp-input-arquivo::file-selector-button { border: 0; background: var(--cp-surface-2); border-radius: 6px; padding: 5px 10px; margin-right: 10px; font-weight: 600; color: var(--cp-text); cursor: pointer; }
.cp-campo { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.cp-campo > span, .cp-campo > label, .cp-campo-rotulo, .cp-campo-linha label { font-size: 13px; font-weight: 600; color: var(--cp-text); margin: 0; }
.cp-campo small { font-weight: 400; color: var(--cp-muted); }
.cp-campo-linha { display: flex; align-items: center; justify-content: space-between; }
.cp-form-grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.cp-campo-inteiro { grid-column: 1 / -1; }
.cp-form-acoes { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--cp-border); }

.cp-senha { position: relative; }
.cp-senha .cp-input { padding-right: 48px; }
.cp-senha-ver { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: none; color: var(--cp-text-2); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.cp-senha-ver:hover { color: var(--cp-brand); background: var(--cp-surface-2); }
.cp-senha-ver .cp-ico-ocultar { display: none; }
.cp-senha-ver[aria-pressed="true"] .cp-ico-ver { display: none; }
.cp-senha-ver[aria-pressed="true"] .cp-ico-ocultar { display: inline-block; }

.cp-checklist { max-height: 240px; overflow-y: auto; border: 1px solid var(--cp-border-2); border-radius: var(--cp-radius-sm); padding: 6px; background: #fff; }
.cp-check { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; cursor: pointer; margin: 0; font-weight: 500; font-size: 13px; }
.cp-check:hover { background: var(--cp-surface-2); }
.cp-check input { width: 17px; height: 17px; accent-color: var(--cp-green); flex: none; margin: 0; }
.cp-check-todas { font-weight: 700; border-bottom: 1px solid var(--cp-border); border-radius: 6px 6px 0 0; margin-bottom: 4px; }
.cp-check-texto { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cp-check-texto small { font-size: 12px; font-weight: 400; color: var(--cp-muted); font-variant-numeric: tabular-nums; }
.cp-filiais-busca { position: relative; }
.cp-filiais-busca .cp-ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--cp-muted); pointer-events: none; }
.cp-filiais-busca .cp-input { height: 42px; padding-left: 40px; }
.cp-campo .cp-filiais-info { font-size: 12px; font-weight: 400; color: var(--cp-muted); }
.cp-filiais-vazio { display: block; padding: 10px; font-size: 13px; color: var(--cp-muted); }

.cp-switches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.cp-switch { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--cp-border); border-radius: var(--cp-radius-sm); cursor: pointer; margin: 0; }
.cp-switch input { position: absolute; opacity: 0; pointer-events: none; }
.cp-switch-trilho { flex: none; width: 38px; height: 22px; border-radius: 11px; background: var(--cp-border-2); position: relative; transition: background .15s; margin-top: 1px; }
.cp-switch-trilho::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.cp-switch input:checked + .cp-switch-trilho { background: var(--cp-green); }
.cp-switch input:checked + .cp-switch-trilho::after { transform: translateX(16px); }
.cp-switch input:focus-visible + .cp-switch-trilho { outline: 2px solid var(--cp-brand); outline-offset: 2px; }
.cp-switch strong { display: block; font-size: 13.5px; }
.cp-switch small { display: block; font-size: 12px; color: var(--cp-muted); line-height: 1.4; }

/* Alertas */
.cp-alerta { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--cp-radius-sm); font-size: 13.5px; line-height: 1.45; margin-bottom: 16px; border: 1px solid transparent; }
.cp-alerta .cp-ico { margin-top: 1px; }
.cp-alerta-erro { background: var(--cp-red-50); color: #8f1f1f; border-color: #f6d0d0; }
.cp-alerta-aviso { background: var(--cp-amber-50); color: #6b4700; border-color: #f4e2a8; }
.cp-alerta-ok { background: var(--cp-green-50); color: #2f6b1d; border-color: var(--cp-green-100); }

/* Estado vazio */
.cp-vazio { text-align: center; padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cp-vazio-icone { width: 68px; height: 68px; border-radius: 50%; background: var(--cp-surface-2); color: var(--cp-brand); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.cp-body .cp-vazio h2, .cp-body .cp-vazio-titulo { font-size: 19px; font-weight: 600; }
.cp-vazio p { color: var(--cp-text-2); margin: 0 0 12px; max-width: 420px; }
.cp-vazio-acoes { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ---------- Listagem ---------- */
.cp-listagem { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
.cp-filtros { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; }
.cp-filtros-toggle { display: none; }
.cp-filtro-card { padding: 20px 16px; }
.cp-filtro-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.cp-body .cp-filtro-head h2 { font-size: 18px; font-weight: 600; }
.cp-filtro-desc { margin: 4px 4px 14px; font-size: 12px; color: var(--cp-text-2); line-height: 1.4; }
.cp-filtro-busca { position: relative; display: flex; align-items: center; margin: 0 0 14px; }
.cp-filtro-busca .cp-ico { position: absolute; left: 12px; color: var(--cp-muted); pointer-events: none; }
.cp-filtro-busca input { width: 100%; height: 38px; border: 1px solid transparent; border-radius: 8px; background: var(--cp-surface-2); padding: 0 12px 0 36px; font-size: 12.5px !important; }
.cp-filtro-busca input:focus { outline: none; border-color: var(--cp-brand); background: #fff; }
.cp-cat-grade { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 4px; }
.cp-cat-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0; border-radius: 10px; text-align: center; color: var(--cp-text-2) !important; font-size: 11.5px; font-weight: 500; line-height: 1.25; transition: background .15s; }
.cp-cat-tile:hover { background: var(--cp-surface-2); color: var(--cp-text) !important; }
.cp-cat-icone { width: 56px; height: 56px; border-radius: 50%; background: var(--cp-surface-2); color: var(--cp-text-2); display: inline-flex; align-items: center; justify-content: center; transition: all .15s; }
.cp-cat-tile:hover .cp-cat-icone { background: #e6e8e4; color: var(--cp-brand); }
.cp-cat-tile.is-active { color: var(--cp-brand) !important; font-weight: 600; }
.cp-cat-tile.is-active .cp-cat-icone { background: var(--cp-green-50); color: var(--cp-green-600); box-shadow: inset 0 0 0 2px var(--cp-green); }
.cp-cat-nome { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 11px; letter-spacing: -.01em; -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; }
.cp-filtro-vazio { font-size: 12.5px; color: var(--cp-muted); text-align: center; margin: 8px 0 0; }
.cp-subcats { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--cp-border); display: flex; flex-direction: column; gap: 2px; }
.cp-body .cp-subcats h3 { font-size: 13px; font-weight: 600; padding: 0 8px 6px; color: var(--cp-text-2); text-transform: uppercase; letter-spacing: .03em; }
.cp-subcat { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--cp-text) !important; }
.cp-subcat:hover { background: var(--cp-surface-2); }
.cp-subcat.is-active { background: var(--cp-green-50); color: var(--cp-brand) !important; font-weight: 600; }
.cp-subcat-total { font-size: 11.5px; color: var(--cp-muted); font-weight: 600; }

.cp-ajuda-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: var(--cp-text) !important; transition: border-color .15s; }
.cp-ajuda-card:hover { border-color: var(--cp-green); }
.cp-ajuda-card strong { display: block; font-size: 14px; }
.cp-ajuda-card small { display: block; color: var(--cp-text-2); font-size: 12px; line-height: 1.35; }
.cp-ajuda-card > .cp-ico:last-child { margin-left: auto; color: var(--cp-muted); }
.cp-ajuda-icone { width: 42px; height: 42px; border-radius: 50%; flex: none; background: var(--cp-green); color: #fff; display: inline-flex; align-items: center; justify-content: center; }

.cp-resultados-barra { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.cp-resultados-total { margin: 0; color: var(--cp-text-2); }
.cp-resultados-total strong { color: var(--cp-text); }
.cp-resultados-opcoes { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.cp-resultados-opcoes label { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--cp-text-2); }
.cp-resultados-opcoes .cp-select { height: 40px; width: auto; min-width: 84px; font-weight: 500; font-size: 13px; }
.cp-resultados-opcoes label:first-child .cp-select { min-width: 160px; }

.cp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

/* Card de produto */
.cp-produto { background: var(--cp-surface); border: 1px solid var(--cp-border); border-radius: var(--cp-radius); padding: 14px; display: flex; flex-direction: column; gap: 12px; transition: box-shadow .2s, border-color .2s; min-width: 0; }
.cp-produto:hover { box-shadow: 0 10px 28px -12px rgba(16, 24, 40, .25); border-color: #dfe3df; }
.cp-produto-foto { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; max-height: 210px; border-radius: 8px; overflow: hidden; background: #fff; }
.cp-produto-foto img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .25s; }
.cp-produto:hover .cp-produto-foto img { transform: scale(1.04); }
.cp-produto-corpo { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.cp-produto-cod { font-size: 12px; color: var(--cp-muted); }
.cp-produto-nome {
    font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--cp-text) !important; min-height: 2.7em;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cp-produto-nome:hover { color: var(--cp-brand) !important; }
.cp-produto-preco { font-size: 21px; font-weight: 600; color: var(--cp-text); margin-top: auto; padding-top: 8px; letter-spacing: -.01em; }
.cp-produto-compra { display: flex; gap: 8px; margin: 0; }
.cp-produto-compra .cp-btn { flex: 1; height: 42px; padding: 0 10px; min-width: 0; }
.cp-produto-compra .cp-btn span { overflow: hidden; text-overflow: ellipsis; }

.cp-qty { position: relative; flex: none; width: 66px; }
.cp-qty input {
    width: 100%; height: 42px; border: 1px solid var(--cp-border-2); border-radius: var(--cp-radius-sm); padding: 0 24px 0 12px;
    font-weight: 600; color: var(--cp-text); -moz-appearance: textfield; background: #fff;
}
.cp-qty input::-webkit-outer-spin-button, .cp-qty input::-webkit-inner-spin-button,
.cp-stepper input::-webkit-outer-spin-button, .cp-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cp-qty input:focus { outline: none; border-color: var(--cp-brand); box-shadow: 0 0 0 3px rgba(13, 94, 82, .12); }
.cp-qty-setas { position: absolute; right: 4px; top: 4px; bottom: 4px; display: flex; flex-direction: column; }
.cp-qty-setas button { flex: 1; width: 20px; border: 0; background: none; color: var(--cp-text-2); padding: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 4px; }
.cp-qty-setas button:hover { background: var(--cp-surface-2); color: var(--cp-brand); }

.cp-stepper { display: inline-flex; align-items: center; height: 40px; border: 1px solid var(--cp-border-2); border-radius: var(--cp-radius-sm); background: #fff; overflow: hidden; }
.cp-stepper button { width: 36px; height: 100%; border: 0; background: none; color: var(--cp-text-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.cp-stepper button:hover { background: var(--cp-surface-2); color: var(--cp-brand); }
.cp-stepper button:disabled { opacity: .4; cursor: not-allowed; }
.cp-stepper input { width: 46px; height: 100%; border: 0; text-align: center; font-weight: 600; color: var(--cp-text); -moz-appearance: textfield; padding: 0; background: transparent; }
.cp-stepper input:focus { outline: none; background: var(--cp-brand-50); }
.cp-stepper:focus-within { border-color: var(--cp-brand); }
.cp-stepper-lg { height: 52px; }
.cp-stepper-lg button { width: 44px; }
.cp-stepper-lg input { width: 56px; font-size: 16px; }

/* Paginação */
.cp-paginacao-barra { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 24px; }
.cp-paginacao-barra p { margin: 0; color: var(--cp-text-2); font-size: 13px; }
.cp-paginacao { display: flex; align-items: center; gap: 8px; }
.cp-paginacao button, .cp-paginacao span {
    min-width: 38px; height: 38px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--cp-border-2); background: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; color: var(--cp-text); cursor: pointer;
}
.cp-paginacao span { border: 0; background: none; cursor: default; color: var(--cp-muted); min-width: 20px; }
.cp-paginacao button:hover { border-color: var(--cp-brand); color: var(--cp-brand); }
.cp-paginacao button[aria-current="page"] { background: var(--cp-brand); border-color: var(--cp-brand); color: #fff; }
.cp-paginacao button:disabled { background: var(--cp-surface-2); color: var(--cp-border-2); border-color: var(--cp-border); cursor: not-allowed; }

/* ---------- Página do produto ---------- */
.cp-pdp { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: start; margin-bottom: 28px; }
.cp-pdp-foto { background: #fff; border: 1px solid var(--cp-border); border-radius: var(--cp-radius); aspect-ratio: 1 / 1; max-height: 560px; display: flex; align-items: center; justify-content: center; padding: 32px; }
.cp-pdp-foto img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cp-pdp-info { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.cp-pdp-codigo { margin: 6px 0 0; font-size: 13px; color: var(--cp-text-2); font-weight: 500; }
.cp-body .cp-pdp-nome { font-size: 28px; font-weight: 600; line-height: 1.25; }
.cp-pdp-linha { margin: 0; color: var(--cp-text-2); font-size: 14px; }
.cp-pdp-compra { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; padding: 22px; background: var(--cp-surface); border: 1px solid var(--cp-border); border-radius: var(--cp-radius); }
.cp-pdp-preco small { display: block; font-size: 12px; color: var(--cp-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.cp-pdp-preco strong { display: block; font-size: 32px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.cp-pdp-preco span { display: inline-block; margin-top: 4px; font-size: 12.5px; color: var(--cp-green-600); font-weight: 600; }
.cp-pdp-acoes { display: flex; gap: 12px; margin: 0; }
.cp-pdp-acoes .cp-btn { flex: 1; }
.cp-pdp-subtitulo { margin: 0; color: var(--cp-text-2); font-size: 14.5px; line-height: 1.55; }
.cp-pdp-destaques { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 6px 0 0; padding: 0; }
.cp-pdp-destaques li { display: flex; flex-direction: column; padding: 8px 12px; border: 1px solid var(--cp-border); border-radius: 10px; background: #fff; min-width: 110px; }
.cp-pdp-destaques span { font-size: 11px; color: var(--cp-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.cp-pdp-destaques strong { font-size: 14px; font-weight: 600; }

/* Abas da página do produto */
.cp-pdp-abas { margin-bottom: 36px; }
.cp-pdp-abas-lista { display: flex; gap: 6px; border-bottom: 1px solid var(--cp-border-2); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.cp-pdp-abas-lista::-webkit-scrollbar { display: none; }
.cp-pdp-abas-lista button {
    flex: none; border: 0; background: none; padding: 12px 6px 11px; margin-right: 18px; font-weight: 600; font-size: 14.5px; color: var(--cp-text-2);
    border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap;
}
.cp-pdp-abas-lista button:hover { color: var(--cp-brand); }
.cp-pdp-abas-lista button[aria-selected="true"] { color: var(--cp-text); border-bottom-color: var(--cp-green); }
.cp-pdp-painel { padding: 26px 28px; }
.cp-pdp-painel[hidden] { display: none; }
.cp-body .cp-pdp-painel h2 { font-size: 18px; font-weight: 600; margin-bottom: 12px; }
.cp-pdp-painel p { margin: 0 0 10px; color: var(--cp-text-2); line-height: 1.6; }
.cp-pdp-visao { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.cp-pdp-visao.is-simples { grid-template-columns: minmax(0, 820px); }
.cp-pdp-obs { font-size: 13.5px; }
.cp-pdp-obs strong { color: var(--cp-text); }
.cp-pdp-lista-check { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cp-pdp-lista-check li { display: flex; gap: 10px; color: var(--cp-text-2); line-height: 1.5; }
.cp-pdp-lista-check li .cp-ico { color: var(--cp-green-600); margin-top: 3px; flex: none; }
.cp-pdp-lista-colunas { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.cp-pdp-ficha dd p { margin: 0; color: var(--cp-text); font-weight: 600; line-height: 1.45; }
.cp-pdp-ficha dd .cp-pdp-lista-check li { color: var(--cp-text); font-weight: 500; }
.cp-pdp-pares { margin: 0; display: grid; gap: 4px; }
.cp-pdp-pares div { display: flex; justify-content: space-between; gap: 12px; }
.cp-pdp-pares dt { font-weight: 500; color: var(--cp-text-2); font-size: 13px; }
.cp-pdp-pares dd { margin: 0; font-weight: 700; color: var(--cp-text); }
.cp-pdp-blocos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 32px; }
.cp-body .cp-pdp-bloco h2 { font-size: 15px; margin-bottom: 8px; }
.cp-pdp-numeros { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 22px; }
.cp-pdp-numero { border: 1px solid var(--cp-border); background: var(--cp-surface-2); border-radius: 12px; padding: 14px 16px; }
.cp-pdp-numero > span { display: block; font-size: 11.5px; font-weight: 700; color: var(--cp-muted); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 6px; }
.cp-pdp-numero p { margin: 0; font-size: 18px; font-weight: 700; color: var(--cp-text); }
.cp-pdp-texto { max-width: 860px; }
.cp-pdp-passos { list-style: none; counter-reset: passo; margin: 0; padding: 0; display: grid; gap: 12px; }
.cp-pdp-passos li { counter-increment: passo; position: relative; padding-left: 40px; color: var(--cp-text-2); line-height: 1.6; }
.cp-pdp-passos li::before { content: counter(passo); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--cp-green-50); color: var(--cp-green-600); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.cp-pdp-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.cp-pdp-chips li { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 18px; background: var(--cp-green-50); color: var(--cp-brand); font-weight: 600; font-size: 13px; }
.cp-pdp-aviso { display: flex; align-items: center; gap: 8px; margin: 14px 0 0 !important; font-size: 13px; }
.cp-pdp-ficha { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; }
.cp-pdp-ficha div { padding: 12px 16px 12px 0; border-top: 1px solid var(--cp-border); }
.cp-pdp-ficha dt { font-size: 12px; color: var(--cp-muted); font-weight: 500; }
.cp-pdp-ficha dd { margin: 2px 0 0; font-weight: 600; }

.cp-secao { margin-top: 12px; }
.cp-secao-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.cp-body .cp-secao-head h2 { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 600; }
.cp-secao-head h2 .cp-ico { color: var(--cp-green-600); }
.cp-carrossel { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 4); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.cp-carrossel > * { scroll-snap-align: start; }

/* ---------- Carrinho / checkout ---------- */
.cp-checkout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.cp-checkout-etapas { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.cp-carrinho-lista { padding: 6px 0 0; }
.cp-carrinho-cabecalho { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 1px solid var(--cp-border); }
.cp-body .cp-carrinho-cabecalho h2 { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; }
.cp-carrinho-cabecalho h2 .cp-ico { color: var(--cp-brand); }
.cp-carrinho-colunas { display: none; }
.cp-item {
    display: grid; grid-template-columns: 84px minmax(0, 1fr) 120px 130px 110px 36px; align-items: center; gap: 16px;
    padding: 18px 22px; border-bottom: 1px solid var(--cp-border);
}
.cp-item-foto { width: 84px; height: 84px; border: 1px solid var(--cp-border); border-radius: 10px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #fff; }
.cp-item-foto img { max-width: 88%; max-height: 88%; object-fit: contain; }
.cp-item-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cp-item-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cp-item-nome { font-weight: 600; font-size: 14px; line-height: 1.35; color: var(--cp-text) !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cp-item-nome:hover { color: var(--cp-brand) !important; }
.cp-item-ref { font-size: 12px; color: var(--cp-muted); }
.cp-item-aviso { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--cp-red); }
.cp-item-unitario, .cp-item-total { display: flex; flex-direction: column; text-align: right; }
.cp-item-unitario small, .cp-item-total small { font-size: 11.5px; color: var(--cp-muted); }
.cp-item-unitario strong { font-weight: 600; }
.cp-item-total strong { font-size: 16px; font-weight: 700; }
.cp-item-qtd { margin: 0; display: flex; justify-content: center; }
.cp-item.is-indisponivel { background: #fff8f8; }
.cp-item.is-indisponivel .cp-item-foto, .cp-item.is-indisponivel .cp-item-total { opacity: .55; }
.cp-carrinho-rodape { display: flex; justify-content: flex-end; padding: 14px 22px; }

.cp-resumo { padding: 22px; position: sticky; top: 16px; display: flex; flex-direction: column; gap: 14px; }
.cp-body .cp-resumo h2 { font-size: 17px; font-weight: 600; }
.cp-resumo-linhas { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.cp-resumo-linhas div { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; }
.cp-resumo-linhas dt { font-weight: 400; color: var(--cp-text-2); }
.cp-resumo-linhas dd { margin: 0; font-weight: 600; }
.cp-resumo-total { display: flex; align-items: baseline; justify-content: space-between; padding: 14px 0 4px; border-top: 1px solid var(--cp-border); }
.cp-resumo-total span { font-weight: 600; }
.cp-resumo-total strong { font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.cp-resumo-nota { margin: 0; font-size: 12px; color: var(--cp-muted); text-align: center; line-height: 1.45; }
.cp-resumo-ajuda { display: flex; align-items: center; justify-content: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--cp-border); font-size: 13px; font-weight: 600; color: var(--cp-text) !important; }
.cp-resumo-ajuda .cp-ico { color: var(--cp-green-600); }
.cp-resumo-ajuda:hover { color: var(--cp-brand) !important; }
.cp-resumo .cp-alerta { margin: 0; }

.cp-etapa { padding: 22px; }
.cp-etapa-head { display: flex; gap: 14px; margin-bottom: 18px; }
.cp-etapa-num { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--cp-brand); color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.cp-body .cp-etapa-head h2 { font-size: 17px; font-weight: 600; margin-top: 3px; }
.cp-etapa-head p { margin: 2px 0 0; color: var(--cp-text-2); font-size: 13px; }
.cp-opcoes { display: flex; flex-direction: column; gap: 10px; max-height: 560px; overflow-y: auto; padding: 2px; }
.cp-opcao { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1px solid var(--cp-border-2); border-radius: 10px; cursor: pointer; margin: 0; transition: border-color .15s, background .15s; }
.cp-opcao:hover { border-color: var(--cp-brand); }
.cp-opcao input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--cp-green); flex: none; }
.cp-opcao-icone { flex: none; width: 36px; height: 36px; border-radius: 8px; background: var(--cp-surface-2); color: var(--cp-brand); display: inline-flex; align-items: center; justify-content: center; }
.cp-opcao-corpo { display: flex; flex-direction: column; gap: 2px; min-width: 0; color: var(--cp-text); font-size: 13.5px; }
.cp-opcao-corpo strong { font-size: 14px; font-weight: 600; }
.cp-opcao-corpo span { color: var(--cp-text-2); }
.cp-opcao-corpo small { color: var(--cp-muted); font-size: 12px; }
.cp-opcao:has(input:checked) { border-color: var(--cp-green); background: var(--cp-green-50); box-shadow: inset 0 0 0 1px var(--cp-green); }
.cp-opcao:has(input:checked) .cp-opcao-icone { background: #fff; color: var(--cp-green-600); }

/* ---------- Sucesso ---------- */
.cp-sucesso { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; margin-top: 12px; }
.cp-sucesso-card { padding: 36px; }
.cp-sucesso-icone { width: 44px; height: 44px; border-radius: 50%; background: var(--cp-green); color: #fff; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.cp-sucesso-icone.is-aviso { background: #f0b429; }
.cp-body .cp-sucesso-card h1 { font-size: 24px; font-weight: 600; }
.cp-sucesso-codigo { margin: 4px 0 0; color: var(--cp-green-600); font-weight: 600; }
.cp-sucesso-msg { margin: 12px 0 0; color: var(--cp-text-2); max-width: 560px; }
.cp-sucesso-infos { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 22px 0 0; padding: 16px 18px; border: 1px solid var(--cp-border); border-radius: 10px; }
.cp-sucesso-infos dt { font-size: 12px; font-weight: 400; color: var(--cp-muted); }
.cp-sucesso-infos dd { margin: 2px 0 0; font-weight: 600; }
.cp-sucesso-acoes { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.cp-sucesso-arte { display: flex; align-items: center; justify-content: center; padding: 24px; overflow: hidden; }
.cp-sucesso-arte svg { max-width: 100%; height: auto; }

/* ---------- Área do cliente ---------- */
.cp-conta { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
.cp-conta-menu { background: var(--cp-surface); border: 1px solid var(--cp-border); border-radius: var(--cp-radius); box-shadow: var(--cp-shadow); padding: 18px 12px; position: sticky; top: 16px; }
.cp-conta-perfil { display: flex; align-items: center; gap: 12px; padding: 0 6px 16px; margin-bottom: 8px; border-bottom: 1px solid var(--cp-border); }
.cp-conta-perfil strong { display: block; font-size: 14px; line-height: 1.3; }
.cp-conta-perfil small { display: block; font-size: 11.5px; color: var(--cp-muted); line-height: 1.35; }
.cp-conta-links { display: flex; flex-direction: column; gap: 2px; }
.cp-conta-links a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; font-weight: 500; font-size: 13.5px; color: var(--cp-text) !important; }
.cp-conta-links a .cp-ico { color: var(--cp-text-2); }
.cp-conta-links a:hover { background: var(--cp-surface-2); }
.cp-conta-links a.is-active { background: var(--cp-green-50); color: var(--cp-brand) !important; font-weight: 600; }
.cp-conta-links a.is-active .cp-ico { color: var(--cp-green-600); }
.cp-conta-links .cp-conta-sair { color: var(--cp-red) !important; }
.cp-conta-links .cp-conta-sair .cp-ico { color: var(--cp-red); }
.cp-conta-conteudo { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.cp-conta-conteudo > .cp-container { padding: 0; max-width: none; }
.cp-conta-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cp-conta-head .cp-page-title { margin-bottom: 4px; }
.cp-conta-head-acoes { display: flex; gap: 10px; flex-wrap: wrap; }

.cp-dados { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.cp-dados-simples { grid-template-columns: minmax(0, 720px); }
.cp-dados-form, .cp-usuarios, .cp-tabela-card { padding: 22px; }
.cp-dados-form.is-novo { border-top: 3px solid var(--cp-green); }
.cp-lista-usuarios { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 620px; overflow-y: auto; }
.cp-lista-usuarios li { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; }
.cp-lista-usuarios li:hover { background: var(--cp-surface-2); }
.cp-lista-usuarios li.is-active { background: var(--cp-green-50); }
.cp-lista-usuarios li.is-inativo .cp-avatar { background: var(--cp-border-2); }
.cp-lista-usuarios .cp-avatar { width: 36px; height: 36px; font-size: 12px; }
.cp-usuario-info { flex: 1; min-width: 0; }
.cp-usuario-info strong, .cp-usuario-info small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-usuario-info strong { font-size: 13.5px; font-weight: 600; }
.cp-usuario-info small { font-size: 12px; color: var(--cp-muted); }
.cp-usuarios .cp-filtro-busca { margin-bottom: 10px; }
.cp-inativos { margin-top: 14px; border-top: 1px solid var(--cp-border); padding-top: 12px; }
.cp-inativos summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: 14px; list-style: none; padding: 4px 0 8px; }
.cp-inativos summary::-webkit-details-marker { display: none; }
.cp-inativos summary .cp-ico { transition: transform .15s; color: var(--cp-text-2); }
.cp-inativos[open] summary .cp-ico { transform: rotate(90deg); }

.cp-tabela-rolagem { overflow-x: auto; margin: 0 -22px; }
.cp-tabela { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cp-tabela th { padding: 10px 22px; text-align: left; font-size: 12px; font-weight: 600; color: var(--cp-muted); text-transform: uppercase; letter-spacing: .03em; background: var(--cp-surface-2); white-space: nowrap; }
.cp-tabela td { padding: 14px 22px; border-bottom: 1px solid var(--cp-border); vertical-align: middle; }
.cp-tabela tr:last-child td { border-bottom: 0; }
.cp-tabela tbody tr:hover td { background: #fafaf9; }
.cp-num { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cp-tabela-acao { text-align: right; width: 1%; white-space: nowrap; }
.cp-tabela-vazia { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--cp-text-2); padding: 6px 0; }
.cp-tabela-vazia .cp-ico { color: var(--cp-green-600); }
.cp-aprovacoes-historico { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.cp-historico { list-style: none; margin: 0; padding: 0; }
.cp-historico li + li { border-top: 1px solid var(--cp-border); }
.cp-historico a, .cp-historico li > div { display: block; padding: 11px 6px; color: var(--cp-text) !important; border-radius: 6px; }
.cp-historico a:hover { background: var(--cp-surface-2); }
.cp-historico-linha { display: flex; justify-content: space-between; gap: 8px; }
.cp-historico-linha strong { font-weight: 600; }
.cp-historico-linha .cp-num { font-weight: 600; }
.cp-historico-meta { display: block; font-size: 12px; color: var(--cp-muted); margin-top: 2px; }

/* ---------- Acesso (login, recuperar senha, escolha de cliente) ---------- */
.cp-auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 16px; position: relative; overflow: hidden; background: #e9ebe7; }
.cp-auth-inline { min-height: 0; padding: 32px 0 16px; background: none; overflow: visible; }
/* Fundo: print da página inicial, já borrado e com dados fictícios */
.cp-auth-fundo { position: absolute; inset: 0; pointer-events: none; background: url(../images/login-fundo.jpg) center top / cover no-repeat; }
.cp-auth-fundo::after { content: ''; position: absolute; inset: 0; background: rgba(233, 235, 231, .35); }
.cp-auth-card { position: relative; width: 100%; max-width: 500px; background: #fff; border-radius: 16px; box-shadow: var(--cp-shadow-lg); padding: 36px 36px 30px; }
.cp-auth-inline .cp-auth-card { box-shadow: var(--cp-shadow); border: 1px solid var(--cp-border); }
.cp-auth-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.cp-auth-logo-copapel { height: 34px; width: auto; }
.cp-auth-logo-click { height: 24px; width: auto; padding-left: 12px; border-left: 1px solid var(--cp-border-2); }
.cp-auth-logo-cliente { max-height: 60px; max-width: 220px; }
.cp-body .cp-auth-card h1 { font-size: 23px; font-weight: 600; margin-bottom: 4px; }
.cp-auth-sub { color: var(--cp-text-2); margin: 0 0 22px; }
.cp-auth-form { display: flex; flex-direction: column; gap: 18px; }
.cp-auth-form .cp-input { height: 50px; }
.cp-auth-form .cp-btn { margin-top: 4px; }
.cp-auth-rodape { margin: 20px 0 0; padding-top: 18px; border-top: 1px solid var(--cp-border); text-align: center; color: var(--cp-text-2); font-size: 13px; }
.cp-auth-voltar { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 20px; font-weight: 600; color: var(--cp-brand) !important; }
.cp-auth-voltar:hover { text-decoration: underline !important; }
/* Aviso de fraudes abaixo do cartão de login (no lugar do antigo pop-up): discreto de propósito */
.cp-auth-aviso { position: relative; width: 100%; max-width: 500px; margin-top: 12px; padding: 14px 18px; border-radius: 12px; background: rgba(255, 255, 255, .82); color: var(--cp-text-2); font-size: 12.5px; line-height: 1.5; }
.cp-auth-aviso-titulo { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 8px; }
.cp-auth-aviso-titulo .cp-ico { flex: none; margin-top: 2px; }
.cp-auth-aviso-titulo strong { font-weight: 600; color: var(--cp-text); }
.cp-auth-aviso dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 14px; margin: 0; padding-left: 24px; }
.cp-auth-aviso dt { font-weight: 400; }
.cp-auth-aviso dd { margin: 0; overflow-wrap: anywhere; }
.cp-auth-aviso a { color: var(--cp-brand) !important; font-weight: 500; }
.cp-auth-aviso a[href^="tel:"] { white-space: nowrap; }
.cp-auth-aviso a:hover { text-decoration: underline !important; }

/* ---------- Rodapé ---------- */
.cp-footer { background: #fafaf8; border-top: 1px solid var(--cp-border); padding: 48px 0 0; margin-top: auto; }
.cp-footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.25fr; gap: 32px; padding-bottom: 40px; }
.cp-footer-marca img { height: 40px; width: auto; mix-blend-mode: multiply; }
.cp-footer-marca p { margin: 16px 0 0; color: var(--cp-text-2); font-size: 13px; max-width: 260px; }
.cp-body .cp-footer-titulo { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.cp-footer-titulo .cp-ico { color: var(--cp-text-2); }
.cp-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: 13px; color: var(--cp-text-2); }
.cp-footer ul a { color: var(--cp-text-2) !important; }
.cp-footer ul a:hover { color: var(--cp-brand) !important; }
.cp-footer-atendimento { background: #f0f1ee; border-radius: 16px; padding: 22px 24px; align-self: start; }
.cp-body .cp-footer-atendimento h2 { font-size: 14px; font-weight: 600; color: var(--cp-green-600); margin-bottom: 8px; }
.cp-footer-fone { display: block; font-size: 24px; font-weight: 600; color: var(--cp-text) !important; letter-spacing: .01em; }
.cp-footer-atendimento p { margin: 4px 0 0; font-size: 13px; color: var(--cp-text-2); }
.cp-footer-contato { display: flex; align-items: center; gap: 16px; margin-top: 14px !important; font-weight: 600; color: var(--cp-text) !important; }
.cp-footer-contato a { display: inline-flex; align-items: center; gap: 6px; color: var(--cp-green-600) !important; font-weight: 600; }
.cp-footer-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 22px; border-top: 1px solid var(--cp-border); font-size: 12px; color: var(--cp-muted); }
.cp-footer-base a { color: var(--cp-muted) !important; }
.cp-footer-base a:hover { color: var(--cp-brand) !important; }

/* Botões flutuantes */
.cp-flutuantes { position: fixed; right: 24px; bottom: 24px; z-index: 50; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cp-topo { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; background: none; font-size: 12px; font-weight: 500; color: var(--cp-text-2); cursor: pointer; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .2s, transform .2s; }
.cp-topo.is-visivel { opacity: 1; transform: none; pointer-events: auto; }
.cp-topo-icone { width: 30px; height: 30px; border-radius: 50%; background: #c9f08f; color: var(--cp-brand); display: inline-flex; align-items: center; justify-content: center; }
.cp-topo:hover .cp-topo-icone { background: var(--cp-green); color: #fff; }
.cp-whats-flutuante { width: 56px; height: 56px; border-radius: 50%; background: #25a244; color: #fff !important; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 8px 22px rgba(37, 162, 68, .35); transition: transform .15s; }
.cp-whats-flutuante:hover { transform: scale(1.06); }


/* Modal de segurança: mantém acima do layout */
.cp-body > .cp-app > .modal { position: fixed; inset: 0; }

/* ---------- Páginas antigas dentro do layout novo (.cp-legado) ---------- */
.cp-legado .buttons-tab { display: none; }
.cp-legado .content { margin-top: 0 !important; }
.cp-legado .content > .container-fluid, .cp-legado .content-holder > .container-fluid { padding-left: 0; padding-right: 0; }
.cp-legado .content-holder { border: 1px solid var(--cp-border); border-radius: var(--cp-radius); box-shadow: var(--cp-shadow); padding: 22px; margin: 0; }
.cp-legado h1 { font-size: 24px; font-weight: 600; color: var(--cp-text); margin-bottom: 16px; }
.cp-legado h3 { font-size: 17px; font-weight: 500; color: var(--cp-text-2); }
.cp-legado .bg-gray { background: var(--cp-surface-2); border-radius: 10px; padding: 22px; }
.cp-legado .titulo-form { color: var(--cp-brand); font-size: 13px; font-weight: 600; letter-spacing: .03em; }
.cp-legado .button-green {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; line-height: 1; padding: 0 18px;
    border-radius: var(--cp-radius-sm); background: var(--cp-green); text-transform: none; font-weight: 600; font-size: 14px;
}
.cp-legado .button-green img { max-width: 20px !important; margin: 0 !important; }
.cp-legado .button-dark { background: var(--cp-brand); }
.cp-legado .button-red { background: var(--cp-red); }
.cp-legado .button-border { background: #fff; border: 1.5px solid var(--cp-brand); color: var(--cp-brand); }
.cp-legado .button-border:hover { color: var(--cp-brand); opacity: 1; background: var(--cp-brand-50); }
.cp-legado .form-control, .cp-legado .form-user input, .cp-legado .form-user select, .cp-legado .form-user textarea {
    border: 1px solid var(--cp-border-2); border-radius: var(--cp-radius-sm); height: 46px; line-height: normal; font-size: 14px; color: var(--cp-text); background-color: #fff;
}
.cp-legado .form-user textarea { height: auto; min-height: 96px; }
.cp-legado .form-control:focus, .cp-legado .form-user input:focus { border-color: var(--cp-brand); box-shadow: 0 0 0 3px rgba(13, 94, 82, .12) !important; }
.cp-legado .m-form__help { display: block; font-size: 13px; font-weight: 600; margin: 10px 0 6px; }
.cp-legado .table { background: #fff; border-radius: 10px; overflow: hidden; font-size: 13.5px; }
.cp-legado .table thead th { background: var(--cp-surface-2); border: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--cp-muted); }
.cp-legado .table td, .cp-legado .table th { border-color: var(--cp-border); vertical-align: middle; }
.cp-legado .table-striped tbody tr:nth-of-type(odd) { background: #fafaf9; }
.cp-legado .content-tabs.cart-tabs { padding: 20px 0 0; gap: 12px; flex-wrap: wrap; }
.cp-legado .cart-tabs .tab-number { font-size: 28px; color: var(--cp-text); font-weight: 600; }
.cp-legado .cart-tabs .tab-product { font-size: 13px; line-height: 1.35; color: var(--cp-text-2); }
.cp-legado .cart-tabs .tab-order { font-size: 14px; letter-spacing: 0; text-transform: none; font-weight: 600; }
.cp-legado .cart-tabs .button-dark { height: 48px; padding: 0 20px; }
.cp-legado .row-image { border: 1px solid var(--cp-border); border-radius: 10px; width: 110px; height: 96px; }
.cp-legado .row-product .product-title { font-size: 15px; line-height: 1.35; font-weight: 600; color: var(--cp-text); }
.cp-legado .product-cod, .cp-legado .produto-ref { font-size: 12px; color: var(--cp-muted); }
.cp-legado .row-cart .product-cart { border-left: 1px solid var(--cp-border); padding-left: 24px; }
.cp-legado .product-attr { font-size: 12px; color: var(--cp-muted); }
.cp-legado .product-value { font-size: 16px; font-weight: 600; color: var(--cp-text); }
.cp-legado .product-line { background: #fff; border: 1px solid var(--cp-border); border-radius: 10px; padding: 14px 6px; margin: 0 0 12px; }
.cp-legado .checklist, .cp-legado .checklist-title { font-size: 14px; color: var(--cp-text); }
.cp-legado .button-simple-big { color: var(--cp-brand); font-weight: 600; opacity: 1; }

/* ---------- Relatórios ---------- */
.cp-rel-filtros { padding: 0 0 18px; }
.cp-rel-abas { display: flex; gap: 4px; padding: 6px 18px 0; border-bottom: 1px solid var(--cp-border); overflow-x: auto; scrollbar-width: none; }
.cp-rel-abas::-webkit-scrollbar { display: none; }
.cp-rel-aba {
    display: inline-flex; align-items: center; gap: 8px; padding: 14px 14px 12px; border: 0; background: none; cursor: pointer;
    font-weight: 600; font-size: 14px; color: var(--cp-text-2); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.cp-rel-aba:hover { color: var(--cp-brand); }
.cp-rel-aba.is-active { color: var(--cp-brand); border-bottom-color: var(--cp-green); }
.cp-rel-aba .cp-ico { color: currentColor; }
.cp-rel-campos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 18px 18px 0; }
.cp-rel-campos .cp-select { height: 42px; font-size: 13px; text-overflow: ellipsis; }
.cp-rel-rodape { display: flex; align-items: center; gap: 14px 20px; flex-wrap: wrap; padding: 16px 18px 0; }
.cp-rel-medida { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 10px; background: var(--cp-surface-2); }
.cp-rel-medida > span { font-size: 12.5px; font-weight: 600; color: var(--cp-text-2); padding: 0 8px 0 6px; }
.cp-rel-medida label { margin: 0; cursor: pointer; }
.cp-rel-medida input { position: absolute; opacity: 0; pointer-events: none; }
.cp-rel-medida label span { display: inline-block; padding: 7px 14px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--cp-text-2); }
.cp-rel-medida input:checked + span { background: #fff; color: var(--cp-brand); box-shadow: 0 1px 2px rgba(16, 24, 40, .12); }
.cp-rel-medida input:focus-visible + span { outline: 2px solid var(--cp-brand); outline-offset: 1px; }
.cp-rel-chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.cp-rel-chips li { background: var(--cp-green-50); color: var(--cp-brand); border-radius: 14px; padding: 4px 10px; font-size: 12.5px; font-weight: 600; max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-rel-chips li span { font-weight: 500; color: var(--cp-text-2); }
.cp-rel-botoes { display: flex; gap: 10px; margin-left: auto; }

.cp-rel-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cp-rel-kpi { padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cp-rel-kpi-rotulo { font-size: 12.5px; font-weight: 600; color: var(--cp-text-2); }
.cp-rel-kpi-valor { font-size: 26px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; color: var(--cp-text); }
.cp-rel-kpi-nome { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--cp-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.cp-rel-kpi-nota { font-size: 12px; color: var(--cp-muted); margin-top: auto; }

.cp-rel-grafico, .cp-rel-tabela-card { padding: 22px; }
.cp-rel-secao-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.cp-body .cp-rel-secao-head h2 { font-size: 17px; font-weight: 600; }
.cp-rel-secao-head p { margin: 4px 0 0; font-size: 13px; color: var(--cp-text-2); max-width: 640px; }
.cp-rel-busca { margin: 0; width: 260px; }
.cp-rel-legenda { display: flex; flex-wrap: wrap; gap: 6px 20px; list-style: none; margin: 0 0 12px; padding: 0; font-size: 12.5px; color: var(--cp-text); }
.cp-rel-legenda li { display: flex; align-items: center; }
.cp-rel-legenda i { flex: none; width: 12px; height: 12px; margin-right: 8px; border-radius: 3px; }
.cp-rel-grafico-area { position: relative; }

.cp-rel-rolagem { margin: 0 -22px; }
.cp-rel-tabela th button { all: unset; cursor: pointer; display: inline-block; text-align: inherit; }
.cp-rel-tabela th button small { display: block; font-size: 10.5px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--cp-amber); }
.cp-rel-tabela th button:hover, .cp-rel-tabela th button.is-ordenado { color: var(--cp-brand); }
.cp-rel-tabela th button:focus-visible { outline: 2px solid var(--cp-brand); outline-offset: 2px; border-radius: 3px; }
.cp-rel-tabela th button[aria-sort="descending"]::after { content: ' ↓'; }
.cp-rel-tabela th button[aria-sort="ascending"]::after { content: ' ↑'; }
.cp-rel-tabela th, .cp-rel-tabela td { padding: 12px 14px; }
.cp-rel-tabela thead th:first-child, .cp-rel-tabela tbody th, .cp-rel-tabela tfoot th { position: sticky; left: 0; z-index: 1; padding-left: 22px; }
.cp-rel-tabela thead th:first-child { z-index: 2; }
.cp-rel-tabela tbody th, .cp-rel-tabela tfoot th {
    text-transform: none; letter-spacing: 0; font-size: 13.5px; white-space: normal; text-align: left; color: var(--cp-text);
    min-width: 210px; max-width: 300px; box-shadow: inset -1px 0 0 var(--cp-border);
}
.cp-rel-tabela tbody th { font-weight: 600; background: #fff; }
.cp-rel-tabela tbody tr:hover th { background: #fafaf9; }
.cp-rel-tabela tbody th small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--cp-muted); }
.cp-rel-tabela td.cp-num small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--cp-muted); }
.cp-rel-tabela .cp-rel-total { font-weight: 700; background: #fafaf9; }
.cp-rel-tabela tbody tr:hover .cp-rel-total { background: #f4f5f3; }
.cp-rel-zero { color: var(--cp-border-2); }
.cp-rel-part { width: 1%; white-space: nowrap; padding-right: 22px !important; }
.cp-rel-barra { display: inline-block; vertical-align: middle; width: 48px; height: 6px; border-radius: 3px; background: var(--cp-surface-2); overflow: hidden; margin-right: 8px; }
.cp-rel-barra i { display: block; height: 100%; border-radius: 3px; background: #2a78d6; }
.cp-rel-pct { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--cp-text-2); }
.cp-rel-tabela tfoot th, .cp-rel-tabela tfoot td { border-top: 2px solid var(--cp-brand); background: var(--cp-surface-2); font-weight: 700; padding-top: 14px; padding-bottom: 14px; }
.cp-rel-sem-resultado { margin: 14px 0 0; color: var(--cp-text-2); text-align: center; }

/* ---------- Notas fiscais e boletos ---------- */
.cp-fin-filtros { display: grid; grid-template-columns: 220px minmax(0, 1fr) 220px; gap: 14px; padding: 18px; align-items: end; }
.cp-fin-filtros-boletos { grid-template-columns: auto minmax(0, 1fr) 190px 190px; }
.cp-fin-filtros .cp-select { height: 42px; font-size: 13px; }
.cp-fin-busca { margin: 0; }
.cp-fin-busca input { height: 42px !important; border: 1px solid var(--cp-border-2) !important; background: #fff !important; }
.cp-fin-busca input:focus { border-color: var(--cp-brand) !important; }
.cp-fin-situacoes { align-self: end; height: 42px; }
.cp-fin-situacoes label span { padding: 6px 12px; }
.cp-fin-tabela td small, .cp-fin-tabela td .cp-link + small { display: block; margin-top: 2px; font-size: 12px; color: var(--cp-muted); font-weight: 400; }
.cp-fin-tabela td { vertical-align: middle; }
.cp-fin-tabela tbody td:first-child, .cp-fin-tabela thead th:first-child { padding-left: 22px; }
.cp-fin-tabela .cp-tabela-acao { padding-right: 22px; }
.cp-fin-indisponivel { font-size: 12px; color: var(--cp-muted); white-space: nowrap; }
.cp-fin-situacao { display: inline-flex; align-items: center; gap: 6px; border-radius: 12px; padding: 3px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.cp-fin-situacao::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.cp-fin-situacao.is-pago { background: #e9f6e9; color: #1d6b1d; }
.cp-fin-situacao.is-vencido { background: var(--cp-red-50); color: #a52a2a; }
.cp-fin-situacao.is-proximo { background: var(--cp-amber-50); color: #7a5200; }
.cp-fin-situacao.is-aberto { background: #eaf2fc; color: #1c5cab; }
.cp-fin-situacao.is-neutro { background: var(--cp-surface-2); color: var(--cp-text-2); }
.cp-fin-tabela td .cp-fin-situacao + small { margin-top: 4px; }
.cp-fin-kpis .cp-rel-kpi-rotulo { display: inline-flex; align-items: center; gap: 6px; }
.cp-fin-kpis .cp-rel-kpi.is-vencido { box-shadow: inset 3px 0 0 var(--cp-red), var(--cp-shadow); }
.cp-fin-kpis .cp-rel-kpi.is-vencido .cp-rel-kpi-rotulo { color: #a52a2a; }

/* ---------- Navegação do celular (barra inferior + gavetas) ---------- */
.cp-bottomnav { display: none; }
.cp-folha[hidden] { display: none !important; }
.cp-folha { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; justify-content: flex-end; }
.cp-folha-fundo { position: absolute; inset: 0; background: rgba(16, 24, 40, .45); animation: cp-aparece .18s ease-out; }
.cp-folha-painel {
    position: relative; background: #fff; border-radius: 18px 18px 0 0; max-height: 86vh; display: flex; flex-direction: column;
    box-shadow: 0 -12px 32px rgba(16, 24, 40, .18); animation: cp-sobe .22s ease-out; padding-bottom: env(safe-area-inset-bottom);
}
.cp-folha-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 18px 14px; border-bottom: 1px solid var(--cp-border); }
.cp-body .cp-folha-head h2 { font-size: 17px; font-weight: 600; }
.cp-folha-perfil { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cp-folha-perfil small { display: block; font-size: 12px; color: var(--cp-muted); }
.cp-body .cp-folha-perfil h2 { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-folha-lista { list-style: none; margin: 0; padding: 8px 10px 14px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.cp-folha-link { display: flex; align-items: center; gap: 12px; padding: 11px 8px; border-radius: 10px; font-weight: 500; font-size: 14.5px; color: var(--cp-text) !important; cursor: pointer; list-style: none; }
.cp-folha-link::-webkit-details-marker { display: none; }
.cp-folha-link:hover, .cp-folha-link:active { background: var(--cp-surface-2); }
.cp-folha-link > span:not(.cp-folha-icone):not(.cp-badge) { flex: 1; min-width: 0; }
.cp-folha-link small { color: var(--cp-muted); font-size: 12px; font-weight: 600; }
.cp-folha-icone { width: 38px; height: 38px; border-radius: 50%; background: var(--cp-surface-2); color: var(--cp-brand); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.cp-folha-seta { color: var(--cp-muted); transition: transform .15s; }
.cp-folha details[open] > summary .cp-folha-seta { transform: rotate(180deg); }
.cp-folha details[open] > summary { color: var(--cp-brand) !important; font-weight: 600; }
.cp-folha details ul { list-style: none; margin: 0 0 6px 58px; padding: 0; border-left: 2px solid var(--cp-green-100); }
.cp-folha details ul a { display: flex; justify-content: space-between; gap: 8px; padding: 9px 12px; font-size: 14px; color: var(--cp-text-2) !important; }
.cp-folha details ul a:active { background: var(--cp-surface-2); }
.cp-folha details ul li:first-child a { font-weight: 600; color: var(--cp-brand) !important; }
.cp-folha-sair, .cp-folha-sair .cp-folha-icone { color: var(--cp-red) !important; }
html.cp-folha-aberta, html.cp-folha-aberta body { overflow: hidden; }
@keyframes cp-sobe { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes cp-aparece { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Responsivo ---------- */
@media (max-width: 1279px) {
    .cp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .cp-carrossel { grid-auto-columns: calc((100% - 32px) / 3); }
    .cp-header-inner { gap: 20px; }
    .cp-action-repetir span, .cp-topbar-msg a { display: none; }
    .cp-item { grid-template-columns: 72px minmax(0, 1fr) 110px 120px 36px; grid-template-areas: "foto info qtd total del" "foto info unit total del"; row-gap: 4px; }
    .cp-item-foto { grid-area: foto; width: 72px; height: 72px; }
    .cp-item-info { grid-area: info; }
    .cp-item-unitario { grid-area: unit; text-align: center; }
    .cp-item-qtd { grid-area: qtd; }
    .cp-item-total { grid-area: total; }
    .cp-item > .cp-icone-btn { grid-area: del; }
    .cp-item-unitario small { display: none; }
    .cp-item-unitario strong { font-size: 12px; font-weight: 500; color: var(--cp-muted); }
    .cp-item-unitario strong::after { content: ' / un.'; }
}

@media (max-width: 1099px) {
    .cp-rel-campos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cp-fin-filtros, .cp-fin-filtros-boletos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cp-fin-situacoes { grid-column: 1 / -1; justify-self: start; }
    .cp-rel-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cp-checkout { grid-template-columns: minmax(0, 1fr) 300px; }
    .cp-conta { grid-template-columns: 220px minmax(0, 1fr); }
    .cp-dados { grid-template-columns: minmax(0, 1fr); }
    .cp-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cp-topbar-cliente { max-width: 200px; }
}

@media (max-width: 991px) {
    .cp-container { padding: 0 16px; }
    .cp-topbar-msg { display: none; }
    .cp-header-inner { flex-wrap: wrap; gap: 10px 16px; padding-top: 12px; padding-bottom: 12px; min-height: 0; }
    .cp-user-ola, .cp-user-seta { display: none !important; }
    .cp-logo-copapel { height: 30px; }
    .cp-logo-click { height: 21px; }
    .cp-search { order: 10; flex: 1 0 100%; max-width: none; }
    .cp-search input { height: 44px; }
    .cp-header-actions { gap: 14px; }
    .cp-catnav a { padding: 12px 12px; }

    .cp-listagem { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .cp-filtros { position: static; }
    .cp-filtros-toggle {
        display: flex; align-items: center; gap: 10px; width: 100%; height: 48px; padding: 0 16px; background: #fff; border: 1px solid var(--cp-border);
        border-radius: var(--cp-radius); font-weight: 600; color: var(--cp-text); cursor: pointer;
    }
    .cp-filtros-toggle span { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .cp-filtros-seta { transition: transform .15s; }
    .cp-filtros .cp-filtro-card, .cp-filtros .cp-ajuda-card { display: none; }
    .cp-filtros.is-open .cp-filtro-card, .cp-filtros.is-open .cp-ajuda-card { display: flex; flex-direction: column; }
    .cp-filtros.is-open .cp-ajuda-card { flex-direction: row; }
    .cp-filtros.is-open .cp-filtros-seta { transform: rotate(180deg); }
    .cp-cat-grade { grid-template-columns: repeat(4, minmax(0, 1fr)); }

    .cp-pdp { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .cp-pdp-foto { max-height: 420px; aspect-ratio: auto; height: 380px; }
    .cp-pdp-ficha { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cp-pdp-visao, .cp-pdp-blocos { grid-template-columns: minmax(0, 1fr); gap: 22px; }

    .cp-checkout { grid-template-columns: minmax(0, 1fr); }
    .cp-resumo { position: static; }

    .cp-conta { grid-template-columns: minmax(0, 1fr); }
    .cp-conta-menu { position: static; padding: 10px; }
    .cp-conta-perfil { display: none; }
    .cp-conta-links { flex-direction: row; overflow-x: auto; gap: 6px; scrollbar-width: none; }
    .cp-conta-links::-webkit-scrollbar { display: none; }
    .cp-conta-links a { flex: none; white-space: nowrap; padding: 8px 12px; }
    .cp-aprovacoes-historico { grid-template-columns: minmax(0, 1fr); }

    .cp-sucesso { grid-template-columns: minmax(0, 1fr); }
    .cp-sucesso-arte { display: none; }
}

@media (max-width: 767px) {
    .cp-topbar-right .cp-topbar-cliente { display: none; }
    .cp-page-head { flex-direction: column; align-items: stretch; }
    .cp-body .cp-page-title { font-size: 22px; }
    .cp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .cp-carrossel { grid-auto-columns: 46%; }
    .cp-produto { padding: 12px; }
    .cp-produto-preco { font-size: 18px; }
    .cp-produto-compra { flex-direction: column; }
    .cp-produto-compra .cp-btn { flex: none; height: 40px; }
    .cp-qty { width: 100%; }
    .cp-qty input { height: 40px; }
    .cp-resultados-opcoes { width: 100%; gap: 10px; }
    .cp-resultados-opcoes label { flex: 1; }
    .cp-resultados-opcoes label span { display: none; }
    .cp-resultados-opcoes .cp-select { width: 100%; min-width: 0 !important; }
    .cp-paginacao-barra { justify-content: center; }

    .cp-item { grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "foto info del" "foto unit unit" "qtd qtd total"; padding: 16px; column-gap: 12px; row-gap: 10px; }
    .cp-item > .cp-icone-btn { justify-self: end; align-self: start; }
    .cp-item-total { text-align: right; white-space: nowrap; }
    .cp-item-foto { width: 64px; height: 64px; }
    .cp-item-unitario { text-align: left; }
    .cp-item-qtd { justify-content: flex-start; }
    .cp-item-total { justify-content: center; }
    .cp-action-carrinho { margin-right: 10px; }
    .cp-carrinho-cabecalho, .cp-carrinho-rodape { padding: 14px 16px; }
    .cp-carrinho-rodape { justify-content: center; }

    .cp-form-grade, .cp-switches { grid-template-columns: minmax(0, 1fr); }
    .cp-rel-campos { grid-template-columns: minmax(0, 1fr); }
    .cp-fin-filtros, .cp-fin-filtros-boletos { grid-template-columns: minmax(0, 1fr); }
    .cp-fin-situacoes { overflow-x: auto; max-width: 100%; }
    .cp-fin-tabela thead { display: none; }
    .cp-fin-tabela, .cp-fin-tabela tbody { display: block; }
    .cp-fin-tabela tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 14px; padding: 14px 18px; border-bottom: 1px solid var(--cp-border); }
    .cp-fin-tabela tbody tr[hidden] { display: none; }
    .cp-fin-tabela tbody td { display: block; padding: 0 !important; border: 0; text-align: left !important; }
    .cp-fin-tabela tbody td[data-rotulo]::before { content: attr(data-rotulo); display: block; font-size: 11px; font-weight: 600; color: var(--cp-muted); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 2px; }
    .cp-fin-tabela tbody td.cp-tabela-acao { grid-column: 1 / -1; width: auto; }
    .cp-fin-tabela tbody td.cp-tabela-acao .cp-btn { width: 100%; }
    .cp-rel-kpi-valor { font-size: 18px; }
    .cp-rel-kpi { padding: 14px; }
    .cp-rel-kpis { gap: 10px; }
    .cp-rel-aba { padding: 12px 10px 10px; font-size: 13px; }
    .cp-rel-botoes { margin-left: 0; width: 100%; }
    .cp-rel-botoes .cp-btn { flex: 1; }
    .cp-rel-busca { width: 100%; }
    .cp-rel-grafico, .cp-rel-tabela-card { padding: 18px; }
    .cp-rel-rolagem { margin: 0 -18px; }
    .cp-pdp-acoes { flex-direction: column; }
    .cp-pdp-acoes .cp-stepper { align-self: flex-start; }
    .cp-pdp-acoes .cp-btn { flex: none; }
    .cp-pdp-compra { padding: 18px; }
    .cp-pdp-compra .cp-btn-whats { white-space: normal; height: auto; min-height: 52px; padding: 10px 16px; line-height: 1.3; text-align: center; }
    .cp-body .cp-pdp-nome { font-size: 22px; }
    .cp-pdp-painel { padding: 20px 18px; }
    .cp-pdp-lista-colunas, .cp-pdp-ficha { grid-template-columns: minmax(0, 1fr); }
    .cp-pdp-abas-lista button { margin-right: 10px; font-size: 14px; }
    .cp-sucesso-card { padding: 24px; }
    .cp-footer-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .cp-auth-card { padding: 28px 22px 24px; }
    .cp-flutuantes { right: 16px; bottom: 16px; }
    .cp-whats-flutuante { width: 50px; height: 50px; }
    .cp-tabela th, .cp-tabela td { padding: 10px 14px; }
    .cp-tabela-rolagem { margin: 0 -22px; }
}

@media (max-width: 767px) {
    .cp-bottomnav {
        display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
        background: #fff; border-top: 1px solid var(--cp-border); box-shadow: 0 -6px 18px rgba(16, 24, 40, .08);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    }
    .cp-bottomnav-item {
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 50px; padding: 4px 2px;
        border: 0; background: none; border-radius: 10px; color: var(--cp-text-2) !important; font-size: 11px !important; font-weight: 600; line-height: 1.15;
        text-align: center; cursor: pointer;
    }
    .cp-bottomnav-item > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .cp-bottomnav-item.is-active { color: var(--cp-brand) !important; }
    .cp-bottomnav-item.is-active .cp-ico { color: var(--cp-green-600); }
    .cp-bottomnav-item:active { background: var(--cp-surface-2); }
    .cp-bottomnav-icone { position: relative; display: inline-flex; }
    .cp-bottomnav-icone .cp-badge { top: -6px; right: -12px; }
    body.cp-logado { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
    .cp-flutuantes { bottom: calc(78px + env(safe-area-inset-bottom)) !important; }
    /* O que está na barra de baixo sai do cabeçalho */
    .cp-header-actions .cp-action-repetir, .cp-header-actions .cp-user, .cp-header-actions .cp-action-carrinho { display: none; }
    .cp-header-actions { padding-right: 8px; }
}

@media (max-width: 520px) {
    .cp-logo-click { display: none; }
    .cp-logo-copapel { height: 26px; }
    .cp-header-inner { gap: 10px 12px; }
    .cp-header-actions { gap: 12px; }
    .cp-action-icon { padding: 4px; }
    .cp-topbar-inner { min-height: 38px; }
    .cp-topbar-link span { font-size: 12.5px; }
}

@media (max-width: 400px) {
    .cp-grid { gap: 8px; }
    .cp-produto { padding: 10px; gap: 8px; }
    .cp-produto-nome { font-size: 13px; }
    .cp-header-actions { gap: 8px; }
    .cp-cat-grade { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
    .cp-body *, .cp-body *::before, .cp-body *::after { transition: none !important; animation: none !important; }
}
