/* ============================================
   AJUDAR OS ANIMAIS - STYLESHEET
   ============================================ */

:root {
  --primary: #2e7d32;
  --primary-light: #4caf50;
  --primary-dark: #1b5e20;
  --accent: #ff8f00;
  --accent-light: #ffca28;
  --bg: #f5f7f5;
  --bg-card: #ffffff;
  --text: #1a2e1a;
  --text-muted: #5a715a;
  --border: #d8e8d8;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 32px rgba(46,125,50,0.18);
  --transition: all 0.25s ease;
  --header-h: 68px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================
   HEADER / NAVBAR
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--primary-dark);
  box-shadow: 0 2px 16px rgba(0,0,0,0.18);
  height: var(--header-h);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
}

.logo-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.logo-text {
  font-size: 1.15rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}

.logo-text strong {
  color: var(--accent-light);
  font-weight: 800;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 40px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.nav-link i {
  font-size: 0.85rem;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  border-radius: 3px;
  background: #fff;
  transition: var(--transition);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, #388e3c 100%);
  padding: 52px 24px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-content {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
}

.hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.3rem);
  font-weight: 900;
  color: #fff;
  margin-bottom: 14px;
  line-height: 1.3;
}

.hero p {
  color: rgba(255,255,255,0.85);
  font-size: 1.05rem;
  margin-bottom: 28px;
  line-height: 1.7;
}

.hero-search {
  display: flex;
  max-width: 540px;
  margin: 0 auto;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
}

.hero-search input {
  flex: 1;
  padding: 14px 22px;
  font-size: 1rem;
  font-family: 'Nunito', sans-serif;
  border: none;
  outline: none;
  color: var(--text);
  background: #fff;
}

.hero-search button {
  padding: 14px 26px;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-search button:hover {
  background: #e65100;
}

/* ============================================
   CONTENT WRAPPER (MAIN + SIDEBAR)
   ============================================ */
.content-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 24px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.section-header {
  margin-bottom: 22px;
}

.section-header h2 {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.section-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 4px;
}

/* FILTROS DE REGIÃO */
.region-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.region-btn {
  padding: 8px 18px;
  border-radius: 40px;
  border: 2px solid var(--border);
  background: #fff;
  color: var(--text-muted);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
}

.region-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  background: #e8f5e9;
}

.region-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* BLOCO DE REGIÃO */
.regiao-section {
  margin-bottom: 48px;
}

.regiao-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--primary-light);
}

.regiao-title h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.regiao-title .regiao-count {
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--primary-light);
  color: #fff;
  padding: 2px 10px;
  border-radius: 20px;
}

/* GRID DE CARDS */
.ongs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
}

/* CARD ONG */
.ong-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  transition: var(--transition);
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
}

.ong-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}

.ong-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: #e8f5e9;
  display: block;
}

.ong-card-img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.ong-card-body {
  padding: 12px 14px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ong-card-name {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}

.ong-card-location {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.ong-card-location i {
  color: var(--primary-light);
  font-size: 0.75rem;
}

.ong-card-footer {
  padding: 8px 14px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  opacity: 0;
  transition: var(--transition);
}

.ong-card:hover .ong-card-footer {
  opacity: 1;
}

/* LOADING */
.loading-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* SEM RESULTADOS */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.no-results i {
  font-size: 3rem;
  color: var(--border);
  margin-bottom: 14px;
  display: block;
}

.no-results button {
  margin-top: 16px;
  padding: 10px 24px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 40px;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  transition: var(--transition);
}

.no-results button:hover {
  background: var(--primary-dark);
}

/* ============================================
   SIDEBAR / DONATION BANNER
   ============================================ */
.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  align-self: start;
}

.sticky-card {
  /* o sticky agora está no <aside> pai */
}

.donation-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px 22px;
  box-shadow: var(--shadow);
  border: 2px solid var(--border);
  text-align: center;
}

.donation-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
  line-height: 1;
}

.donation-card h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 10px;
  line-height: 1.3;
}

.donation-card h3 span {
  color: var(--primary-light);
}

.donation-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.donation-stats {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 20px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #e8f5e9;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  flex: 1;
}

.stat strong {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}

.stat span {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 3px;
  text-align: center;
}

.btn-donate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--accent), #ff6f00);
  color: #fff;
  text-decoration: none;
  border-radius: 40px;
  font-weight: 800;
  font-size: 1rem;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(255,143,0,0.35);
}

.btn-donate:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,143,0,0.5);
}

