/* ─────────────────────────────────────────────────────────────────────────────
   OMEGA ESG PLATFORM — Design System Omega Light
   Azul Petróleo Principal: #0F363F  |  Fundo: #F5F5F5  |  Texto: #0C2127
───────────────────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Jost:wght@300;400;500;600;700&display=swap');

:root {
  --petrol-1:   #0F363F;
  --petrol-2:   #144E5B;
  --petrol-3:   #186077;
  --petrol-4:   #1D7192;

  --bg-body:    #F5F5F5;
  --bg-white:   #FFFFFF;
  --bg-sidebar: #0F363F;
  --bg-topbar:  #0F363F;

  --text-primary:       #0C2127;
  --text-secondary:     #2A5A68;
  --text-muted:         #7A9BA5;
  --text-sidebar:       #E8F4F7;
  --text-sidebar-muted: rgba(232,244,247,0.45);
  --text-sidebar-hover: #FFFFFF;

  --border:        #DCDEDF;
  --border-active: #1D7192;

  --shadow-sm:   0 1px 4px rgba(15,54,63,0.06);
  --shadow-card: 0 2px 12px rgba(15,54,63,0.08);
  --shadow-card-hover: 0 6px 24px rgba(15,54,63,0.13);
  --shadow-btn:  0 2px 8px rgba(15,54,63,0.20);

  --sidebar-width:  260px;
  --topbar-height:  60px;
  --radius-card:    16px;
  --radius-btn:     100px;
  --radius-input:   8px;
  --transition:     0.18s ease;
}

/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Futura PT', 'Jost', system-ui, sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-body);
  overflow-x: hidden;
}

a { color: var(--petrol-4); text-decoration: none; }
a:hover { color: var(--petrol-3); }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--petrol-4); }

/* ── SIDEBAR ──────────────────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform var(--transition);
  overflow: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  min-height: var(--topbar-height);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.sidebar-logo {
  max-width: 130px;
  max-height: 38px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.brand-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-sidebar);
  letter-spacing: 0.5px;
  line-height: 1.2;
  text-transform: uppercase;
}

.brand-sub {
  font-size: 0.65rem;
  color: var(--text-sidebar-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.sidebar-divider {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 0.25rem 0;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 0;
}

.sidebar-nav ul { list-style: none; padding: 0; margin: 0; }

.sidebar-section {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-sidebar-muted);
  padding: 1rem 1.25rem 0.35rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 1.25rem;
  color: rgba(232,244,247,0.7);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.2px;
  border-radius: 0;
  transition: all var(--transition);
  border-left: 2px solid transparent;
}

.sidebar-link:hover {
  color: var(--text-sidebar-hover);
  background: rgba(255,255,255,0.07);
  border-left-color: rgba(255,255,255,0.3);
}

.sidebar-link.active {
  color: #FFFFFF;
  background: rgba(29,113,146,0.25);
  border-left-color: var(--petrol-4);
  font-weight: 600;
}

.sidebar-link i { font-size: 1rem; min-width: 18px; opacity: 0.85; }
.sidebar-link.active i { opacity: 1; }
.sidebar-link span { flex: 1; }

.sidebar-footer {
  padding: 0.85rem 1.1rem;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-info { display: flex; align-items: center; gap: 0.6rem; flex: 1; overflow: hidden; }

.user-avatar {
  width: 34px; height: 34px; min-width: 34px;
  background: rgba(29,113,146,0.4);
  border: 1.5px solid rgba(29,113,146,0.6);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem; color: #E8F4F7;
  font-family: 'Jost', sans-serif;
}

.user-details { overflow: hidden; }
.user-name {
  font-size: 0.78rem; font-weight: 600;
  color: var(--text-sidebar);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-role { font-size: 0.65rem; color: var(--text-sidebar-muted); white-space: nowrap; }

.btn-logout {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border-radius: 6px;
  color: var(--text-sidebar-muted);
  transition: all var(--transition);
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
}
.btn-logout:hover { color: #f87171; border-color: rgba(248,113,113,0.4); background: rgba(248,113,113,0.1); }

/* ── MAIN WRAPPER ─────────────────────────────────────────────────────────── */
.main-wrapper {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  padding-top: var(--topbar-height);
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition);
}

