/* ============================================================
   layout.css — Hórus Design System — Telas Internas
   SITES Manual de Marca 2022 — OMNI-PROD
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0');

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  /* Paleta de marca */
  --brand-red:        #EB0045;
  --brand-red-80:     #EF3367;
  --brand-red-10:     #FDE6E7;
  --brand-blue:       #003E52;
  --brand-blue-80:    #336574;
  --brand-blue-10:    #E6ECEE;
  --brand-gray:       #C1C5C8;
  --brand-gray-dark:  #7A8084;
  --brand-gray-light: #F0F2F3;
  --white:            #FFFFFF;
  --black:            #0D1117;
  --surface:          #F4F6F8;
  --border:           #E4E7EA;

  /* Texto */
  --text-main:  #1A202C;
  --text-muted: #64748B;

  /* Semânticos */
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-error:   #EF4444;

  /* Tipografia — escala */
  --font-family: 'Outfit', sans-serif;
  --text-xs:     0.72rem;
  --text-sm:     0.80rem;
  --text-base:   0.875rem;
  --text-md:     1rem;
  --text-lg:     1.125rem;
  --text-xl:     1.25rem;
  --text-2xl:    1.5rem;
  --text-3xl:    2rem;

  /* Layout */
  --sidebar-width:           220px;
  --sidebar-collapsed-width:  60px;
  --topbar-height:            56px;

  /* Formas */
  --radius-sm:   6px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-pill: 999px;

  /* Sombras */
  --shadow-sm:  0 1px 4px rgba(0, 62, 82, 0.06);
  --shadow-md:  0 4px 16px rgba(0, 62, 82, 0.10);
  --shadow-lg:  0 8px 32px rgba(0, 62, 82, 0.15);
  --shadow-red: 0 4px 16px rgba(235, 0, 69, 0.25);

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset mínimo ────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background: var(--surface);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* ── App Layout ──────────────────────────────────────────────── */
.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: linear-gradient(180deg, #003E52 0%, #002a38 100%);
  color: var(--white);
  display: flex;
  flex-direction: column;
  transition: width 0.25s ease, min-width 0.25s ease;
  z-index: 10;
  position: relative;
  flex-shrink: 0;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
  min-width: var(--sidebar-collapsed-width);
}

/* Header / Marca */
.sidebar-header {
  height: var(--topbar-height);
  padding: 0 14px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}

.sidebar-brand-logo {
  height: 28px;
  width: 28px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.10);
  padding: 4px;
}

.sidebar-brand-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  max-width: 150px;
  transition: max-width 0.25s ease, opacity 0.2s ease;
  letter-spacing: 0.3px;
}

.sidebar.collapsed .sidebar-brand-name {
  max-width: 0;
  opacity: 0;
}

/* Navegação */
.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

.nav-section-label {
  padding: 10px 10px 4px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.28);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  white-space: nowrap;
  overflow: hidden;
  max-width: 200px;
  transition: max-width 0.25s ease, opacity 0.2s ease;
}

.sidebar.collapsed .nav-section-label {
  max-width: 0;
  opacity: 0;
  padding: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  color: rgba(255, 255, 255, 0.58);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: 500;
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
  position: relative;
  cursor: pointer;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.nav-item.active {
  background: var(--brand-red);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(235, 0, 69, 0.28);
}

.nav-item.active:hover {
  background: #d1003d;
}

.nav-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
}

.nav-label {
  white-space: nowrap;
  overflow: hidden;
  max-width: 160px;
  transition: max-width 0.25s ease, opacity 0.2s ease;
}

.sidebar.collapsed .nav-label {
  max-width: 0;
  opacity: 0;
}

/* Tooltip no estado colapsado */
.sidebar.collapsed .nav-item::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--black);
  color: var(--white);
  padding: 5px 12px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 9999;
  box-shadow: var(--shadow-md);
}

.sidebar.collapsed .nav-item:hover::after {
  opacity: 1;
}

/* Wrapper do item admin (controlado por auth.js via #nav-admin) */
#nav-admin {
  display: none;
}

/* Footer com info do usuário */
.sidebar-footer {
  padding: 10px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.sidebar-user-avatar {
  font-size: 26px;
  color: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
  line-height: 1;
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  max-width: 130px;
  transition: max-width 0.25s ease, opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-user-info {
  max-width: 0;
  opacity: 0;
}

.sidebar-user-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.38);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.sidebar-logout-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, color 0.18s;
  flex-shrink: 0;
}

.sidebar-logout-btn:hover {
  background: rgba(235, 0, 69, 0.15);
  color: var(--brand-red);
}

