/* ==========================================================================
   PORTAL DA TRANSPARÊNCIA - ASSOCIAÇÃO QUINTAL MÁGICO
   Design System & Estilos Modernos
   ========================================================================== */

:root {
  --primary: #1e3a8a;          /* Azul institucional profundo */
  --primary-hover: #1e40af;
  --primary-light: #eff6ff;
  --primary-dark: #172554;
  
  --secondary: #0d9488;        /* Verde menta / transparência */
  --secondary-light: #f0fdfa;
  --secondary-border: #99f6e4;
  
  --accent: #f59e0b;           /* Âmbar acolhedor */
  --accent-light: #fffbeb;
  
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-subtle: #f1f5f9;
  --border-color: #e2e8f0;
  --border-focus: #3b82f6;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-inverse: #ffffff;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.08);
  --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.15);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Modo Alto Contraste / Noturno Suave Opcional */
[data-theme="dark"] {
  --bg-main: #0b1120;
  --bg-card: #131d33;
  --bg-card-hover: #172440;
  --bg-subtle: #1e293b;
  --border-color: #24344d;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --primary-light: rgba(30, 58, 138, 0.25);
  --secondary-light: rgba(13, 148, 136, 0.2);
  --secondary-border: #115e59;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
  transition: var(--transition);
}

/* ==========================================================================
   Container & Utilities
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-primary {
  background-color: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.badge-success {
  background-color: var(--secondary-light);
  color: var(--secondary);
  border: 1px solid var(--secondary-border);
}

.badge-amber {
  background-color: var(--accent-light);
  color: #b45309;
  border: 1px solid #fde68a;
}

.badge-year {
  background-color: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 700;
  border: 1px solid var(--border-color);
}

/* ==========================================================================
   Top Alert / Banner Legal
   ========================================================================== */
.top-notice-bar {
  background: linear-gradient(90deg, #1e3a8a 0%, #0f172a 100%);
  color: #e2e8f0;
  font-size: 0.82rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-notice-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.top-notice-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.top-notice-item svg {
  color: #38bdf8;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #cbd5e1;
  font-size: 0.78rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

/* ==========================================================================
   Header & Brand
   ========================================================================== */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.brand-logo-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #2563eb 0%, #0d9488 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: var(--shadow-md);
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand-text p {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
}

.header-btn-secondary {
  background-color: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.header-btn-secondary:hover {
  background-color: var(--border-color);
}

.header-btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
  color: white;
  box-shadow: var(--shadow-sm);
}

.header-btn-primary:hover {
  opacity: 0.95;
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   Hero / Institutional Banner
   ========================================================================== */
.hero-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #1e3a8a 100%);
  color: white;
  padding: 3rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #93c5fd;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.9rem;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 1.75rem;
  max-width: 780px;
}

/* Stats / KPI Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  color: #38bdf8;
  flex-shrink: 0;
}

.stat-info h4 {
  font-size: 1.4rem;
  font-weight: 800;
  color: white;
  line-height: 1.1;
}

.stat-info p {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 500;
  margin-top: 0.2rem;
}

/* ==========================================================================
   Main Content Area & Control Bar
   ========================================================================== */
.main-wrapper {
  flex: 1;
  padding: 2rem 0 4rem;
}

.controls-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
  margin-top: -2rem;
  position: relative;
  z-index: 10;
}

.search-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.search-input-box {
  flex: 1;
  min-width: 280px;
  position: relative;
}

.search-input-box svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.85rem;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border-color);
  background-color: var(--bg-subtle);
  color: var(--text-main);
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--border-focus);
  background-color: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.search-clear-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  padding: 0.25rem;
  display: none;
}

.search-clear-btn.active {
  display: block;
}