/* ── TOPBAR ───────────────────────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  z-index: 900;
  height: var(--topbar-height);
  background: var(--bg-topbar);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  transition: left var(--transition);
}

.btn-toggle-sidebar {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.7);
  width: 36px; height: 36px;
  border-radius: var(--radius-input);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition);
}
.btn-toggle-sidebar:hover { color: #fff; border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.06); }

.breadcrumb { font-size: 0.78rem; }
.breadcrumb-item a { color: rgba(255,255,255,0.55); }
.breadcrumb-item a:hover { color: #fff; }
.breadcrumb-item.active { color: rgba(255,255,255,0.9); font-weight: 500; }
.breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.25); }

.topbar-date { font-size: 0.78rem; color: rgba(255,255,255,0.55); }
.topbar-user { display: flex; align-items: center; gap: 0.5rem; color: rgba(255,255,255,0.9); }
.user-avatar-sm {
  width: 30px; height: 30px;
  background: var(--petrol-4);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.72rem; color: white;
}

/* ── PAGE CONTENT ─────────────────────────────────────────────────────────── */
.page-content { flex: 1; padding-top: 0.5rem; }

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  padding: 1.25rem 0 1rem;
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.2rem;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.page-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.page-actions { display: flex; gap: 0.5rem; flex-shrink: 0; align-items: center; }

/* ── CARDS ────────────────────────────────────────────────────────────────── */

.score-card, .kpi-card, .chart-card, .table-card, .meta-card,
.doc-card, .proj-card, .filter-bar, .relat-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), transform var(--transition);
}

/* Score Cards */
.score-card {
  padding: 1.25rem;
}
.score-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }

.score-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.score-value {
  font-size: 2rem; font-weight: 800;
  color: var(--petrol-1); line-height: 1;
  margin-bottom: 0.5rem;
}
.score-bar {
  height: 5px;
  background: var(--bg-body);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.3rem;
}
.score-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--petrol-4), var(--petrol-3));
  border-radius: 3px;
  transition: width 1.2s ease;
}
.score-sublabel { font-size: 0.7rem; color: var(--text-muted); }
.score-esg .score-value { color: var(--petrol-1); }

/* KPI Cards */
.kpi-card {
  padding: 1.25rem 1rem;
  text-align: center;
}
.kpi-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.kpi-card.kpi-danger  { border-color: #FCA5A5; }
.kpi-card.kpi-warning { border-color: #FCD34D; }
.kpi-clickable { cursor: pointer; }
.kpi-clickable:focus-visible { outline: 2px solid var(--petrol-4); outline-offset: 2px; }
.kpi-icon {
  font-size: 1.3rem; margin-bottom: 0.5rem;
  color: var(--petrol-4);
}
.kpi-value { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); line-height: 1.1; }
.kpi-label {
  font-size: 0.67rem; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-muted); margin-top: 0.25rem;
}

/* Chart Cards */
.chart-card { overflow: hidden; }
.chart-header {
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.chart-title {
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.8px; text-transform: uppercase;
  color: var(--text-primary); margin: 0;
}
.chart-body { padding: 1.25rem; }

/* Table Card */
.table-card { overflow: hidden; }
.table-card .table { margin: 0; }

/* Meta Cards */
.meta-card { overflow: hidden; }
.meta-card:hover { box-shadow: var(--shadow-card-hover); }
.meta-card-header {
  padding: 1rem 1.1rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.meta-card-body { padding: 0.85rem 1.1rem; }
.meta-card-footer {
  padding: 0.6rem 1.1rem;
  border-top: 1px solid var(--border);
  display: flex; align-items: center;
  background: var(--bg-body);
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}
.meta-metric { text-align: center; }
.meta-metric-label {
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-muted);
}
.meta-metric-value { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); }