.sidebar-logout-btn .material-symbols-outlined {
  font-size: 20px;
}

/* ═══════════════════════════════════════════════════════════════
   MAIN CONTENT
═══════════════════════════════════════════════════════════════ */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* ── Topbar ──────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-height);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  z-index: 5;
  gap: 16px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.topbar-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--brand-gray-dark);
  padding: 6px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, color 0.18s;
  flex-shrink: 0;
}

.topbar-menu-btn:hover {
  background: var(--brand-blue-10);
  color: var(--brand-blue);
}

.topbar-menu-btn .material-symbols-outlined { font-size: 22px; }

.topbar-title {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--brand-blue);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.topbar-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--brand-gray-dark);
  padding: 6px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, color 0.18s;
}

.topbar-btn:hover {
  background: var(--brand-blue-10);
  color: var(--brand-blue);
}

.topbar-btn .material-symbols-outlined { font-size: 22px; }

/* ── Page Content ────────────────────────────────────────────── */
.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
  scroll-behavior: smooth;
}

/* ═══════════════════════════════════════════════════════════════
   COMPONENTES
═══════════════════════════════════════════════════════════════ */

/* ── Card genérico ───────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  transition: box-shadow 0.2s;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--brand-blue);
}

/* ── KPI Cards ───────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand-blue);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: default;
}

.kpi-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.kpi-card.kpi-red    { border-left-color: var(--brand-red); }
.kpi-card.kpi-green  { border-left-color: var(--color-success); }
.kpi-card.kpi-orange { border-left-color: var(--color-warning); }
.kpi-card.kpi-blue   { border-left-color: var(--brand-blue); }

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-blue-10);
  color: var(--brand-blue);
  flex-shrink: 0;
}

.kpi-card.kpi-red    .kpi-icon { background: var(--brand-red-10);  color: var(--brand-red); }
.kpi-card.kpi-green  .kpi-icon { background: #D1FAE5;               color: #065F46; }
.kpi-card.kpi-orange .kpi-icon { background: #FEF3C7;               color: #92400E; }
.kpi-card.kpi-blue   .kpi-icon { background: var(--brand-blue-10);  color: var(--brand-blue); }

.kpi-icon .material-symbols-outlined { font-size: 20px; }

.kpi-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.kpi-value {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--brand-blue);
  line-height: 1;
}

.kpi-card.kpi-red    .kpi-value { color: var(--brand-red); }
.kpi-card.kpi-green  .kpi-value { color: var(--color-success); }
.kpi-card.kpi-orange .kpi-value { color: var(--color-warning); }
.kpi-card.kpi-blue   .kpi-value { color: var(--brand-blue); font-size: 1.6rem; }

/* ── Tabela ──────────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead tr {
  background: var(--brand-blue);
}

th {
  padding: 11px 16px;
  text-align: left;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 600;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

td {
  padding: 12px 16px;
  font-size: var(--text-base);
  color: var(--text-main);
  border-bottom: 1px solid var(--border);
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) td { background: #FAFBFC; }

tbody tr {
  cursor: pointer;
  transition: background 0.15s;
}

tbody tr:hover td { background: rgba(235, 0, 69, 0.03); }

.table-empty {
  text-align: center;
  padding: 52px 16px;
  color: var(--text-muted);
  font-size: var(--text-base);
}

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

/* Urgência */
.badge-baixa   { background: #D1FAE5; color: #065F46; }
.badge-media   { background: #FEF3C7; color: #92400E; }
.badge-alta    { background: #FFEDD5; color: #9A3412; }
.badge-critica { background: var(--brand-red-10); color: #C62828; }

/* Status */
.badge-aberto       { background: var(--brand-red-10); color: #C62828; }
.badge-em_andamento { background: #FEF3C7; color: #92400E; }
.badge-concluido    { background: #D1FAE5; color: #065F46; }
.badge-cancelado    { background: var(--brand-gray-light); color: var(--brand-gray-dark); }

/* ── Barra de filtros ────────────────────────────────────────── */
.filter-bar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.filter-group label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-group input,
.filter-group select {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: var(--text-base);
  color: var(--text-main);
  background: var(--surface);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.filter-group input:focus,
.filter-group select:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(235, 0, 69, 0.10);
  background: var(--white);
}

/* ── Botões ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s, transform 0.1s;
  line-height: 1;
}

.btn .material-symbols-outlined { font-size: 18px; }

.btn-primary {
  background: var(--brand-red);
  color: var(--white);
}

.btn-primary:hover {
  background: #C8003C;
  box-shadow: var(--shadow-red);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--brand-blue);
  color: var(--white);
}

.btn-secondary:hover {
  background: #002d3d;
}

.btn-ghost {
  background: transparent;
  color: var(--brand-blue);
  border: 1.5px solid var(--brand-blue);
}

.btn-ghost:hover {
  background: var(--brand-blue-10);
}

/* ── Action select (dropdown inline na tabela) ───────────────── */
.action-select {
  padding: 5px 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: var(--text-sm);
  background: var(--white);
  cursor: pointer;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.18s;
}

.action-select:focus { border-color: var(--brand-blue); }

/* ── Célula de solicitante ───────────────────────────────────── */
.cell-solicitante { display: flex; flex-direction: column; gap: 1px; }
.cell-nome  { font-weight: 500; color: var(--text-main); }
.cell-depto { font-size: var(--text-xs); color: var(--text-muted); }

/* ── Charts ──────────────────────────────────────────────────── */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.chart-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

.chart-card-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--brand-blue);
  margin-bottom: 20px;
}

.chart-container {
  position: relative;
  height: 280px;
}

/* ── Toast ───────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--brand-blue);
  color: var(--white);
  padding: 12px 18px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-base);
  font-weight: 500;
  min-width: 280px;
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: auto;
}

.toast.show   { opacity: 1; transform: translateX(0); }
.toast.success{ border-left: 4px solid var(--color-success); }
.toast.error  { border-left: 4px solid var(--brand-red); }
.toast.warning{ border-left: 4px solid var(--color-warning); }

/* ── Modal lateral deslizante ────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 62, 82, 0.42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 1000;
  display: none;
  justify-content: flex-end;
}

.modal-overlay.active { display: flex; }

.modal-panel {
  background: var(--white);
  width: 500px;
  max-width: 92vw;
  height: 100%;
  box-shadow: -8px 0 32px rgba(0, 62, 82, 0.14);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-panel { transform: translateX(0); }

/* Cabeçalho do modal com fundo brand-blue */
.modal-header {
  padding: 18px 22px;
  background: var(--brand-blue);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-header-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.modal-protocolo {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--white);
}

.modal-header-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.modal-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  transition: background 0.18s, color 0.18s;
  flex-shrink: 0;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.modal-close .material-symbols-outlined { font-size: 22px; }

/* Corpo do modal */
.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  scroll-behavior: smooth;
}

.detail-row {
  display: flex;
  gap: 20px;
  margin-bottom: 18px;
}

.detail-group {
  flex: 1;
  margin-bottom: 18px;
  min-width: 0;
}

.detail-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
}

.detail-value {
  font-size: var(--text-base);
  color: var(--text-main);
  font-weight: 400;
}

.detail-value.pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  white-space: pre-wrap;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--text-main);
}

.section-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--brand-blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--brand-blue-10);
  margin-bottom: 16px;
  margin-top: 8px;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 22px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 16px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -19px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-blue);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--brand-blue-10);
}