.view-toggle-group {
  display: flex;
  background: var(--bg-subtle);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.view-btn {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.view-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Filter Pills */
.filter-groups-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-width: 80px;
}

.pill-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pill-btn {
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.pill-btn:hover {
  background: var(--border-color);
  color: var(--text-main);
}

.pill-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.pill-count {
  display: inline-block;
  background: rgba(0, 0, 0, 0.1);
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  margin-left: 0.35rem;
}

.pill-btn.active .pill-count {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

/* ==========================================================================
   Section Headers & Counters
   ========================================================================== */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.results-count {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.results-count span {
  color: var(--primary);
}

.category-section {
  margin-bottom: 2.5rem;
}

.category-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-left: 0.75rem;
  border-left: 4px solid var(--primary);
}

.category-title-bar h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.category-badge-pill {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   Document Grid View (Cards)
   ========================================================================== */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.25rem;
}

.doc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.doc-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  opacity: 0;
  transition: var(--transition);
}

.doc-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.doc-card:hover::after {
  opacity: 1;
}

.doc-card-top {
  margin-bottom: 1rem;
}

.doc-badges-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.doc-type-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: #fee2e2;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.doc-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.doc-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.doc-meta-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.doc-meta-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-light);
}

.doc-actions-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

.btn-view {
  background: var(--primary);
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: var(--transition);
}

.btn-view:hover {
  background: var(--primary-dark, #1e40af);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-download {
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.btn-download:hover {
  background: var(--secondary);
  color: white;
  border-color: var(--secondary);
}

.btn-icon-only {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-only:hover {
  background: var(--border-color);
  color: var(--text-main);
}

/* ==========================================================================
   Document Table View (List)
   ========================================================================== */
.docs-table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.docs-table th {
  background: var(--bg-subtle);
  padding: 0.85rem 1rem;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.docs-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.docs-table tr:hover td {
  background: var(--bg-subtle);
}

.table-doc-title {
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.table-doc-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-color);
}

.empty-state svg {
  width: 56px;
  height: 56px;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ==========================================================================
   Modal Document Viewer
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: var(--bg-card);
  width: 100%;
  max-width: 1050px;
  height: 90vh;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96);
  transition: var(--transition);
}

.modal-overlay.active .modal-box {
  transform: scale(1);
}

.modal-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-subtle);
}

.modal-title-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
}

.modal-title-wrapper h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.modal-btn {
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.modal-btn:hover {
  background: var(--border-color);
}

.modal-close-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

.modal-body {
  flex: 1;
  background: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: auto;
}

.pdf-viewer-frame {
  width: 100%;
  height: 100%;
  border: none;
}

/* Gallery viewer in modal (for multi-page image regulations) */
.gallery-viewer {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 1.5rem;
  overflow-y: auto;
  gap: 1.5rem;
}

.gallery-page-container {
  background: white;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-width: 780px;
  width: 100%;
  text-align: center;
}

.gallery-page-container img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  display: block;
}

.gallery-page-number {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ==========================================================================
   Institutional Section / Legal & e-SIC
   ========================================================================== */
.institutional-section {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 3.5rem 0;
}

.info-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.info-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.info-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.info-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.info-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.info-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: var(--text-main);
}

.info-list li strong {
  min-width: 110px;
  color: var(--text-muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3rem 0 1.5rem;
  border-top: 1px solid #1e293b;
  font-size: 0.85rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand h4 {
  color: white;
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  color: #94a3b8;
  max-width: 420px;
  line-height: 1.6;
}

.footer-col h5 {
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: #94a3b8;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid #1e293b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.back-to-top-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
}

.back-to-top-btn:hover {
  color: white;
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: #0f172a;
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: translateY(20px);
  opacity: 0;
  transition: var(--transition);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   Responsividade
   ========================================================================== */
@media (max-width: 900px) {
  .hero-title {
    font-size: 1.85rem;
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  .docs-grid {
    grid-template-columns: 1fr;
  }
  .search-row {
    flex-direction: column;
    align-items: stretch;
  }
  .doc-actions-row {
    grid-template-columns: 1fr 1fr;
  }
  .doc-actions-row .btn-icon-only {
    grid-column: span 2;
  }
}
