/* ==========================================================================
   MANGABEIRA+ — MACAÍBA/RN
   Mobile App Focused Design System (Exclusive Light Theme)
   Profile Page Layout (FIXED: Positive Avatar Spacing Below Banner & TopBar)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Brand Color Palette - Clean & Light */
  --primary-700: #047857;
  --primary-600: #059669;
  --primary-500: #10b981;
  --primary-100: #d1fae5;
  --primary-50: #ecfdf5;

  /* Official Gold Accent */
  --gold-700: #b45309;
  --gold-600: #d97706;
  --gold-500: #f59e0b;
  --gold-100: #fef3c7;
  --gold-50: #fffbeb;

  /* Admin Accent */
  --admin-600: #4f46e5;
  --admin-500: #6366f1;
  --admin-100: #e0e7ff;
  --admin-50: #eef2ff;

  /* Surfaces */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-hover: #f1f5f9;
  --border-color: #e2e8f0;
  --border-subtle: #f1f5f9;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #94a3b8;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;

  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding-bottom: 80px;
}

.app-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--bg-main);
  position: relative;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.08);
}

/* Sleek Header Bar */
.mobile-app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 0.45rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  min-height: 52px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}

.brand-title h1 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 0.05rem;
}

.brand-plus-furtacor {
  background: linear-gradient(135deg, #ff007f 0%, #7928ca 35%, #00dfd8 70%, #ff007f 100%);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
  font-size: 1.6rem;
  display: inline-block;
  animation: furtacorAnimation 3s ease infinite alternate;
  filter: drop-shadow(0 1px 4px rgba(121, 40, 202, 0.4));
  margin-left: 2px;
  line-height: 1;
}

@keyframes furtacorAnimation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

.notification-bell-btn {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: var(--bg-hover);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.notif-badge-count {
  position: absolute;
  top: -2px;
  right: -2px;
  background-color: #ef4444;
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.08rem 0.3rem;
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-surface);
}

.user-login-chip {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.65rem;
  background-color: var(--primary-50);
  border: 1px solid var(--primary-100);
  border-radius: var(--radius-full);
  color: var(--primary-700);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Navigation Tabs */
.app-top-tabs {
  display: flex;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 0.45rem 0.75rem;
  gap: 0.35rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.app-top-tabs::-webkit-scrollbar { display: none; }

.top-tab-btn {
  flex: 1;
  min-width: fit-content;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background-color: var(--bg-hover);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.top-tab-btn.active {
  background-color: var(--primary-600);
  color: #ffffff;
  border-color: var(--primary-600);
}

.app-content {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Ediane Sousa Banner */
.official-ediane-card {
  background: linear-gradient(135deg, #064e3b 0%, #059669 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 0.85rem 1rem;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.2);
  position: relative;
  cursor: pointer;
}

.official-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.4rem;
}

.official-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold-500);
}

.official-info h3 {
  color: #ffffff;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.official-info p {
  font-size: 0.7rem;
  color: #d1fae5;
}

.official-text {
  font-size: 0.8rem;
  line-height: 1.35;
  color: #f0fdf4;
}

/* Quick Demand Action Card */
.quick-demand-action-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.75rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.quick-demand-text strong {
  font-size: 0.88rem;
  color: var(--text-main);
}

.quick-demand-text span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.btn-add-demand {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(5, 150, 105, 0.3);
}

/* Status Ruler Widget Grid */
.status-ruler-widget {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  text-align: center;
  padding: 0.5rem 0.25rem;
  gap: 0.2rem;
  box-shadow: var(--shadow-sm);
}

.status-ruler-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0.4rem 0.1rem;
  border-radius: var(--radius-md);
  transition: background-color 0.2s ease, transform 0.15s ease;
  min-height: 56px;
}

.status-ruler-item:hover, .status-ruler-item.active {
  background-color: var(--bg-hover);
  box-shadow: inset 0 0 0 1px var(--border-color);
}

.status-ruler-label {
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  line-height: 1;
}

.status-ruler-val {
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1.2;
  margin-top: 0.2rem;
}

/* Search Box */
.app-search-box {
  position: relative;
  width: 100%;
}

.app-search-box .material-symbols-outlined {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  font-size: 1.1rem;
}

.app-search-input {
  width: 100%;
  padding: 0.55rem 1rem 0.55rem 2.3rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.82rem;
  outline: none;
}

.app-search-input:focus { border-color: var(--primary-600); }

/* Cards & Posts */
.card, .post-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pinned-badge {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold-700);
  background-color: var(--gold-100);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  width: fit-content;
}

.post-author-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.author-meta-clickable {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  transition: opacity 0.2s ease;
  padding: 0.2rem;
  border-radius: var(--radius-sm);
}

.author-meta-clickable:hover { background-color: var(--bg-hover); }

.author-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.author-name-clickable {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

.author-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.category-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
}

.cat-demanda { background-color: #fee2e2; color: #dc2626; }
.cat-oficial { background-color: var(--gold-100); color: var(--gold-700); }
.cat-noticia { background-color: #e0f2fe; color: #0284c7; }
.cat-evento { background-color: #f3e8ff; color: #9333ea; }
.cat-comercio { background-color: #dcfce7; color: #16a34a; }

.post-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
}

.post-content {
  font-size: 0.85rem;
  color: var(--text-main);
  white-space: pre-wrap;
}

.demand-address {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  background-color: var(--bg-main);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.post-media {
  border-radius: var(--radius-md);
  overflow: hidden;
  max-height: 280px;
  background-color: #000;
  cursor: pointer;
}

.post-media img {
  width: 100%;
  height: 100%;
  max-height: 280px;
  object-fit: cover;
}

.demand-status-box {
  background-color: var(--bg-hover);
  border: 1px solid var(--border-color);
  padding: 0.65rem;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.status-analise { color: #b45309; }
.status-encaminhado { color: #1d4ed8; }
.status-andamento { color: #c2410c; }
.status-concluido { color: #047857; }

.admin-status-select {
  width: 100%;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gold-500);
  background-color: var(--bg-surface);
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.78rem;
}

.post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 0.6rem;
  gap: 0.25rem;
}

.btn-action {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.45rem 0.2rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-action.liked { color: #ef4444; }

.comments-box {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.4rem;
}

.comment-row {
  display: flex;
  gap: 0.45rem;
}

.comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
}

.comment-bubble {
  background-color: var(--bg-hover);
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-md);
  flex: 1;
}

.comment-author-name {
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.comment-text { font-size: 0.78rem; margin-bottom: 0.25rem; }

.comment-vote-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.comment-vote-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  cursor: pointer;
  padding: 0.1rem 0.3rem;
  border-radius: var(--radius-sm);
}

.comment-vote-btn:hover { background-color: var(--border-color); }
.comment-vote-btn.upvoted { color: #10b981; }
.comment-vote-btn.downvoted { color: #ef4444; }

.comment-input-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.comment-input {
  flex: 1;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background-color: var(--bg-hover);
  font-size: 0.78rem;
  outline: none;
}

.btn-send-comment {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--primary-600);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   PERFECT PROFILE PAGE LAYOUT (100% NON-OVERLAPPING STACKED PROFILE)
   ========================================================================== */
.profile-full-page {
  position: fixed;
  inset: 0;
  background-color: var(--bg-main);
  z-index: 4800;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.profile-full-page.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

/* STICKY TOP BAR AT Y=0 */
.profile-top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  box-shadow: var(--shadow-sm);
}

.btn-back-feed {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
}

/* COVER BANNER STARTS BELOW TOP BAR */
.profile-cover-banner {
  height: 100px;
  background: linear-gradient(135deg, #059669 0%, #0d9488 40%, #0284c7 100%);
  width: 100%;
}

.profile-header-content {
  padding: 0 1.25rem 1.25rem 1.25rem;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  box-shadow: var(--shadow-sm);
}

/* ABSOLUTELY ZERO NEGATIVE MARGIN OVERLAP: AVATAR SITS CLEANLY BELOW COVER BANNER */
.profile-avatar-wrapper {
  margin-top: 1rem; /* POSITIVE TOP SPACING BELOW BANNER */
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 5;
}

.avatar-relative-box {
  position: relative;
  display: inline-block;
}

.profile-avatar-large {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-500);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  background-color: #fff;
}

.online-status-dot {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  background-color: #10b981;
  border: 3px solid var(--bg-surface);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-profile-pill {
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  border: 1px solid var(--border-color);
}

.btn-profile-primary {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
  color: #ffffff;
  border: none;
  box-shadow: 0 3px 10px rgba(5, 150, 105, 0.25);
}

.btn-profile-secondary {
  background-color: var(--bg-hover);
  color: var(--text-main);
}

.profile-title-block {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.profile-name-row h2 {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.2;
}

.username-chip-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background-color: var(--primary-50);
  border: 1px solid var(--primary-100);
  color: var(--primary-700);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 800;
  width: fit-content;
}

.profile-sub-info-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.info-pill-tag {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  background-color: var(--bg-hover);
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
}

.profile-bio-text {
  font-size: 0.85rem;
  color: var(--text-main);
  margin-top: 0.65rem;
  line-height: 1.45;
  background-color: var(--bg-hover);
  padding: 0.65rem;
  border-radius: var(--radius-md);
  border-left: 3px solid var(--primary-500);
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.profile-stat-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  box-shadow: var(--shadow-sm);
}

.profile-stat-number {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--primary-600);
}

.profile-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Danger Zone inside Settings */
.danger-zone-accordion {
  border-top: 1px solid var(--border-color);
  margin-top: 1.5rem;
  padding-top: 1rem;
}

.danger-zone-toggle {
  font-size: 0.72rem;
  color: var(--text-subtle);
  background: transparent;
  border: none;
  text-decoration: underline;
  cursor: pointer;
}

/* Bottom Nav Bar */
.mobile-nav-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 60px;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  z-index: 4500 !important;
  display: flex;
  align-items: center;
  justify-content: space-around;
  box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.08);
  pointer-events: auto !important;
}

.nav-tab-item {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer !important;
  pointer-events: auto !important;
  position: relative;
  z-index: 4501;
}

.nav-tab-item .material-symbols-outlined {
  font-size: 1.4rem;
  pointer-events: none;
}

.nav-tab-item span { pointer-events: none; }
.nav-tab-item.active { color: var(--primary-600); }

.nav-tab-fab {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -16px;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
  cursor: pointer !important;
  pointer-events: auto !important;
  position: relative;
  z-index: 4502;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  z-index: 5000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal-sheet {
  background-color: var(--bg-surface);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  overflow: hidden;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2);
}

.modal-overlay.active .modal-sheet { transform: translateY(0); }

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

.modal-sheet-title { font-size: 1.05rem; font-weight: 800; }

.modal-sheet-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  overflow-y: auto;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.form-group label { font-size: 0.78rem; font-weight: 700; }

.form-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-main);
  color: var(--text-main);
  font-size: 0.85rem;
  outline: none;
  min-height: 44px;
}

.form-input:focus { border-color: var(--primary-600); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  min-height: 44px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
  color: #ffffff;
}

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

.btn-icon-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
}

/* Lightbox & Toast */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 6000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 1rem;
}

.lightbox-overlay.active { opacity: 1; pointer-events: auto; }
.lightbox-overlay img { max-width: 100%; max-height: 85vh; object-fit: contain; }

#toast-container {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 440px;
  z-index: 7000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background-color: var(--bg-surface);
  color: var(--text-main);
  border-left: 4px solid var(--primary-600);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
}

/* MENTIONS SYSTEM (@USER) */
.mention-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  background-color: #e0e7ff;
  color: #3730a3;
  padding: 0.08rem 0.4rem;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid #c7d2fe;
  transition: all 0.2s ease;
}
.mention-pill:hover {
  background-color: #c7d2fe;
  color: #1e1b4b;
  transform: translateY(-1px);
}

/* MENTIONS AUTOCOMPLETE DROPDOWN */
.mention-autocomplete-box {
  position: absolute;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 180px;
  overflow-y: auto;
  z-index: 9999;
  width: 240px;
}
.mention-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--border-subtle);
}
.mention-item:hover {
  background-color: var(--primary-50);
  color: var(--primary-700);
}
.mention-item img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