/* Document Cards */
.doc-card {
  padding: 1rem;
  display: flex; flex-direction: column; gap: 0.5rem; height: 100%;
}
.doc-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.doc-icon { text-align: center; font-size: 1.75rem; padding: 0.4rem 0; color: var(--petrol-4); }
.doc-name {
  font-size: 0.83rem; font-weight: 600; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.doc-meta { margin-top: 0.2rem; }
.doc-actions {
  margin-top: auto; padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 0.25rem;
}

/* Projetos Sociais */
.proj-card { padding: 1rem; }
.proj-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }

/* Relatórios */
.modulo-option {
  background: var(--bg-body);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-input);
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
}
.modulo-option:hover, .modulo-option.selected {
  background: #EDF4F7;
  border-color: var(--petrol-4);
}
.modulo-icon { font-size: 1.1rem; color: var(--petrol-4); }

.format-btn {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-input);
  padding: 0.75rem 1.25rem;
  text-align: center; cursor: pointer; flex: 1;
  transition: all var(--transition);
  color: var(--text-muted);
  font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}
.format-btn:hover, .format-btn.selected {
  border-color: var(--petrol-4);
  background: #EDF4F7;
  color: var(--petrol-1);
}

.relat-card {
  padding: 0.85rem;
}
.relat-card:hover { box-shadow: var(--shadow-card-hover); }
.relat-icon { min-width: 40px; color: var(--petrol-4); }

/* Filter Bar */
.filter-bar { padding: 0.85rem 1.1rem; }

/* Upload Zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-card);
  padding: 2rem;
  text-align: center; cursor: pointer;
  transition: all var(--transition);
  color: var(--text-muted);
  background: var(--bg-body);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--petrol-4);
  background: #EDF4F7;
}

/* ── TABLES ───────────────────────────────────────────────────────────────── */
.table {
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--border);
  --bs-table-hover-bg: #F0F7FA;
  font-size: 0.82rem;
  color: var(--text-primary);
}

.table thead th {
  background: var(--bg-body);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  border-color: var(--border);
  padding: 0.75rem 1rem;
}

.table td {
  padding: 0.7rem 1rem;
  vertical-align: middle;
  color: var(--text-secondary);
  border-color: var(--border);
}

.table tbody tr:hover td { color: var(--text-primary); background: #F0F7FA; }

/* Manter compatibilidade com .table-dark (agora é claro) */
.table-dark {
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--border);
  --bs-table-hover-bg: #F0F7FA;
  --bs-table-color: var(--text-primary);
}
.table-dark thead th {
  background: var(--bg-body) !important;
  color: var(--text-muted) !important;
  border-color: var(--border) !important;
}
.table-dark td { color: var(--text-secondary) !important; border-color: var(--border) !important; }
.table-dark tbody tr:hover td { color: var(--text-primary) !important; background: #F0F7FA; }

/* DataTables */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  background: var(--bg-white) !important;
  border: 1.5px solid var(--border) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-input);
  padding: 0.3rem 0.6rem;
}
.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
  border-color: var(--petrol-4) !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(29,113,146,0.1) !important;
}
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate .paginate_button {
  color: var(--text-muted) !important;
  font-size: 0.78rem;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: #EDF4F7 !important;
  color: var(--petrol-1) !important;
  border-color: var(--petrol-4) !important;
  border-radius: 6px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--petrol-1) !important;
  color: white !important;
  border-color: var(--petrol-1) !important;
  border-radius: 6px;
}

/* ── FORMS ────────────────────────────────────────────────────────────────── */
.form-control, .form-select,
.form-control-dark {
  background: var(--bg-white) !important;
  border: 1.5px solid var(--border) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-input) !important;
  font-size: 0.85rem;
  transition: all var(--transition);
}
.form-control:focus, .form-select:focus,
.form-control-dark:focus {
  border-color: var(--petrol-4) !important;
  box-shadow: 0 0 0 3px rgba(29,113,146,0.1) !important;
}
.form-control::placeholder, .form-control-dark::placeholder {
  color: var(--text-muted) !important;
}
select.form-select option, select.form-control-dark option {
  background: var(--bg-white);
  color: var(--text-primary);
}
.form-label {
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.8px; text-transform: uppercase;
  color: var(--text-secondary); margin-bottom: 0.4rem;
}
.form-text { font-size: 0.75rem; color: var(--text-muted); }