.timeline-meta   { font-size: var(--text-xs); color: var(--text-muted); margin-bottom: 2px; }
.timeline-action { font-size: var(--text-base); font-weight: 500; color: var(--text-main); }

.timeline-detail {
  margin-top: 6px;
  font-size: var(--text-sm);
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  line-height: 1.5;
}

/* Footer do modal (comentário) */
.modal-footer {
  border-top: 1px solid var(--border);
  padding: 16px 22px;
  background: var(--surface);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.modal-footer-title {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--brand-blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

.modal-footer input,
.modal-footer textarea,
.modal-footer select {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: var(--text-base);
  color: var(--text-main);
  background: var(--white);
  outline: none;
  transition: border-color 0.18s;
  resize: none;
}

.modal-footer input:focus,
.modal-footer textarea:focus,
.modal-footer select:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(0, 62, 82, 0.08);
}

.modal-footer-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

/* ── Responsividade ──────────────────────────────────────────── */
@media (max-width: 1280px) {
  .sidebar {
    width: var(--sidebar-collapsed-width);
    min-width: var(--sidebar-collapsed-width);
  }
  .sidebar .sidebar-brand-name,
  .sidebar .nav-label,
  .sidebar .sidebar-user-info,
  .sidebar .nav-section-label {
    max-width: 0;
    opacity: 0;
  }
  .sidebar .nav-item {
    justify-content: center;
    padding: 9px;
  }
  .sidebar .sidebar-logout-btn {
    margin-left: auto;
  }
}

@media (max-width: 1024px) {
  .charts-grid { grid-template-columns: 1fr; }
  .page-content { padding: 20px; }
}

@media (max-width: 768px) {
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-group input,
  .filter-group select { width: 100%; }
}