.donation-note {
  font-size: 0.78rem !important;
  color: var(--text-muted) !important;
  margin-top: 10px !important;
  margin-bottom: 0 !important;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

.indicate-cta p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.5;
}

.btn-indicate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 11px;
  background: #e8f5e9;
  color: var(--primary-dark);
  text-decoration: none;
  border-radius: 40px;
  font-weight: 700;
  font-size: 0.9rem;
  border: 2px solid var(--primary-light);
  transition: var(--transition);
}

.btn-indicate:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.7);
  padding: 28px 24px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: #fff;
}

.footer-copy {
  font-size: 0.85rem;
  width: 100%;
  text-align: center;
  color: rgba(255,255,255,0.5);
  margin-top: 6px;
}

/* Artigos no rodapé */
.footer-artigos {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-artigos-title {
  font-size: 0.78rem;
  font-weight: 900;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 0;
}

.footer-artigos-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-artigos-links a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.footer-artigos-links a i {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
}

.footer-artigos-links a:hover {
  color: #fff;
}

.footer-artigos-links a:hover i {
  color: rgba(255,255,255,0.8);
}

/* ============================================
   PÁGINAS INTERNAS - HERO PEQUENO
   ============================================ */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  padding: 42px 24px;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(1.4rem, 3.5vw, 2.1rem);
  font-weight: 900;
  color: #fff;
  margin-bottom: 10px;
}

.page-hero p {
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.7;
}

.page-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

/* ============================================
   FORMULÁRIO - INDICAR ONG
   ============================================ */
.form-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group label span.req {
  color: #e53935;
  margin-left: 3px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 15px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  color: var(--text);
  background: #fff;
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(76,175,80,0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 110px;
}

.btn-submit {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 40px;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(46,125,50,0.3);
}

.btn-submit:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.success-msg {
  display: none;
  align-items: center;
  gap: 12px;
  background: #e8f5e9;
  border: 2px solid var(--primary-light);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  color: var(--primary-dark);
  font-weight: 700;
  margin-top: 20px;
}

.success-msg.show {
  display: flex;
}

/* ============================================
   PÁGINA NOSSA HISTÓRIA
   ============================================ */
.historia-content h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 28px 0 12px;
}

.historia-content p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 14px;
}

.historia-content .highlight-box {
  background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
  border-left: 5px solid var(--primary-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px;
  margin: 24px 0;
}

.historia-content .highlight-box p {
  margin: 0;
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 1.05rem;
}

.missao-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 24px 0;
}

.missao-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow);
  text-align: center;
  border: 2px solid var(--border);
}

.missao-card .missao-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.missao-card h4 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.missao-card p {
  font-size: 0.87rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ============================================
   ADMIN PANEL
   ============================================ */
.admin-body {
  background: #f0f4f0;
}

.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.login-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 44px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  text-align: center;
}

.login-card .logo-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 8px;
}

.login-card h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.login-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.login-error {
  display: none;
  background: #ffebee;
  border: 1px solid #ef9a9a;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.88rem;
  color: #c62828;
  margin-bottom: 16px;
  font-weight: 600;
}

.login-error.show {
  display: block;
}

/* ADMIN LAYOUT */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 250px;
  background: var(--primary-dark);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
}

.admin-sidebar .sidebar-logo {
  padding: 22px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
}

.admin-menu {
  list-style: none;
  padding: 16px 0;
  flex: 1;
}

.admin-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  transition: var(--transition);
}

.admin-menu a:hover,
.admin-menu a.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-right: 3px solid var(--accent-light);
}

.admin-menu a i {
  width: 18px;
  text-align: center;
}

.sidebar-logout {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logout a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: var(--transition);
  padding: 8px;
  border-radius: var(--radius-sm);
}

.sidebar-logout a:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

/* ADMIN MAIN */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-topbar {
  background: #fff;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.admin-topbar h1 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.admin-topbar .topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-page {
  padding: 28px;
  flex: 1;
}

/* STATS CARDS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary-light);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-card.orange { border-left-color: var(--accent); }
.stat-card.blue   { border-left-color: #1976d2; }
.stat-card.red    { border-left-color: #d32f2f; }

.stat-card .stat-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary-dark);
  line-height: 1;
}

/* ADMIN TABLE */
.table-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--border);
}

.table-card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.table-card-header h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}

.table-search {
  padding: 8px 14px;
  border: 2px solid var(--border);
  border-radius: 40px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition);
  width: 220px;
}

.table-search:focus {
  border-color: var(--primary-light);
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table thead {
  background: #f8faf8;
}

.admin-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 800;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
}

.admin-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: #f8faf8;
}

