/* Radar do Cidadao page styling aligned with Bolsa Familia analysis layout */
*, *::before, *::after {
  box-sizing: border-box;
}
.card-niche-header--profile {
  margin: calc(var(--card-pad-y, 1.2rem) * -1) calc(var(--card-pad-x, 1.35rem) * -1) 0.6rem;
  padding: 0.45rem var(--card-pad-x, 1.35rem);
}
body {
  margin: 0;
  font-family: 'Space Grotesk', 'Poppins', system-ui, sans-serif;
  background: #f3f4f6;
  color: #0f172a;
}
header.radar-header {
  background: #e2e8f0;
  padding: 0.8rem 1.2rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
}
header.radar-header .inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
header.radar-header img {
  height: 36px;
}
.shell {
  max-width: 1040px;
  margin: 1.5rem auto 2.5rem;
  padding: 0 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.top-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.top-actions h1 {
  margin: 0;
  font-size: 1.4rem;
  color: #0f172a;
}
.top-actions .meta {
  margin-top: 0.35rem;
}
.top-actions-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid #dc2626;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  color: #dc2626 !important;
  background: #ffffff;
  transition: background 0.2s, box-shadow 0.2s;
}
.btn:hover {
  background: #fef2f2;
  box-shadow: 0 10px 25px rgba(220, 38, 38, 0.12);
}
.btn-primary {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff !important;
}
.btn-primary:hover {
  background: #b91c1c;
  box-shadow: 0 15px 30px rgba(220, 38, 38, 0.2);
}
.list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.card {
  --card-pad-x: 1.8rem;
  --card-pad-y: 1.6rem;
  --card-radius: 1rem;
  --card-border: 1px;
  background: #ffffff;
  border-radius: var(--card-radius);
  border: var(--card-border) solid rgba(15, 23, 42, 0.08);
  padding: var(--card-pad-y) var(--card-pad-x);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}
.card h2 {
  margin: 0 0 0.9rem;
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.7);
}
.meta {
  color: #64748b;
  font-size: 0.85rem;
}
.msg {
  padding: 0.9rem 1.1rem;
  border-radius: 0.85rem;
  font-weight: 600;
}
.msg-ok {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}
.msg-err {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-green { background: #dcfce7; color: #166534; }
.badge-yellow { background: #fef9c3; color: #854d0e; }
.badge-orange { background: #ffedd5; color: #9a3412; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-neutral { background: #e2e8f0; color: #0f172a; }
.radar-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.radar-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}
.radar-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.radar-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}
.radar-card-actions form,
.inline-form {
  margin: 0;
  display: inline;
}
.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(220, 38, 38, 0.35);
  background: #ffffff;
  color: #dc2626 !important;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
.action-link:hover {
  background: #fef2f2;
  box-shadow: 0 10px 25px rgba(220, 38, 38, 0.12);
}
.action-link.danger {
  border-color: rgba(220, 38, 38, 0.6);
}
.action-link.danger:hover {
  background: #fee2e2;
}
.grid-5-col-compact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  align-items: stretch;
}
.card-profile-small {
  display: flex;
  flex-direction: column;
  align-items: center;
  --card-pad-x: 1.8rem;
  --card-pad-y: 1.6rem;
  --card-radius: 1rem;
  padding: var(--card-pad-y) var(--card-pad-x);
  text-align: center;
}
.card-profile-small .profile-avatar {
  margin: 0 auto;
  width: 96px;
  height: 96px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 2.1rem;
  font-weight: 700;
  color: #1d4ed8;
  background: linear-gradient(135deg, #e0f2ff 0%, #bfdbfe 100%);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.18);
}
.card-profile-small .profile-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
}
.card-profile-small .profile-name {
  margin-top: 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}
.badge-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.6rem;
}
.badge-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  color: #0f172a;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-label.vereador {
  color: #7c3aed;
}
.badge-label.vip {
  color: #f59e0b;
}
.token-display {
  margin-top: 0.9rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.75rem;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.6rem;
  align-items: center;
}
.token-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
}
.token-value {
  font-family: 'Space Grotesk', monospace;
  font-size: 0.85rem;
  color: #0f172a;
  word-break: break-all;
}
.token-actions .btn-ghost {
  font-size: 0.75rem;
}
.invite-desc {
  color: #64748b;
  font-size: 0.85rem;
}
.card-bg-blue,
.card-bg-green,
.card-bg-purple,
.card-bg-yellow,
.card-bg-pink,
.card-bg-teal,
.card-bg-orange {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
  color: #0f172a;
}
.cityscore-box {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 0.85rem;
  background: rgba(37, 99, 235, 0.12);
  color: #1e3a8a;
  font-size: 1.25rem;
  font-weight: 700;
}
.score-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.3rem 0;
  font-size: 0.85rem;
  color: #334155;
}
.score-label {
  font-weight: 600;
}
.score-value {
  font-family: 'Space Grotesk', monospace;
}
.grid.mt-075 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.card-md {
  --card-pad-x: 1.1rem;
  --card-pad-y: 1.1rem;
  padding: var(--card-pad-y) var(--card-pad-x);
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.card-md .text-center {
  flex-grow: 1;
}
.btn-niche {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff !important;
  padding: 0.45rem 1.15rem;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}
.notification-item {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.notification-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}
.notification-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
}

