/* APURIVA — sistema de componentes sobre Bootstrap 5 (prefixo ap-)
   Origem: docs/design/src/_base.css. Carregar DEPOIS do bootstrap.min.css.
   Fonte Inter via Google Fonts (link no baseDash.html), fallback Arial. */
:root {
  --ap-ink: #142F38; --ap-brand: #126C63; --ap-brand-hover: #0D524C; --ap-mint: #DDF2EA;
  --ap-canvas: #F5F6F3; --ap-white: #FFFFFF; --ap-text: #243E47; --ap-muted: #536B72;
  --ap-line: #D7E1DF; --ap-border: #81928F; --ap-soft: #EEF1F0;
  --ap-success: #1A6B45; --ap-success-bg: #E8F4EC; --ap-warning: #8A4B0F; --ap-warning-bg: #FFF1D9;
  --ap-error: #B33D32; --ap-error-bg: #FDECE8; --ap-info: #245B87; --ap-info-bg: #EAF2F9;
  --ap-shadow: 0 8px 24px rgba(20,47,56,0.08);
  --ap-sidebar-w: 240px;
  --ap-topbar-h: 72px;
}

/* ---------- Base (convive com o Bootstrap) ---------- */
body { margin: 0; font-family: Inter, Arial, sans-serif; font-size: 16px; line-height: 24px; color: var(--ap-text); background: var(--ap-canvas); -webkit-font-smoothing: antialiased; }
a { color: var(--ap-brand); text-decoration: none; font-weight: 500; }
a:hover { color: var(--ap-brand-hover); text-decoration: underline; }
.ap-shell h1, .ap-shell h2, .ap-shell h3, .ap-shell h4, .ap-shell p,
.ap-modal-dialog h1, .ap-modal-dialog h2, .ap-modal-dialog h3, .ap-modal-dialog h4, .ap-modal-dialog p { margin: 0; }
.num { font-variant-numeric: tabular-nums lining-nums; }
.ap-h1 { font-size: 24px; line-height: 32px; font-weight: 600; color: var(--ap-ink); letter-spacing: -0.01em; }
.ap-h2 { font-size: 18px; line-height: 24px; font-weight: 600; color: var(--ap-ink); }
.ap-h3 { font-size: 16px; line-height: 24px; font-weight: 600; color: var(--ap-ink); }
.ap-sub { font-size: 14px; line-height: 20px; color: var(--ap-muted); }
.ap-small { font-size: 12px; line-height: 18px; color: var(--ap-muted); }
.ap-eyebrow { font-size: 11px; line-height: 16px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ap-muted); font-weight: 600; }
.ap-muted { color: var(--ap-muted); }
.ap-strong { font-weight: 600; color: var(--ap-ink); }
.ap-mono { font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 13px; line-height: 20px; color: var(--ap-text); word-break: break-all; }
.ap-note { font-size: 12px; line-height: 18px; color: var(--ap-muted); }
.ap-divider { height: 1px; background: var(--ap-line); }
.ap-hidden { display: none !important; }
.ap-shell svg, .ap-modal-dialog svg { flex-shrink: 0; }
:focus-visible { outline: 3px solid var(--ap-brand); outline-offset: 2px; }