/* ── TABS ─────────────────────────────────────────────────────────────────── */
.nav-tabs-custom {
  border-bottom: 1.5px solid var(--border);
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 0;
}
.nav-tabs-custom .nav-link {
  background: transparent;
  border: none; border-bottom: 2px solid transparent;
  color: var(--text-muted);
  padding: 0.6rem 1rem;
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.6px; text-transform: uppercase;
  border-radius: 0;
  transition: all var(--transition);
  cursor: pointer;
  margin-bottom: -1.5px;
}
.nav-tabs-custom .nav-link:hover { color: var(--petrol-4); }
.nav-tabs-custom .nav-link.active {
  color: var(--petrol-1);
  border-bottom-color: var(--petrol-1);
  font-weight: 700;
}

/* ── MODALS ───────────────────────────────────────────────────────────────── */
.modal-content {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: 0 20px 60px rgba(15,54,63,0.15);
}
.modal-header {
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 1.5rem;
}
.modal-title { font-size: 0.9rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-primary); }
.modal-body { padding: 1.5rem; }
.modal-footer {
  border-top: 1px solid var(--border);
  padding: 0.9rem 1.5rem;
}
.modal-backdrop.show { opacity: 0.4; }
.btn-close { filter: none; opacity: 0.5; }
.btn-close:hover { opacity: 1; }

/* Alias para compatibilidade */
.bg-dark-card { background: var(--bg-white) !important; }
.border-primary-dim { border-color: var(--border) !important; }

/* Labels dentro de modais */
.modal-content .form-label { color: var(--text-secondary) !important; }
.modal-content .form-text  { color: var(--text-muted) !important; }
.modal-content .text-muted { color: var(--text-muted) !important; }
.modal-content hr { border-color: var(--border) !important; }

/* ── BUTTONS ──────────────────────────────────────────────────────────────── */
.btn {
  border-radius: var(--radius-btn);
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  font-size: 0.75rem;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--petrol-1);
  border-color: var(--petrol-1);
  color: white;
}
.btn-primary:hover {
  background: var(--petrol-2);
  border-color: var(--petrol-2);
  box-shadow: var(--shadow-btn);
}

.btn-secondary {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
}
.btn-secondary:hover {
  background: var(--bg-body);
  border-color: var(--petrol-4);
  color: var(--petrol-1);
}

.btn-outline-primary {
  border: 1.5px solid var(--petrol-4) !important;
  color: var(--petrol-4) !important;
}
.btn-outline-primary:hover {
  background: var(--petrol-1) !important;
  color: white !important;
}

.btn-outline-secondary {
  border: 1.5px solid var(--border) !important;
  color: var(--text-muted) !important;
}
.btn-outline-secondary:hover {
  background: var(--bg-body) !important;
  border-color: var(--petrol-4) !important;
  color: var(--petrol-1) !important;
}

.btn-outline-danger  { border-radius: var(--radius-btn) !important; }
.btn-outline-success { border-radius: var(--radius-btn) !important; }
.btn-outline-warning { border-radius: var(--radius-btn) !important; }
.btn-outline-info    { border-radius: var(--radius-btn) !important; }

.btn-xs {
  padding: 0.25rem 0.6rem;
  font-size: 0.68rem;
}

/* ── BADGES ───────────────────────────────────────────────────────────────── */
.badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: 100px;
  padding: 0.3em 0.65em;
}