/* Nicho cards layout */
.niche-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.niche-card {
  display: flex;
  flex-direction: column;
  border-radius: 0.9rem;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.08);
}
.niche-card-topbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  color: #ffffff;
  font-size: 1.02rem;
  font-weight: 700;
}
.niche-card-topbar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 999px;
  font-size: 1.4rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.14);
}
.niche-card-body {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.2rem 1.3rem 1.3rem;
  background: #ffffff;
}
.niche-card-desc {
  margin: 0;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.6;
}
.niche-card-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}
.niche-card-actions form {
  margin: 0;
}
.btn-niche-disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}
.btn-niche-disabled:hover {
  background: inherit;
  box-shadow: none;
}

/* Card Niche Header - barra verde sólida no topo dos cards */
.card-niche-header {
  margin: calc(var(--card-pad-y, 1.6rem) * -1 - var(--card-border, 1px)) calc(var(--card-pad-x, 1.8rem) * -1 - var(--card-border, 1px)) 0.6rem;
  padding: 0.45rem var(--card-pad-x, 1.8rem);
  border-radius: var(--card-radius, 1rem) var(--card-radius, 1rem) 0 0;
  background: #166534; /* Verde do card da área territorial */
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.card-niche-header .icon {
  flex-shrink: 0;
  color: #dbeafe;
}

/* Footer styles */
footer.site-footer {
  margin-top: 0;
  padding: 1.5rem 1.5rem 0;
  background: #1e293b;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.85rem;
  color: #ffffff;
}
footer.site-footer h4 {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.footer-inner {
  max-width: 930px;
  margin: 0 auto;
  display: flex;
  gap: 0;
  text-align: left;
  align-items: start;
}
.footer-left,
.footer-center,
.footer-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: start;
}
.footer-divider {
  width: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 1rem;
}
.footer-card {
  background: transparent;
  border: none;
  padding: 0.75rem 1rem;
}
.footer-links {
  display: grid;
  gap: 0.4rem;
  justify-items: start;
}
.footer-links a {
  color: #ffffff;
  text-decoration: none;
  margin: 0;
}
.footer-links a:hover {
  text-decoration: underline;
}
.footer-bottom {
  display: grid;
  gap: 0.5rem;
  justify-items: start;
}
.footer-error-report a {
  display: inline-block;
  transition: transform 0.2s;
}
.footer-error-report a:hover {
  transform: scale(1.1);
}
.footer-error-report img {
  display: block;
  border-radius: 0.5rem;
  width: 72px;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}
.footer-white-bar {
  background: transparent;
  padding: 0.05rem 0;
  text-align: center;
  width: 100%;
}
.footer-white-bar-inner {
  max-width: 930px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.footer-text {
  color: #ffffff;
}

/* Universal menu styles */
.universal-menu {
  background: #1e293b;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.05);
  width: 100%;
}
.universal-menu .menu-link,
.universal-menu .menu-link:visited,
.universal-menu .menu-link:active {
  text-decoration: none;
  color: #ffffff !important;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}
.universal-menu .menu-link:hover,
.universal-menu .menu-link:focus {
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc !important;
}
.universal-menu .menu-link.active {
  background: #1d4ed8;
  color: #ffffff !important;
}

@media (max-width: 720px) {
  .card {
    padding: 1.4rem 1.2rem;
  }
  .top-actions h1 {
    font-size: 1.2rem;
  }
  .radar-card-actions {
    justify-content: flex-start;
  }
  .footer-inner {
    flex-direction: column;
  }
  .footer-divider {
    display: none;
  }
}

/* Content Container */
.content-container {
  max-width: 930px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Galeria Cívica styles */
.gallery-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.gallery-filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-group label {
  font-weight: 600;
  color: #1e293b;
}

.filter-group select {
  padding: 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: white;
}

.top-photos-section {
  margin-bottom: 2rem;
}

.top-photos-section h2 {
  margin-bottom: 1rem;
  color: #1e293b;
}

.top-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.top-photo-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

.top-photo-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.top-photo-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  padding: 1rem;
  color: white;
}

.top-photo-info .city-name {
  margin: 0;
  font-size: 0.875rem;
}

.top-photo-info .score {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.photo-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.photo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.photo-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.photo-card .info {
  padding: 1rem;
}

.photo-card .info h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  color: #1e293b;
}

.photo-card .info p {
  margin: 0.25rem 0;
  font-size: 0.85rem;
  color: #64748b;
}

.photo-card .info .stats {
  display: flex;
  gap: 1rem;
  margin: 0.5rem 0;
  font-size: 0.8rem;
  color: #64748b;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.btn-page {
  background: #1d4ed8;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
}

.btn-page:hover {
  background: #1e40af;
}

.page-info {
  font-weight: 600;
}

.top-cities-section {
  margin-top: 2rem;
}

.top-cities-section h2 {
  margin-bottom: 1rem;
  color: #1e293b;
}

.top-cities-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.city-item {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.city-item .city-name {
  font-weight: 600;
  color: #1e293b;
}

.city-item .photo-count {
  color: #64748b;
  font-size: 0.875rem;
}

.no-photos {
  text-align: center;
  padding: 2rem;
  color: #64748b;
  grid-column: 1 / -1;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #64748b;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  transition: background 0.2s;
}

.btn-back:hover {
  background: #475569;
}

.voting-section {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid #e2e8f0;
}

.vote-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.vote-photo-card {
  background: white;
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid #e2e8f0;
}

.vote-photo-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.photo-location {
  margin: 0;
  font-size: 0.875rem;
  color: #64748b;
}

.star-rating-form {
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  gap: 0.25rem;
  margin: 0.5rem 0;
}

.star-rating-form input[type="radio"] {
  display: none;
}

.star-rating-form label {
  cursor: pointer;
  font-size: 1.5rem;
  color: #cbd5e1;
  transition: color 0.2s;
}

.star-rating-form input[type="radio"]:checked ~ label,
.star-rating-form label:hover,
.star-rating-form label:hover ~ label {
  color: #fbbf24;
}

.btn-vote {
  background: #1d4ed8;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  width: 100%;
  margin-top: 0.5rem;
}

.btn-vote:hover {
  background: #1e40af;
}

.gallery-actions {
  margin-bottom: 1rem;
}

.btn-upload {
  display: inline-block;
  background: #1d4ed8;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #ef4444;
}

.alert-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #22c55e;
}