/* ---------- Botões ---------- */
.ap-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 8px; font-family: inherit; font-size: 14px; line-height: 20px; font-weight: 600; border: 1px solid transparent; cursor: pointer; white-space: nowrap; text-decoration: none; background: transparent; transition: background .12s ease, color .12s ease; }
.ap-btn:hover { text-decoration: none; }
.ap-btn-primary { background: var(--ap-brand); color: #FFFFFF; }
.ap-btn-primary:hover { background: var(--ap-brand-hover); color: #FFFFFF; }
.ap-btn-secondary { background: #FFFFFF; color: var(--ap-brand); border-color: var(--ap-brand); }
.ap-btn-secondary:hover { background: var(--ap-mint); color: var(--ap-brand-hover); }
.ap-btn-ghost { background: #FFFFFF; color: var(--ap-text); border-color: var(--ap-line); }
.ap-btn-ghost:hover { background: var(--ap-canvas); color: var(--ap-ink); }
.ap-btn-disabled, .ap-btn:disabled, .ap-btn[disabled] { background: #E6EBE9; color: var(--ap-border); border-color: transparent; cursor: not-allowed; }
.ap-btn-sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.ap-btn-block { width: 100%; min-height: 48px; }
.ap-link { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ap-brand); display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; font-family: inherit; cursor: pointer; }
.ap-link:hover { color: var(--ap-brand-hover); text-decoration: underline; }
.ap-link[disabled], .ap-link.disabled { color: var(--ap-border); cursor: not-allowed; text-decoration: none; }
.ap-link-erro { color: var(--ap-error); }
.ap-iconbtn { width: 44px; height: 44px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--ap-ink); border: 1px solid transparent; background: transparent; position: relative; cursor: pointer; padding: 0; }
.ap-iconbtn:hover { background: var(--ap-soft); }
.ap-badge-dot { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--ap-error); color: #FFFFFF; font-size: 11px; line-height: 18px; font-weight: 700; text-align: center; }

/* ---------- Card de tarefa ---------- */
.ap-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.ap-card { background: #FFFFFF; border: 1px solid var(--ap-line); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ap-card-wide { grid-column: span 2; }
.ap-card-locked { background: #F9FAF9; }
.ap-card-locked .ap-h2, .ap-card-locked .ap-card-msg { color: var(--ap-muted); }
.ap-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ap-card-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ap-num { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 24px; padding: 0 6px; border-radius: 6px; background: var(--ap-mint); color: var(--ap-ink); font-size: 12px; line-height: 18px; font-weight: 700; letter-spacing: 0.04em; }
.ap-num-locked, .ap-card-locked .ap-num { background: var(--ap-soft); color: var(--ap-muted); }
.ap-base { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; line-height: 18px; color: var(--ap-muted); }
.ap-card-msg { font-size: 14px; line-height: 20px; color: var(--ap-text); }
.ap-card-progress { display: flex; flex-direction: column; gap: 6px; }
.ap-card-progress .ap-small { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ap-card-spacer { flex-grow: 1; }
.ap-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; flex-wrap: wrap; }
.ap-card-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.ap-card-links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ---------- Selo de estado ---------- */
.ap-selo { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; line-height: 18px; font-weight: 600; white-space: nowrap; }
.selo-neutro { background: var(--ap-soft); color: var(--ap-muted); }
.selo-info { background: var(--ap-info-bg); color: var(--ap-info); }
.selo-ok { background: var(--ap-success-bg); color: var(--ap-success); }
.selo-aviso { background: var(--ap-warning-bg); color: var(--ap-warning); }
.selo-erro { background: var(--ap-error-bg); color: var(--ap-error); }
.selo-proc { background: var(--ap-mint); color: var(--ap-brand); }
.selo-proc svg.ap-spin { animation: ap-spin 1.2s linear infinite; }
@keyframes ap-spin { to { transform: rotate(360deg); } }

/* ---------- Alertas em linha ---------- */
.ap-alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: 8px; font-size: 14px; line-height: 20px; border: 1px solid; }
.ap-alert-compact { padding: 8px 12px; }
.alert-info { background: var(--ap-info-bg); color: var(--ap-info); border-color: #C9DCEC; }
.alert-aviso { background: var(--ap-warning-bg); color: var(--ap-warning); border-color: #F1D9AE; }
.alert-erro { background: var(--ap-error-bg); color: var(--ap-error); border-color: #F3C6BF; }
.alert-ok { background: var(--ap-success-bg); color: var(--ap-success); border-color: #BFDFC9; }
.alert-neutro { background: var(--ap-canvas); color: var(--ap-text); border-color: var(--ap-line); }

/* ---------- Formulários ---------- */
.ap-field { display: flex; flex-direction: column; gap: 6px; }
.ap-label { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ap-ink); margin: 0; }
.ap-input { height: 44px; border: 1px solid var(--ap-border); border-radius: 8px; padding: 0 12px; font-family: inherit; font-size: 14px; line-height: 20px; color: var(--ap-text); background: #FFFFFF; width: 100%; display: flex; align-items: center; }
.ap-input-readonly { background: var(--ap-canvas); color: var(--ap-muted); border-color: var(--ap-line); }
.ap-help { font-size: 12px; line-height: 18px; color: var(--ap-muted); }
select.ap-select { height: 44px; border: 1px solid var(--ap-border); border-radius: 8px; padding: 0 40px 0 12px; font-family: inherit; font-size: 14px; line-height: 20px; color: var(--ap-text); background: #FFFFFF url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23142F38' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>") no-repeat right 12px center; font-weight: 500; appearance: none; -webkit-appearance: none; cursor: pointer; min-width: 140px; }
select.ap-select-sm { height: 40px; min-width: 120px; }
.ap-select-wrap { position: relative; display: inline-flex; align-items: center; }
.ap-select-wrap > svg { position: absolute; left: 12px; pointer-events: none; color: var(--ap-ink); }
.ap-select-wrap > select.ap-select { padding-left: 38px; }
.ap-radio { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; color: var(--ap-text); cursor: pointer; margin: 0; }
.ap-radio input[type="radio"] { width: 18px; height: 18px; margin: 0; accent-color: var(--ap-brand); cursor: pointer; }
.ap-radios { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }

/* ---------- Tabela ---------- */
.ap-table-wrap { border: 1px solid var(--ap-line); border-radius: 12px; overflow: auto; }
.ap-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; margin: 0; }
.ap-table th { text-align: left; font-weight: 600; color: var(--ap-muted); font-size: 12px; line-height: 16px; letter-spacing: 0.02em; padding: 10px 12px; border-bottom: 1px solid var(--ap-line); background: var(--ap-canvas); white-space: nowrap; }
.ap-table td { padding: 10px 12px; border-bottom: 1px solid var(--ap-soft); vertical-align: middle; }
.ap-table tbody tr:last-child td { border-bottom: 0; }
.ap-table .r { text-align: right; font-variant-numeric: tabular-nums lining-nums; }
.ap-table tr.hl td { background: var(--ap-mint); font-weight: 600; color: var(--ap-ink); }
.ap-table tr.dim td { color: var(--ap-border); font-style: italic; }
.ap-table tr.recente td { background: #F9FAF9; }
.ap-table-acoes { display: flex; gap: 16px; justify-content: flex-end; white-space: nowrap; }
.ap-table td.num { white-space: nowrap; }
.ap-table td.ap-small { min-width: 180px; }

/* ---------- Progresso ---------- */
.ap-progress { height: 8px; background: var(--ap-soft); border-radius: 999px; overflow: hidden; width: 100%; }
.ap-progress > div { height: 100%; background: var(--ap-brand); border-radius: 999px; transition: width .3s ease; }
.ap-progress-thin { height: 4px; }
.ap-progress.indet > div { width: 40%; animation: ap-indet 1.4s ease-in-out infinite; }
@keyframes ap-indet { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }

/* ---------- Modal (sobre o Bootstrap) ---------- */
.modal-backdrop.show { background: rgba(20,47,56,1); opacity: .45; }
.ap-modal-dialog .modal-content { border-radius: 16px; box-shadow: var(--ap-shadow); border: 1px solid var(--ap-line); padding: 0; overflow: hidden; }
.ap-modal-dialog .modal-header { padding: 20px 24px; border-bottom: 1px solid var(--ap-line); align-items: flex-start; gap: 16px; }
.ap-modal-dialog .modal-title { font-size: 20px; line-height: 28px; font-weight: 600; color: var(--ap-ink); }
.ap-modal-dialog .modal-body { padding: 24px; display: flex; flex-direction: column; gap: 24px; }
.ap-modal-dialog .modal-footer, .ap-modal-foot { padding: 16px 24px; border-top: 1px solid var(--ap-line); display: flex; gap: 12px; justify-content: flex-end; align-items: center; background: #FFFFFF; flex-wrap: wrap; }
.ap-modal-dialog .btn-close { margin: -4px -8px 0 0; }
.ap-modal-dialog .msgModal { margin: 0 !important; }
.ap-modal-dialog form { display: flex; flex-direction: column; gap: 16px; }
.ap-modal-dialog .mb-3 { margin-bottom: 0 !important; }
.ap-modal-dialog .form-control { min-height: 44px; border-color: var(--ap-border); border-radius: 8px; font-size: 14px; }
.ap-modal-dialog .form-control:focus { border-color: var(--ap-brand); box-shadow: 0 0 0 3px rgba(18,108,99,.25); }
.ap-modal-dialog .form-label { font-size: 14px; font-weight: 500; color: var(--ap-ink); margin-bottom: 6px; }
.ap-modal-dialog .btn-primary { background: var(--ap-brand); border-color: var(--ap-brand); font-weight: 600; min-height: 44px; border-radius: 8px; }
.ap-modal-dialog .btn-primary:hover { background: var(--ap-brand-hover); border-color: var(--ap-brand-hover); }
.ap-modal-dialog .btn-outline-secondary { border-radius: 8px; min-height: 44px; }
.ap-modal-dialog .btn:disabled { background: #E6EBE9; border-color: #E6EBE9; color: var(--ap-border); opacity: 1; cursor: not-allowed; }
.ap-modal-head-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex-grow: 1; }
.ap-modal-head-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ap-modal-head-right { display: flex; align-items: center; gap: 12px; }
.ap-section { display: flex; flex-direction: column; gap: 12px; }
.ap-modal-dialog .modal-body > .ap-section + .ap-section { margin-top: 0; }
.ap-two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.ap-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.ap-tile { border: 1px solid var(--ap-line); border-radius: 12px; padding: 16px; background: #FFFFFF; display: flex; flex-direction: column; gap: 2px; }
.ap-tile .v { font-size: 24px; line-height: 32px; font-weight: 600; color: var(--ap-ink); font-variant-numeric: tabular-nums lining-nums; }
.ap-tile .l { font-size: 12px; line-height: 18px; color: var(--ap-muted); }
.ap-tile-ok { border-color: #BFDFC9; } .ap-tile-ok .v { color: var(--ap-success); }
.ap-tile-erro { border-color: #F3C6BF; } .ap-tile-erro .v { color: var(--ap-error); }
.ap-file { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--ap-line); border-radius: 8px; font-size: 14px; line-height: 20px; background: #FFFFFF; flex-wrap: wrap; }
.ap-file-erro { border-color: #F3C6BF; background: var(--ap-error-bg); }
.ap-file-erro .ap-file-motivo, .ap-file-erro .ap-file-icon { color: var(--ap-error); }
.ap-file-neutro .ap-file-motivo, .ap-file-neutro .ap-file-icon { color: var(--ap-muted); }
.ap-file-icon { color: var(--ap-brand); display: inline-flex; }
.ap-file-nome { min-width: 0; flex: 1 1 220px; }
.ap-file-motivo { flex: 1 1 200px; }
.ap-file-info { flex-grow: 1; display: flex; flex-direction: column; min-width: 0; }
.ap-file-list { display: flex; flex-direction: column; gap: 8px; }
.ap-months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; }
.ap-month { display: inline-flex; align-items: center; justify-content: center; height: 32px; padding: 0 6px; border-radius: 8px; background: var(--ap-success-bg); color: var(--ap-success); font-size: 12px; font-weight: 600; border: 1px solid transparent; }
.ap-month.off { background: var(--ap-warning-bg); color: var(--ap-warning); border-color: #F1D9AE; }
.ap-month.na { background: var(--ap-canvas); color: var(--ap-border); }
.ap-kv { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; line-height: 20px; padding: 8px 0; border-bottom: 1px solid var(--ap-soft); }
.ap-kv:last-child { border-bottom: 0; }
.ap-darf { background: var(--ap-ink); color: #FFFFFF; border-radius: 12px; padding: 16px 20px; display: flex; flex-direction: column; gap: 4px; }

/* Menu flutuante (download) */
.ap-menu { background: #FFFFFF; border: 1px solid var(--ap-line); border-radius: 12px; box-shadow: var(--ap-shadow); padding: 8px; display: flex; flex-direction: column; gap: 2px; min-width: 220px; }
.ap-menu-item { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 8px; font-size: 14px; line-height: 20px; color: var(--ap-text); font-weight: 500; text-decoration: none; }
.ap-menu-item:hover { background: var(--ap-canvas); color: var(--ap-ink); text-decoration: none; }
.ap-menu-sep { height: 1px; background: var(--ap-line); margin: 4px 0; }
.ap-menu-head { padding: 8px 12px 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.ap-popover { position: fixed; z-index: 2000; max-width: min(420px, calc(100vw - 32px)); }
.ap-popover .ap-menu-item { flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 12px; }
.ap-popover .ap-mono { font-size: 12px; }
.dropdown-menu.ap-menu { padding: 8px; border-radius: 12px; border-color: var(--ap-line); box-shadow: var(--ap-shadow); }
.dropdown-menu.ap-menu .ap-menu-item { width: 100%; }

/* ---------- Casca: sidebar + topbar ---------- */
.ap-shell { min-height: 100vh; display: flex; }
.ap-sidebar { background: var(--ap-ink); color: #FFFFFF; display: flex; flex-direction: column; padding: 24px 16px; gap: 8px; width: var(--ap-sidebar-w); position: fixed; top: 0; left: 0; bottom: 0; z-index: 1030; overflow-y: auto; }
.ap-sidebar-brand { padding: 4px 12px 20px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ap-sidebar-brand img { height: 26px; width: auto; display: block; }
.ap-sidebar-mobile { display: none; align-items: center; gap: 4px; color: #FFFFFF; }
.ap-sidebar-mobile .ap-iconbtn { color: #FFFFFF; }
.ap-sidebar-mobile .ap-iconbtn:hover { background: rgba(255,255,255,0.12); }
.ap-nav { display: flex; flex-direction: column; gap: 8px; }
.ap-nav-item { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 8px; color: #FFFFFF; font-size: 14px; line-height: 20px; font-weight: 500; background: none; border: 0; font-family: inherit; width: 100%; text-align: left; cursor: pointer; }
.ap-nav-item:hover { background: rgba(255,255,255,0.08); color: #FFFFFF; text-decoration: none; }
.ap-nav-item.active { background: rgba(255,255,255,0.12); }
.ap-nav-count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--ap-mint); color: var(--ap-ink); font-size: 12px; line-height: 22px; font-weight: 700; text-align: center; }
.ap-sidebar-foot { margin-top: auto; padding: 16px 12px; border-top: 1px solid rgba(255,255,255,0.14); display: flex; flex-direction: column; gap: 4px; font-size: 12px; line-height: 18px; color: rgba(255,255,255,0.7); }
.ap-main { flex-grow: 1; display: flex; flex-direction: column; min-width: 0; margin-left: var(--ap-sidebar-w); }
.ap-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--ap-topbar-h); padding: 8px 32px; background: #FFFFFF; border-bottom: 1px solid var(--ap-line); position: sticky; top: 0; z-index: 1020; }
.ap-topbar > .ap-sub { white-space: nowrap; }
.ap-topbar-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.ap-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--ap-mint); color: var(--ap-ink); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.ap-user-btn { gap: 10px; padding: 0 12px 0 8px; max-width: 260px; }
.ap-user-btn .ap-user-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-user-btn::after { display: none; }
.ap-content { padding: 32px; display: flex; flex-direction: column; gap: 24px; }
.ap-page-head { display: flex; flex-direction: column; gap: 6px; }
.ap-only-mobile { display: none !important; }
#msgDash { margin: 0; }
.ap-admin { display: flex; flex-direction: column; gap: 16px; padding-top: 24px; border-top: 1px solid var(--ap-line); }
.ap-admin .ap-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }

/* Zona de arrastar (modal de envio) */
.ap-dropzone { border: 2px dashed var(--ap-border); border-radius: 12px; padding: 28px 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; background: #F9FAF9; text-align: center; transition: background .12s ease, border-color .12s ease; }
.ap-dropzone.over { background: var(--ap-mint); border-color: var(--ap-brand); }
.ap-dropzone-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--ap-mint); color: var(--ap-brand); display: flex; align-items: center; justify-content: center; }
.ap-dropzone label { cursor: pointer; margin: 0; }
.ap-dropzone label a, .ap-dropzone label .ap-fake-link { color: var(--ap-brand); font-weight: 500; text-decoration: underline; }
.ap-upload-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ap-upload-head .excedeu { color: var(--ap-error); font-weight: 600; }
.ap-file .ap-file-rm { width: 32px; height: 32px; color: var(--ap-muted); }
.ap-chip-ano { height: 32px; padding: 0 12px; margin-right: auto; }
.ap-modal-dialog .modal-footer > * { margin: 0; }
.ap-modal-dialog .modal-footer > .ap-chip-ano { margin-right: auto; }

/* Notificações */
.ap-notificacoes { gap: 8px !important; }
.ap-notif { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--ap-line); border-radius: 8px; background: #FFFFFF; }
.ap-notif.nova { background: #F9FAF9; }
.ap-notif-icon { display: inline-flex; color: var(--ap-info); margin-top: 2px; }
.ap-notif-erro .ap-notif-icon { color: var(--ap-error); }
.ap-notif-aviso .ap-notif-icon { color: var(--ap-warning); }
.ap-notif-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex-grow: 1; }
.ap-notif-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; line-height: 20px; }
.ap-modal-dialog .mb-3 > .input-group + .btn, .ap-modal-dialog .mb-3 > .btn + .btn { margin-top: 12px; }

/* Planos */
.ap-planos-table td:first-child { font-weight: 500; color: var(--ap-ink); }
.ap-planos-table td.c { text-align: center; }
.ap-planos-table td.c .sim { color: var(--ap-success); display: inline-flex; }
.ap-planos-table td.c .nao { color: var(--ap-border); }

/* ---------- Fase 3: estado do ano, Meu cadastro e histórico ---------- */
.ap-card-alerta { display: flex; flex-direction: column; gap: 8px; }
/* link dentro de um alerta em linha (ex.: "Cadastre seu CPF em Meu cadastro") */
.ap-alert .ap-alert-link { color: inherit; font: inherit; font-weight: 600; text-decoration: underline; background: none; border: 0; padding: 0; cursor: pointer; }
.ap-alert .ap-alert-link:hover { color: inherit; }
/* campos editáveis com a mesma casca dos campos só leitura (.ap-input) */
input.ap-input { display: block; appearance: none; -webkit-appearance: none; }
input.ap-input::placeholder { color: var(--ap-border); opacity: 1; }
input.ap-input:focus { border-color: var(--ap-brand); }
input.ap-input[readonly], input.ap-input:disabled { background: var(--ap-canvas); color: var(--ap-muted); border-color: var(--ap-line); cursor: not-allowed; opacity: 1; }
input.ap-input.is-invalid { border-color: var(--ap-error); }
/* lista de avisos do resumo: fundo por código (outro_ano, exercicio_sem_premio = atenção) */
.ap-file-aviso { border-color: #F1D9AE; background: var(--ap-warning-bg); }
.ap-file-aviso .ap-file-motivo, .ap-file-aviso .ap-file-icon { color: var(--ap-warning); }
.ap-tile-neutro .v { color: var(--ap-muted); }
/* histórico: envio excluído do ano fica em cinza */
.ap-table tr.excluido td, .ap-table tr.excluido td .ap-small, .ap-table tr.excluido td .ap-muted { color: var(--ap-border); }
.ap-modal-head-right .ap-btn-sm { white-space: nowrap; }
.ap-kv > .ap-strong { text-align: right; }
@media (max-width: 767.98px) {
  .ap-modal-head-right { flex-wrap: wrap; justify-content: flex-end; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 1199.98px) {
  /* com a barra lateral de 240px sobra pouco: uma coluna até o desktop largo */
  .ap-grid { grid-template-columns: 1fr; }
  .ap-card-wide { grid-column: auto; }
}
@media (max-width: 991.98px) {
  .ap-content { padding: 24px; }
  .ap-topbar { padding: 0 24px; }
  .ap-two-col { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
  :root { --ap-sidebar-w: 0px; }
  .ap-only-desktop { display: none !important; }
  .ap-only-mobile { display: flex !important; }
  .ap-sidebar { position: fixed; top: 0; left: 0; right: 0; bottom: auto; width: auto; height: auto; min-height: 56px; padding: 0 16px; gap: 0; overflow: visible; }
  .ap-sidebar-brand { padding: 0; height: 56px; width: 100%; }
  .ap-sidebar-brand img { height: 22px; }
  .ap-sidebar-mobile { display: flex; }
  .ap-nav { display: none; padding: 8px 0 12px 0; width: 100%; }
  .ap-sidebar.open .ap-nav { display: flex; }
  .ap-sidebar-foot { display: none; }
  .ap-sidebar.open .ap-sidebar-foot { display: flex; width: 100%; margin-top: 0; }
  .ap-sidebar { flex-wrap: wrap; }
  .ap-main { margin-left: 0; padding-top: 56px; }
  .ap-topbar { min-height: 56px; padding: 8px 16px; position: static; flex-wrap: wrap; }
  .ap-topbar-right { width: auto; }
  .ap-content { padding: 16px; gap: 16px; }
  .ap-h1 { font-size: 22px; line-height: 28px; }
  .ap-grid { grid-template-columns: 1fr; gap: 16px; }
  .ap-card { padding: 16px; }
  .ap-card-wide { grid-column: auto; }
  .ap-card-top { align-items: flex-start; }
  .ap-card-top .ap-card-selo { order: 3; width: 100%; display: flex; justify-content: flex-start; }
  .ap-card-top .ap-card-selo:empty { display: none; }
  .ap-card-actions { flex-direction: column; align-items: stretch; }
  .ap-card-btns { flex-direction: column; }
  .ap-card-btns .ap-btn { width: 100%; min-height: 48px; }
  .ap-card-links { justify-content: space-between; }
  .ap-months { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .ap-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ap-modal-dialog .modal-body { padding: 16px; gap: 16px; }
  .ap-modal-dialog .modal-header, .ap-modal-dialog .modal-footer, .ap-modal-foot { padding: 16px; }
  .ap-modal-foot .ap-btn { flex: 1 1 auto; min-height: 48px; }
  .ap-chip-ano { width: 100%; margin-right: 0; justify-content: center; }
}