.bg-success { background-color: #D1FAE5 !important; color: #065F46 !important; }
.bg-danger  { background-color: #FEE2E2 !important; color: #991B1B !important; }
.bg-warning { background-color: #FEF3C7 !important; color: #92400E !important; }
.bg-info    { background-color: #DBEAFE !important; color: #1E40AF !important; }
.bg-primary { background-color: #EDF4F7 !important; color: var(--petrol-1) !important; }
.bg-secondary { background-color: #F3F4F6 !important; color: #4B5563 !important; }
.bg-dark    { background-color: var(--petrol-1) !important; color: white !important; }

/* ── ALERTS ───────────────────────────────────────────────────────────────── */
.alert {
  border-radius: var(--radius-input);
  border-left: 3px solid;
  font-size: 0.85rem;
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.alert-success { border-left-color: #10B981; color: #065F46; }
.alert-danger  { border-left-color: #EF4444; color: #991B1B; }
.alert-warning { border-left-color: #F59E0B; color: #92400E; }
.alert-info    { border-left-color: var(--petrol-4); color: var(--petrol-1); }

/* ── NOTIFICAÇÕES ─────────────────────────────────────────────────────────── */
.notif-bell {
  position: relative;
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.7);
  width: 36px; height: 36px;
  border-radius: var(--radius-input);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition);
}
.notif-bell:hover { color: #fff; border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.06); }
.notif-bell.notif-ok { color: rgba(255,255,255,0.45); }

.notif-badge {
  position: absolute;
  top: -5px; right: -5px;
  background: #EF4444;
  color: #fff;
  font-size: 0.58rem; font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.notif-dropdown {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  min-width: 310px;
  box-shadow: 0 8px 30px rgba(15,54,63,0.12);
  padding: 0; overflow: hidden;
}
.notif-header {
  padding: 0.65rem 1rem;
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--bg-body);
  list-style: none;
}
.notif-item {
  display: flex !important;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem !important;
  color: var(--text-primary) !important;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.notif-item:hover { background: var(--bg-body) !important; }
.notif-item.notif-warning { border-left: 3px solid #F59E0B; }
.notif-item.notif-danger  { border-left: 3px solid #EF4444; }
.notif-item.notif-info    { border-left: 3px solid var(--petrol-4); }
.notif-item:last-child { border-bottom: none; }

/* ── PAGINAÇÃO ────────────────────────────────────────────────────────────── */
.page-link {
  background: var(--bg-white);
  border-color: var(--border);
  color: var(--text-secondary);
  font-size: 0.8rem;
  border-radius: var(--radius-btn) !important;
}
.page-link:hover { background: #EDF4F7; color: var(--petrol-1); border-color: var(--petrol-4); }
.page-item.active .page-link { background: var(--petrol-1); border-color: var(--petrol-1); }
.page-item.disabled .page-link { background: transparent; color: var(--text-muted); }

/* ── UTILITIES ────────────────────────────────────────────────────────────── */
.text-sm    { font-size: 0.78rem; }
.text-xs    { font-size: 0.7rem; }
.flash-container { min-height: 0; }

/* Overline label */
.overline {
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--text-muted);
}

/* Divisor com texto */
.divider-text {
  display: flex; align-items: center; gap: 0.75rem; color: var(--text-muted);
  font-size: 0.7rem; letter-spacing: 1px; text-transform: uppercase;
}
.divider-text::before, .divider-text::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* Pill status */
.pill {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase;
}
.pill-success { background: #D1FAE5; color: #065F46; }
.pill-danger  { background: #FEE2E2; color: #991B1B; }
.pill-warning { background: #FEF3C7; color: #92400E; }
.pill-info    { background: #DBEAFE; color: #1E40AF; }
.pill-neutral { background: var(--bg-body); color: var(--text-muted); border: 1px solid var(--border); }

/* ── INSTALL PWA BUTTON ───────────────────────────────────────────────────── */
.btn-install-pwa {
  border-radius: var(--radius-btn) !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  border-color: rgba(255,255,255,0.4) !important;
  color: rgba(255,255,255,0.85) !important;
}
.btn-install-pwa:hover {
  background: rgba(255,255,255,0.1) !important;
  border-color: rgba(255,255,255,0.7) !important;
  color: #fff !important;
}

/* ── RESPONSIVE ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 30px rgba(15,54,63,0.15);
  }
  .main-wrapper { margin-left: 0; }
  .page-header { flex-direction: column; gap: 0.75rem; }
  .topbar { padding: 0 1rem; left: 0; }
}

@media (max-width: 576px) {
  .kpi-value { font-size: 1.2rem; }
  .score-value { font-size: 1.6rem; }
  .page-title { font-size: 1rem; }
}