/* GUEST LOCK CTA BANNER */
.guest-lock-banner {
  background: linear-gradient(135deg, #fef3c7 0%, #fee2e2 100%);
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  margin: 0.75rem 0;
  box-shadow: var(--shadow-sm);
}
.guest-lock-banner h4 {
  font-size: 0.92rem;
  font-weight: 800;
  color: #92400e;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}
.guest-lock-banner p {
  font-size: 0.8rem;
  color: #78350f;
  margin: 0.4rem 0 0.75rem 0;
  line-height: 1.4;
}

/* 30 SUPER ADMIN TOOLS SUITE */
.admin-tab-nav {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  scrollbar-width: none;
}
.admin-tab-nav::-webkit-scrollbar { display: none; }
.admin-tab-btn {
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background-color: var(--bg-hover);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.admin-tab-btn.active {
  background-color: var(--admin-600);
  color: #ffffff;
  border-color: var(--admin-600);
}
.admin-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}
.admin-tool-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}
.admin-tool-card:hover {
  border-color: var(--admin-500);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.admin-tool-header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.admin-tool-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background-color: var(--admin-100);
  color: var(--admin-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.admin-tool-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}
.admin-tool-desc {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.3;
}
.admin-tool-action-btn {
  margin-top: auto;
  padding: 0.3rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 800;
  border-radius: var(--radius-sm);
  background-color: var(--admin-600);
  color: #fff;
  border: none;
  cursor: pointer;
  text-align: center;
}

/* PRIVATE CHAT EDIANE & CITIZEN */
.chat-messages-container {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 320px;
  overflow-y: auto;
  padding: 0.5rem;
  background-color: var(--bg-main);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}
.chat-msg-bubble {
  max-width: 82%;
  padding: 0.55rem 0.8rem;
  border-radius: 14px;
  font-size: 0.82rem;
  line-height: 1.4;
  position: relative;
}
.chat-msg-sent {
  align-self: flex-end;
  background-color: var(--primary-600);
  color: #ffffff;
  border-bottom-right-radius: 2px;
}
.chat-msg-received {
  align-self: flex-start;
  background-color: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-bottom-left-radius: 2px;
}

/* OFÍCIO LEGAL DOCUMENT GENERATOR */
.oficio-document-paper {
  background-color: #ffffff;
  border: 2px solid #000000;
  padding: 1.5rem 1.25rem;
  font-family: 'Times New Roman', Times, serif;
  color: #000;
  line-height: 1.5;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  font-size: 0.9rem;
}
.oficio-header-title {
  text-align: center;
  font-weight: bold;
  font-size: 1.05rem;
  text-transform: uppercase;
  border-bottom: 2px solid #000;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

