.results-metrics { margin-top: 24px; }
.results-card { margin-top: 24px; }
.alert-chips { display: flex; flex-wrap: wrap; gap: 9px; margin: 18px 0 22px; }
.alert-chips a { padding: 8px 11px; border: 1px solid transparent; border-radius: 6px; background: #eef3f6; color: #5e6d80; font-size: .78rem; }
.alert-chips a:hover,.alert-chips a.active { border-color: #142845; background: #e4ebf2; color: #142845; }
.alert-chips strong { color: #142845; margin-right: 3px; }
.alert-filters { display: grid; grid-template-columns: 1fr 1.35fr .8fr 1.5fr .55fr; gap: 12px; align-items: end; padding: 18px; margin: 0 0 14px; border: 1px solid rgba(20,40,69,.12); border-radius: 8px; background: #f7f9fb; }
.alert-filters label span { display: block; margin-bottom: 6px; color: #354760; font-size: .72rem; font-weight: 750; }
.alert-filters select,.alert-filters input { width: 100%; min-height: 41px; padding: 9px 10px; border: 1px solid #cbd4df; border-radius: 6px; background: #fff; color: #142845; }
.filter-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 9px; }
.alert-results-summary { margin: 15px 0 10px; color: #5e6d80; font-size: .82rem; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 20px; }
.pagination a,.pagination span { min-width: 36px; padding: 8px 10px; border: 1px solid #d5dde6; border-radius: 6px; color: #354760; font-size: .8rem; text-align: center; }
.pagination a:hover,.pagination a.active { border-color: #142845; background: #142845; color: #fff; }
@media (max-width: 1050px) { .alert-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } .filter-page-size { max-width: 160px; } }
@media (max-width: 650px) { .alert-filters { grid-template-columns: 1fr; } .filter-actions { grid-column: auto; justify-content: stretch; } .filter-actions > * { flex: 1; } }

/* Navegação lateral */
.sidebar-nav { display: grid; gap: 7px; }
.sidebar .sidebar-nav .nav-item {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 7px;
  color: #e8edf4;
  font-size: .9rem;
  font-weight: 650;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}
.sidebar .sidebar-nav .nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, .075);
  transform: translateX(2px);
}
.sidebar .sidebar-nav .nav-item.active {
  color: #fff;
  background: rgba(167, 185, 215, .19);
  box-shadow: inset 3px 0 0 #79bfff;
}
.nav-item svg,
.logout-button svg {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  fill: none;
  stroke: #79bfff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-section-label {
  margin: 20px 14px 3px;
  color: #8594a8;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.logout-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #cdd6e2;
  font-size: .82rem;
  text-align: left;
}
.logout-button:hover { color: #fff; }
.logout-button svg { width: 18px; height: 18px; flex-basis: 18px; }
.field-error { display: block; margin-top: 6px; color: #a82b32; font-size: .75rem; font-weight: 600; }
.field-help { display: block; margin-top: 6px; color: #718095; font-size: .73rem; font-weight: 400; }
.toggle-row { display: flex; align-items: center; gap: 9px; padding: 12px 0; }
.toggle-row input { width: 17px; height: 17px; accent-color: #142845; }
.list-card { padding: 12px 20px 20px; }
.actions-column { width: 90px; text-align: right; }
td:last-child { text-align: right; }
.table-action { display: inline-flex; padding: 7px 11px; border: 1px solid rgba(20,40,69,.16); border-radius: 6px; font-size: .78rem; font-weight: 700; }
.table-action:hover { background: #eef3f6; }
.selected-files-message { display: block; margin-top: 9px; color: #23734d; font-size: .78rem; }
.processing-checklist { display: grid; gap: 9px; margin: 18px 0; }
.processing-checklist > div { display: flex; align-items: center; gap: 11px; padding: 11px; border-radius: 7px; border: 1px solid rgba(20,40,69,.12); }
.processing-checklist > div > span { display: grid; place-items: center; width: 24px; height: 24px; flex: 0 0 24px; border-radius: 50%; font-weight: 800; }
.processing-checklist .ready { background: #edf8f2; }
.processing-checklist .ready > span { background: #23734d; color: #fff; }
.processing-checklist .missing { background: #fff6e9; }
.processing-checklist .missing > span { background: #b66a10; color: #fff; }
.processing-checklist strong,.processing-checklist small { display: block; }
.processing-checklist small { margin-top: 2px; color: #5e6d80; }
.process-blocked { color: #9a5b0d !important; }
.modal-backdrop[hidden] { display: none; }
.modal-backdrop { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; background: rgba(5, 16, 31, .62); backdrop-filter: blur(3px); }
.confirmation-modal { width: min(470px, 100%); padding: 30px; border-radius: 10px; background: #fff; box-shadow: 0 28px 80px rgba(5,16,31,.3); }
.confirmation-modal h2 { margin: 14px 0 8px; font-size: 1.25rem; }
.confirmation-modal p { color: #5e6d80; line-height: 1.6; }
.modal-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #fff0db; color: #a85d09; font-weight: 800; font-size: 1.15rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 25px; }
.loading-backdrop[hidden] { display: none; }
.loading-backdrop { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 20px; background: rgba(5,16,31,.68); backdrop-filter: blur(3px); }
.loading-panel { width: min(390px, 100%); display: grid; justify-items: center; gap: 9px; padding: 32px 28px; border-radius: 10px; background: #fff; color: #172233; box-shadow: 0 28px 80px rgba(5,16,31,.35); text-align: center; }
.loading-panel strong { margin-top: 6px; font-size: 1.08rem; }
.loading-panel span { color: #5e6d80; font-size: .84rem; line-height: 1.5; }
.loading-spinner { width: 42px; height: 42px; border: 4px solid #dce5ed; border-top-color: #142845; border-radius: 50%; animation: loading-spin .8s linear infinite; }
@keyframes loading-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loading-spinner { animation-duration: 1.8s; } }
.compact-alert-grid th,.compact-alert-grid td { padding-top: 11px; padding-bottom: 11px; vertical-align: top; }
.compact-alert-grid th:first-child { width: 36%; }
.compact-alert-grid th:nth-child(2) { width: 64%; }
.alert-details summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.alert-details summary::-webkit-details-marker { display: none; }
.alert-details summary > small { flex: 0 0 auto; margin: 0; color: #1b3a5d; font-weight: 700; }
.field-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.field-tags > span { padding: 5px 8px; border-radius: 5px; background: #eef3f6; color: #354760; font-size: .7rem; font-weight: 700; }
.comparison-details { display: grid; gap: 8px; margin-top: 12px; padding: 12px; border-left: 3px solid #79bfff; background: #f7f9fb; }
.comparison-row { display: grid; grid-template-columns: minmax(120px,.7fr) 2fr; gap: 12px; align-items: start; }
.comparison-row > strong { font-size: .76rem; }
.comparison-row dl { display: grid; grid-template-columns: repeat(3,minmax(90px,1fr)); gap: 8px; margin: 0; }
.comparison-row dl > div { padding: 7px 9px; border-radius: 5px; background: #fff; }
.comparison-row dt { color: #718095; font-size: .64rem; font-weight: 800; }
.comparison-row dd { margin: 3px 0 0; color: #172233; font-size: .78rem; overflow-wrap: anywhere; }
.comparison-row p { margin: 0; color: #354760; font-size: .78rem; line-height: 1.45; }
.comparison-row p small { display: block; }
@media (max-width: 760px) { .comparison-row { grid-template-columns: 1fr; } .comparison-row dl { grid-template-columns: 1fr; } }

/* Aparência */
.theme-control { display: grid; gap: 7px; margin: 0 0 14px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.13); }
.theme-control > span { color: #aeb9c7; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.theme-options { display: grid; grid-template-columns: repeat(3,1fr); gap: 3px; padding: 3px; border-radius: 6px; background: rgba(255,255,255,.07); }
.theme-options button { min-width: 0; padding: 6px 3px; border: 0; border-radius: 4px; background: transparent; color: #aeb9c7; font: 600 .63rem Inter,sans-serif; cursor: pointer; }
.theme-options button:hover { color: #fff; }
.theme-options button.active { background: #fff; color: #142845; }

html[data-theme="dark"] { color-scheme: dark; --background: #0d1725; --surface: #142132; --text: #edf3f8; --muted: #9eacbc; --border: rgba(205,220,235,.15); --primary: #7db8ee; --primary-light: #a8d2f6; --header: #08111e; --danger: #f18489; --warning: #eab66d; --success: #72c99d; --shadow: 0 18px 44px rgba(0,0,0,.22); }
html[data-theme="dark"],html[data-theme="dark"] body { background: var(--background); color: var(--text); }
html[data-theme="dark"] a { color: var(--primary-light); }
html[data-theme="dark"] .card,
html[data-theme="dark"] .metric,
html[data-theme="dark"] .confirmation-modal,
html[data-theme="dark"] .loading-panel { background: var(--surface); color: var(--text); }
html[data-theme="dark"] .button-primary { background: #315f8b; color: #fff; }
html[data-theme="dark"] .button-primary:hover { background: #3d72a4; }
html[data-theme="dark"] .button-secondary,
html[data-theme="dark"] .button-danger { background: transparent; }
html[data-theme="dark"] .field,
html[data-theme="dark"] .alert-filters select,
html[data-theme="dark"] .alert-filters input { border-color: var(--border); background: #0f1b2a; color: var(--text); }
html[data-theme="dark"] .upload-box,
html[data-theme="dark"] .alert-filters,
html[data-theme="dark"] .comparison-details { background: #101c2b; }
html[data-theme="dark"] .processing-checklist .ready { background: #143327; }
html[data-theme="dark"] .processing-checklist .missing { background: #372918; }
html[data-theme="dark"] .processing-checklist > div { border-color: var(--border); }
html[data-theme="dark"] .alert-chips a,
html[data-theme="dark"] .field-tags > span,
html[data-theme="dark"] .status { background: #233247; color: #cbd7e3; }
html[data-theme="dark"] .alert-chips a strong { color: #dceafa; }
html[data-theme="dark"] .alert-chips a:hover,
html[data-theme="dark"] .alert-chips a.active { border-color: #79bfff; background: #293c54; color: #fff; }
html[data-theme="dark"] .comparison-row dl > div { background: #172638; }
html[data-theme="dark"] .comparison-row dd,
html[data-theme="dark"] .comparison-row p { color: #e4edf5; }
html[data-theme="dark"] .pagination a,
html[data-theme="dark"] .pagination span { border-color: var(--border); color: #bdc9d5; }
html[data-theme="dark"] .pagination a:hover,
html[data-theme="dark"] .pagination a.active { background: #315f8b; color: #fff; }
html[data-theme="dark"] .flash { background: #233247; }
html[data-theme="dark"] .flash-danger { background: #3b2028; color: #ffabb0; }
html[data-theme="dark"] .flash-warning { background: #382b1a; color: #f2c989; }
html[data-theme="dark"] .flash-success { background: #163429; color: #8cddb1; }
html[data-theme="dark"] th { color: #aebbc9; }
html[data-theme="dark"] td small { color: var(--muted); }
.dashboard-action { width: 185px; text-align: right; }
.dashboard-action .button { min-width: 160px; gap: 8px; white-space: nowrap; }
.dashboard-action .button span { font-size: 1rem; transition: transform .18s ease; }
.dashboard-action .button:hover span { transform: translateX(3px); }
.dashboard-filters { display: grid; grid-template-columns: 1.25fr .75fr .8fr 1.25fr auto; gap: 12px; align-items: end; margin-bottom: 18px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.dashboard-filters label > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: .72rem; }
.dashboard-filters select,.dashboard-filters input { width: 100%; min-height: 41px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text); font: inherit; }
.dashboard-filter-actions { display: flex; gap: 8px; }
html[data-theme="dark"] .dashboard-filters select,html[data-theme="dark"] .dashboard-filters input { background: #0f1b2a; color: var(--text); }
@media (max-width: 1100px) { .dashboard-filters { grid-template-columns: repeat(2,minmax(0,1fr)); } .dashboard-filter-actions { grid-column: 1 / -1; justify-content: flex-end; } }
@media (max-width: 650px) { .dashboard-filters { grid-template-columns: 1fr; } .dashboard-filter-actions { grid-column: auto; } }