.ong-thumb {
  width: 52px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  background: #e8f5e9;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge-green { background: #e8f5e9; color: #2e7d32; }
.badge-red   { background: #ffebee; color: #c62828; }
.badge-orange { background: #fff8e1; color: #e65100; }
.badge-blue  { background: #e3f2fd; color: #1565c0; }
.badge-gray  { background: #f5f5f5; color: #616161; }

.action-btns {
  display: flex;
  gap: 6px;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  transition: var(--transition);
}

.btn-icon-edit { background: #e3f2fd; color: #1565c0; }
.btn-icon-edit:hover { background: #1976d2; color: #fff; }

.btn-icon-delete { background: #ffebee; color: #c62828; }
.btn-icon-delete:hover { background: #d32f2f; color: #fff; }

.btn-icon-toggle { background: #f5f5f5; color: #616161; }
.btn-icon-toggle:hover { background: #9e9e9e; color: #fff; }

/* BTN PRIMÁRIO */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 40px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  background: #fff;
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 40px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

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

/* MODAL */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(3px);
}

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

.modal {
  background: #fff;
  border-radius: var(--radius);
  padding: 0;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  padding: 22px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #f5f5f5;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: var(--text-muted);
}

.modal-close:hover { background: #e0e0e0; color: var(--text); }

.modal-body {
  padding: 28px;
}

.modal-footer {
  padding: 18px 28px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* ALERT / TOAST */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--primary-dark);
  color: #fff;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 6px 24px rgba(0,0,0,0.2);
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.toast.success { background: var(--primary); }
.toast.error   { background: #c62828; }

/* ============================================
   IMAGEM PREVIEW NO FORM
   ============================================ */
.img-preview-wrap {
  margin-top: 10px;
}

.img-preview {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  display: none;
}

.img-preview.show { display: block; }

/* ============================================
   PAGINAÇÃO
   ============================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px;
  border-top: 1px solid var(--border);
}

.pagination button {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.pagination button.active,
.pagination button:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 14px;
  display: block;
  color: var(--border);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }

  /* Em tablets/mobile a sidebar some — o bloco de doação
     aparece como barra fixada no rodapé (ver .mobile-donate-bar) */
  .sidebar {
    display: none;
  }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--primary-dark);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  }

  .main-nav.open {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .donation-card {
    display: block;
    text-align: center;
  }

  /* padding extra no body para não cobrir conteúdo com a barra mobile */
  body {
    padding-bottom: 70px;
  }

  .admin-layout {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    height: auto;
    position: static;
  }

  .admin-menu {
    display: flex;
    flex-wrap: wrap;
    padding: 8px;
    gap: 4px;
  }

  .admin-menu a {
    border-right: none !important;
    border-radius: var(--radius-sm);
  }
}

@media (max-width: 480px) {
  .ongs-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-search {
    flex-direction: column;
    border-radius: var(--radius);
    overflow: visible;
    gap: 8px;
  }

  .hero-search input,
  .hero-search button {
    border-radius: 40px;
    width: 100%;
  }
}

/* ============================================
   BARRA DE DOAÇÃO MOBILE (fixada no rodapé)
   Visível apenas em telas ≤ 1024px
   ============================================ */
.mobile-donate-bar {
  display: none; /* oculta no desktop */
}

@media (max-width: 1024px) {
  .mobile-donate-bar {
    display: flex;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: linear-gradient(135deg, var(--primary-dark), #2e7d32);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.22);
    padding: 12px 16px 12px 16px;
    gap: 10px;
    /* Entra deslizando de baixo para cima */
    animation: slideUpBar 0.5s ease 1.2s both;
  }

  @keyframes slideUpBar {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);   opacity: 1; }
  }

  .mobile-donate-bar.hidden {
    transform: translateY(110%);
    transition: transform 0.35s ease;
  }

  .mobile-donate-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
  }

  .mobile-donate-emoji {
    font-size: 1.6rem;
    flex-shrink: 0;
    line-height: 1;
  }

  .mobile-donate-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
  }

  .mobile-donate-text strong {
    font-size: 0.88rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-donate-text span {
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.72);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-donate-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    border-radius: 40px;
    font-weight: 800;
    font-size: 0.88rem;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(255, 143, 0, 0.45);
    transition: var(--transition);
  }

  .mobile-donate-btn:hover,
  .mobile-donate-btn:active {
    background: #e65100;
  }

  .mobile-donate-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    flex-shrink: 0;
    transition: var(--transition);
  }

  .mobile-donate-close:hover {
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
  }
}
