/* ========================================
   OpenCities - Components
   ======================================== */

/* Stat Grid - estilo do site */
.stat-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.stat:last-child {
  border-bottom: none;
}

.stat-label-inline {
  color: #0f172a;
  font-weight: 500;
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-value-inline {
  flex-shrink: 0;
  font-weight: 600;
  color: #16a34a;
}

/* Profile */
.profile-avatar {
  width: 100%;
  max-width: 120px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: var(--accent);
  color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.8rem;
  flex-shrink: 0;
  box-shadow: 0 10px 25px rgba(12,41,72,0.45);
  overflow: hidden;
  margin: 0 auto;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  max-width: 120px;
  max-height: 120px;
  object-fit: cover;
  border-radius: 999px;
}

.profile-avatar-small {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: var(--accent);
  color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.6rem;
  flex-shrink: 0;
  box-shadow: 0 10px 25px rgba(12,41,72,0.45);
}

.profile-avatar-small img {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
}

.profile-main {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.profile-main > * { width: 100%; }

.profile-name {
  font-weight: 600;
  font-size: 0.98rem;
  text-align: center;
}

.profile-email {
  font-size: 0.82rem;
  color: var(--muted);
  word-break: break-all;
}

/* Buttons */
.btn-ghost, .btn-outline {
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  background: #ffffff;
  cursor: pointer;
  color: var(--text) !important;
}

.btn-outline {
  border-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

.btn-primary {
  border-radius: 0.7rem;
  padding: 0.45rem 1.1rem;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.btn-secondary { background: #e5e7eb; color: #111827; }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.85rem; }
.btn-xs { font-size: 0.8rem; }

.btn-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.8rem;
  font-size: 0.85rem;
  color: var(--text);
}

/* Badges */
.badge-info {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7rem;
  background: var(--accent-soft);
  color: var(--accent);
  margin-left: 0.35rem;
}

.badge-bar {
  margin: 1rem -1.1rem 0 -1.1rem;
  padding: 1rem 1.1rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  justify-content: space-between;
  width: calc(100% + 2.2rem);
  align-items: center;
}

.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  flex: 1;
  padding: 0.5rem;
}

.badge-icon {
  font-size: 1.5rem;
}

.badge-label {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}

.badge-label.vereador { color: #0369a1; }
.badge-label.vip { color: #a16207; }

.role-pill {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(59,130,246,0.15);
  color: #bfdbfe;
  margin-top: 0.2rem;
}

.pill-warning {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: #fefce8;
  color: #92400e;
  margin-top: 0.25rem;
}

.notif-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
  margin-left: 0.5rem;
  box-shadow: 0 10px 25px rgba(220,38,38,0.35);
  vertical-align: middle;
}

.notification-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 0.4rem;
  box-shadow: 0 2px 8px rgba(220,38,38,0.4);
  vertical-align: middle;
}

/* CityScore & Score Items */
.cityscore-box {
  padding: 0.7rem 0.9rem;
  border-radius: 0.7rem;
  border: 1px solid var(--accent-bg-strong);
  background: var(--accent-bg);
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 0.75rem;
}

.score-item {
  padding: 0.6rem 0.8rem;
  border-radius: 0.6rem;
  border: 1px solid var(--accent-bg-strong);
  background: var(--accent-bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.score-label { color: var(--muted); font-weight: 600; }
.score-value { color: var(--text); font-weight: 800; }

/* Messages */
.msg-error, .msg-success {
  margin-top: 0.5rem;
  padding: 0.6rem 0.8rem;
  border-radius: 0.6rem;
  font-weight: 700;
  font-size: 0.85rem;
}

.msg-error {
  border: 1px solid rgba(245,158,11,0.35);
  background: rgba(254,243,199,0.6);
  color: #854d0e;
}

.msg-success {
  border: 1px solid rgba(21,128,61,0.25);
  background: rgba(220,252,231,0.55);
  color: var(--success);
}

.msg-success-small {
  font-size: 0.85rem;
  color: var(--success);
  margin-top: 0.4rem;
}

.msg-error-small {
  font-size: 0.85rem;
  color: var(--danger);
  margin-top: 0.4rem;
}

/* Token */
.token-label {
  font-size: 0.8rem;
}

.token-value {
  margin-top: 0.2rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 0.8rem;
  padding: 0.5rem 0.7rem;
  border-radius: 0.6rem;
  background: rgba(15,23,42,0.04);
  border: 1px solid var(--border);
  word-break: break-all;
}

.token-actions {
  margin-top: 0.4rem;
}

/* Utility */
.hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.footer-note {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.muted { color: var(--muted); }
.cursor-pointer { cursor: pointer; }

/* Dashboard Footer */
.dashboard-footer {
  max-width: 1080px;
  margin: 0 auto 1.5rem;
  padding: 0 1.25rem;
  color: var(--muted);
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.dashboard-footer a {
  color: var(--text) !important;
  text-decoration: none;
  font-weight: 600;
}

/* Empty Content */
.empty-content {
  margin-top: 1rem;
  border: 1px dashed rgba(100,116,139,0.6);
  border-radius: 0.9rem;
  padding: 1.25rem;
  background: rgba(248,250,252,0.9);
  min-height: 240px;
}

/* Stats - Vereadores Page */
.stats {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: nowrap;
}

.stat-card {
  color: #fff;
  padding: 0.75rem;
  flex: 1;
  text-align: center;
}

.stat-card .number {
  font-size: 1.5rem;
  font-weight: 700;
}

.stat-card .label {
  font-size: 0.8rem;
  opacity: 0.9;
}

/* Header - estilo do site */
.site-header {
  padding: 0.75rem 1.5rem 0.5rem;
  background: #e2e8f0;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

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

.header-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: #e2e8f0;
}

.header-logo img {
  height: 32px;
  width: auto;
  display: block;
}

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

.btn-login {
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.8rem;
  border: 1px solid #1d4ed8;
  background: #1d4ed8;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-login:hover {
  background: #1e40af;
  border-color: #1e40af;
}

/* Hero - estilo do site */
.hero {
  margin: 1rem 0 1.5rem;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  background: #0f172a;
}

.hero-inner {
  position: relative;
  min-height: clamp(18rem, 28vh, 22rem);
  background-image: var(--hero-banner);
  background-size: cover;
  background-position: center;
}

.hero-city-card {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  background: rgba(255,255,255,0.96);
  color: #0f172a;
  padding: 0.75rem 1rem;
  border-radius: 0.9rem;
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 12px 30px rgba(15,23,42,0.25);
}

/* Footer - estilo do site */
.site-footer {
  margin-top: 2rem;
  padding: 1rem 1.5rem;
  background: #e5e7eb;
  border-top: 1px solid #cbd5e1;
  font-size: 0.85rem;
  color: #4b5563;
}

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