/*
 * Auth MD — Stylesheet
 */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: #F0F4FA;
  color: #1a2340;
  -webkit-font-smoothing: antialiased;
}

/* ── Flash ── */
.flash-stack {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 500;
  display: flex; flex-direction: column; gap: 8px;
  max-width: 360px; width: 100%;
  pointer-events: none;
}
.flash-item {
  background: white;
  border: 1px solid #dde3ef;
  border-left: 3px solid;
  border-radius: 0 6px 6px 0;
  padding: 12px 16px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  font-size: 13.5px; font-weight: 500;
  box-shadow: 0 4px 12px rgba(21,65,148,0.1);
  animation: slideIn 0.2s ease;
  pointer-events: all;
}
.flash-notice { border-left-color: #16a34a; color: #14532d; }
.flash-alert  { border-left-color: #dc2626; color: #7f1d1d; }
.flash-info   { border-left-color: #006DFF; color: #154194; }
.flash-x {
  background: none; border: none; cursor: pointer;
  color: #9ca3af; font-size: 16px; line-height: 1; padding: 0; flex-shrink: 0;
  transition: color 0.15s;
}
.flash-x:hover { color: #374151; }
@keyframes slideIn {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Auth card ── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.auth-card {
  background: white;
  border: 1.5px solid #dde3ef;
  border-radius: 12px;
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(21,65,148,0.1);
}
.auth-card-header {
  background: #154194;
  padding: 2rem 2rem 1.75rem;
  text-align: center;
}
/* Marca (shared/_brand): lupa do Melhores Destinos + "Meu MD" no mesmo
   desenho do "Melhores Destinos" da Comunidade MD (Plus Jakarta Sans 800,
   segunda palavra no ciano da lupa). */
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  margin-bottom: 1.25rem;
}
.brand-lockup-mark { display: block; height: 40px; width: auto; flex-shrink: 0; }
.brand-lockup-text { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; line-height: 1; }
.brand-lockup-title { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; color: #fff; white-space: nowrap; }
.brand-lockup-accent { color: #0AC5F4; }
.brand-lockup-sub { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.18em; color: #9FB4CD; text-transform: uppercase; }
/* Barra fina do topo (configurações, aplicativos) */
.perfil-header .brand-lockup { margin: 0; }
.perfil-header .brand-lockup-mark { height: 32px; }
.perfil-header .brand-lockup-title { font-size: 1.15rem; }
.perfil-home-hero .brand-lockup { margin-bottom: 0.4rem; }
.perfil-home-hero .brand-lockup-mark { height: 50px; }
.perfil-home-hero .brand-lockup-title { font-size: 1.7rem; }
.brand-lockup--admin {
  padding: 0 0.5rem 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,0.14);
  margin-bottom: 1rem;
}
.brand-lockup--admin .brand-lockup-mark { height: 36px; }
.brand-lockup--admin .brand-lockup-title { font-size: 1.2rem; }
.auth-card-header h1 {
  color: white;
  font-family: 'Lora', serif;
  font-size: 1.4rem;
  margin: 0 0 0.35rem;
  letter-spacing: -0.01em;
}
.auth-card-header p {
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
  margin: 0;
}

.auth-card-body { padding: 1.75rem 2rem 2rem; }

.auth-errors {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: #991b1b;
}
.auth-errors ul { margin: 0; padding-left: 1.2rem; }
.auth-errors li { margin-bottom: 0.2rem; }

.auth-field { margin-bottom: 1.1rem; }
.auth-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 0.4rem;
}
.auth-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid #dde3ef;
  border-radius: 6px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.95rem;
  color: #1a2340;
  background: white;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-input:focus {
  border-color: #006DFF;
  box-shadow: 0 0 0 3px rgba(0,109,255,0.1);
}
.auth-forgot {
  display: block;
  text-align: right;
  font-size: 0.8rem;
  color: #006DFF;
  text-decoration: none;
  margin-top: 0.35rem;
}
.auth-forgot:hover { text-decoration: underline; }
.auth-remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1.25rem;
}
.auth-remember input[type="checkbox"] { accent-color: #006DFF; }
.auth-submit {
  width: 100%;
  padding: 0.75rem;
  background: #006DFF;
  color: white;
  border: none;
  border-radius: 6px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.auth-submit:hover { background: #0056d6; }
.auth-submit:disabled { background: #b6c6de; cursor: not-allowed; }
.auth-submit:disabled:hover { background: #b6c6de; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: #9ca3af;
  font-size: 0.78rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #dde3ef;
}
.auth-oauth-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.65rem;
  border: 1.5px solid #dde3ef;
  border-radius: 6px;
  background: white;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a2340;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
  margin-bottom: 0.6rem;
}
.auth-oauth-btn:hover { border-color: #154194; background: #f5f7fd; }

.auth-footer {
  padding: 1rem 2rem 1.5rem;
  border-top: 1px solid #dde3ef;
  text-align: center;
  font-size: 0.875rem;
  color: #6b7280;
}
.auth-footer a { color: #006DFF; text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

.auth-remember a { color: #006DFF; text-decoration: none; font-weight: 600; }
.auth-remember a:hover { text-decoration: underline; }
.auth-terms-body { color: #1a2340; line-height: 1.6; }

.airport-autocomplete-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  background: white;
  border: 1.5px solid #dde3ef;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(21,65,148,0.14);
  list-style: none;
  margin: 0;
  padding: 0.35rem;
  max-height: 220px;
  overflow-y: auto;
}
.airport-autocomplete-suggestions li {
  padding: 0.5rem 0.7rem;
  border-radius: 6px;
  font-size: 0.88rem;
  color: #1a2340;
  cursor: pointer;
}
.airport-autocomplete-suggestions li:hover { background: #f5f7fd; }
.airport-autocomplete-suggestions li.airport-suggestion-city { font-weight: 600; }
.airport-autocomplete-suggestions li.airport-suggestion-airport {
  padding-left: 1.5rem;
  font-size: 0.82rem;
  color: #4a5578;
}
[data-controller="airport-autocomplete"] { position: relative; }

/* ── Perfil ── */
.perfil-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #F0F4FA;
}

.perfil-header {
  background: #154194;
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.perfil-header-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.perfil-header-email {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
}
.perfil-header-logout {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  border-radius: 6px;
  padding: 0.35rem 0.85rem;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.perfil-header-logout:hover { background: rgba(255,255,255,0.2); }

.perfil-main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 2.5rem 1rem;
}

.perfil-card {
  background: white;
  border: 1.5px solid #dde3ef;
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  padding: 2rem;
  box-shadow: 0 4px 24px rgba(21,65,148,0.08);
  height: fit-content;
}

.perfil-card-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #dde3ef;
}
.perfil-card-header h1 {
  font-family: 'Lora', serif;
  font-size: 1.35rem;
  color: #1a2340;
  margin: 0 0 0.25rem;
}
.perfil-card-header p {
  color: #6b7280;
  font-size: 0.875rem;
  margin: 0;
}

.perfil-card--settings { max-width: 820px; }
.perfil-settings-layout { display: grid; grid-template-columns: 200px 1fr; gap: 2rem; }
.perfil-settings-nav { display: flex; flex-direction: column; gap: 0.25rem; }
.perfil-settings-nav-item {
  padding: 0.55rem 0.75rem; border-radius: 6px; text-decoration: none;
  color: #4b5567; font-size: 0.85rem; font-weight: 600;
}
.perfil-settings-nav-item:hover { background: #f5f7fd; }
.perfil-settings-nav-item--active { background: #eef2fb; color: #154194; }
.perfil-settings-content { min-width: 0; }

@media (max-width: 680px) {
  .perfil-settings-layout { grid-template-columns: 1fr; }
  .perfil-settings-nav { flex-direction: row; overflow-x: auto; }
}

/* ── Perfil: tela inicial (capa + grade) ── */
.perfil-home { min-height: 100vh; background: #F0F4FA; padding-bottom: 3rem; }

.perfil-home-hero {
  background: linear-gradient(120deg, #154194, #0d2f6e);
  padding: 2.2rem 1.5rem 4.2rem;
  text-align: center;
  color: white;
  position: relative;
}
.perfil-home-hero p { font-size: 0.85rem; opacity: 0.7; margin: 0.3rem 0 0; }

.perfil-home-menu { position: absolute; top: 1.4rem; right: 1.5rem; display: flex; gap: 0.5rem; }
.perfil-home-menu-toggle {
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.15s;
}
.perfil-home-menu-toggle:hover { background: rgba(255,255,255,0.2); }
.perfil-home-menu-dropdown {
  position: absolute; top: calc(100% + 0.5rem); right: 0; background: white; color: #1a2340;
  border: 1.5px solid #dde3ef; border-radius: 10px; box-shadow: 0 8px 28px rgba(21,65,148,0.18);
  min-width: 180px; padding: 0.4rem; text-align: left;
}
.perfil-home-menu-item {
  display: block; padding: 0.6rem 0.75rem; border-radius: 6px; text-decoration: none;
  color: #1a2340; font-size: 0.85rem; font-weight: 600;
}
.perfil-home-menu-item:hover { background: #f5f7fd; }

.perfil-home-identity { text-align: center; margin-top: -3.2rem; margin-bottom: 2rem; padding: 0 1.5rem; position: relative; z-index: 1; }
.perfil-home-avatar {
  width: 92px; height: 92px; border-radius: 50%; object-fit: cover;
  background: linear-gradient(135deg, #154194, #0d2f6e);
  display: flex; align-items: center; justify-content: center; margin: 0 auto;
  color: white; font-family: 'Lora', serif; font-weight: 700; font-size: 1.9rem;
  border: 4px solid #F0F4FA;
}
.perfil-avatar-actions { display: flex; justify-content: center; gap: 0.5rem; margin-top: 0.6rem; }
.perfil-avatar-form, .perfil-avatar-actions form { margin: 0; }
.perfil-avatar-action {
  width: 34px; height: 34px; border-radius: 50%; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: white; color: #154194; border: 1.5px solid #dde3ef; cursor: pointer;
  box-shadow: 0 1px 3px rgba(26, 35, 64, 0.12);
}
.perfil-avatar-action:hover { background: #f5f7fd; }
.perfil-avatar-action:focus-visible, .perfil-avatar-action:focus-within { outline: 2px solid #154194; outline-offset: 2px; }
.perfil-avatar-action--danger { color: #b91c1c; }
.perfil-avatar-action:disabled { opacity: 0.4; cursor: default; box-shadow: none; }
.perfil-avatar-action:disabled:hover { background: white; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.perfil-home-identity h1 { font-family: 'Lora', serif; font-size: 1.25rem; margin: 0.85rem 0 0.15rem; color: #1a2340; }
.perfil-home-identity > p { font-size: 0.85rem; color: #6b7280; margin: 0 0 0.9rem; }
.perfil-home-logout {
  background: white; border: 1.5px solid #dde3ef; color: #1a2340;
  border-radius: 6px; padding: 0.4rem 1rem; font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.8rem; font-weight: 600; cursor: pointer;
}
.perfil-home-logout:hover { background: #f5f7fd; }

.perfil-home-body { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; }
.perfil-home-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1.5rem; }

.perfil-home-panel {
  background: white; border: 1.5px solid #dde3ef; border-radius: 14px; padding: 1.6rem;
  box-shadow: 0 4px 24px rgba(21,65,148,0.06);
}

.perfil-home-rail { display: flex; flex-direction: column; gap: 1.2rem; }
.perfil-home-rail .perfil-home-panel { padding: 1.3rem; }

.perfil-home-app-row + .perfil-home-app-row,
.perfil-home-community-row + .perfil-home-community-row {
  margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px solid #f3f4f6;
}
.perfil-home-app-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; }
.perfil-home-app-badge {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 800; font-size: 0.68rem; font-family: 'Lora', serif;
}
.perfil-home-app-head strong { font-size: 0.88rem; color: #1a2340; }

.perfil-home-store-links { display: flex; gap: 0.5rem; }
.perfil-home-store-badge {
  display: flex; align-items: center; gap: 0.45rem; flex: 1;
  background: #0b0f19; color: white; border-radius: 7px; padding: 0.4rem 0.65rem;
  text-decoration: none;
}
.perfil-home-store-text { display: flex; flex-direction: column; line-height: 1.15; }
.perfil-home-store-text small { font-size: 0.55rem; opacity: 0.75; }
.perfil-home-store-text strong { font-size: 0.72rem; font-weight: 700; color: white; }

.perfil-home-community-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.perfil-home-community-icons { display: flex; gap: 0.5rem; flex-shrink: 0; }
.perfil-home-icon-badge {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.perfil-home-icon-badge--whatsapp { background: #25d366; }
.perfil-home-icon-badge--telegram { background: #29a3e0; }

.perfil-home-panel--sites { margin-top: 1.5rem; }

.perfil-home-panel--danger { margin-top: 1.5rem; border-color: #f3d6d6; }
.perfil-home-panel--danger .perfil-section-desc { max-width: 640px; }
.perfil-home-delete-account {
  background: white; border: 1.5px solid #e4b8b8; color: #b42318;
  border-radius: 6px; padding: 0.55rem 1.1rem; font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.85rem; font-weight: 600; cursor: pointer; margin-top: 0.75rem;
}
.perfil-home-delete-account:hover { background: #fdf3f3; }
.perfil-home-sites-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 0.5rem; }
.perfil-home-site-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
  text-align: center; text-decoration: none; color: #1a2340;
  border: 1.5px solid #dde3ef; border-radius: 14px; padding: 2rem 1rem;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.perfil-home-site-card:hover {
  border-color: #154194; box-shadow: 0 8px 24px rgba(21,65,148,0.12); transform: translateY(-2px);
}
.perfil-home-site-card strong { font-size: 1rem; }
.perfil-home-app-badge--lg {
  width: 52px; height: 52px; border-radius: 14px; font-size: 1rem;
}

@media (max-width: 780px) {
  .perfil-home-sites-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .perfil-home-sites-grid { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .perfil-home-grid { grid-template-columns: 1fr; }
  .perfil-home-store-links { flex-direction: column; }
}

.perfil-section {
  margin-bottom: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid #f3f4f6;
}
.perfil-section:last-of-type { border-bottom: none; }

.perfil-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
  margin: 0 0 1rem;
}
.perfil-section-desc {
  font-size: 0.85rem;
  color: #6b7280;
  margin: -0.5rem 0 1rem;
}

.perfil-newsletter-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1.5px solid #dde3ef;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.perfil-newsletter-option:hover { border-color: #006DFF; background: #f5f7fd; }

.perfil-newsletter-info {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}
.perfil-newsletter-info div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.perfil-newsletter-info strong {
  font-size: 0.9rem;
  color: #1a2340;
}
.perfil-newsletter-info span {
  font-size: 0.8rem;
  color: #6b7280;
}

.perfil-newsletter-badge {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.perfil-newsletter-badge img { width: 100%; height: 100%; object-fit: contain; }
/* O ícone do MD já é um quadrado azul; os de MC e Descontos têm fundo transparente. */
.perfil-newsletter-badge--mc { background: #e8f8ef; padding: 6px; }
.perfil-newsletter-badge--desconto { background: #fff1e6; padding: 6px; }

.perfil-toggle {
  width: 20px;
  height: 20px;
  accent-color: #006DFF;
  cursor: pointer;
  flex-shrink: 0;
}

.perfil-card-header-nav { margin-bottom: 0.75rem; }
.perfil-back-link {
  font-size: 0.82rem;
  color: #006DFF;
  text-decoration: none;
  font-weight: 600;
}
.perfil-back-link:hover { text-decoration: underline; }

.perfil-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #6b7280;
}
.perfil-empty-icon { font-size: 2rem; display: block; margin-bottom: 0.75rem; }
.perfil-empty p { margin: 0; font-size: 0.9rem; }

.perfil-apps-list { display: flex; flex-direction: column; gap: 0.75rem; }

.perfil-app-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1.5px solid #dde3ef;
  border-radius: 8px;
}
.perfil-app-icon {
  width: 40px;
  height: 40px;
  background: #154194;
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Lora', serif;
  font-weight: 700;
  font-size: 0.78rem;
  flex-shrink: 0;
}
.perfil-app-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.perfil-app-info strong { font-size: 0.9rem; color: #1a2340; }
.perfil-app-info span  { font-size: 0.8rem; color: #6b7280; }

.perfil-app-revoke {
  background: none;
  border: 1.5px solid #fecaca;
  color: #dc2626;
  border-radius: 6px;
  padding: 0.35rem 0.85rem;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.perfil-app-revoke:hover { background: #fef2f2; border-color: #dc2626; }

/* ===== Admin ===== */

.admin-shell { min-height: 100vh; display: flex; background: #F0F4FA; }

.admin-sidebar {
  width: 236px;
  flex-shrink: 0;
  background: linear-gradient(170deg, #154194, #0d2f6e);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0.85rem;
}
.admin-side-label {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(255,255,255,0.45);
  padding: 0.6rem 0.55rem 0.35rem;
}
.admin-side-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.6rem;
  border-radius: 7px;
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  transition: background 0.12s;
}
.admin-side-item:hover { background: rgba(255,255,255,0.09); }
.admin-side-item.active { background: rgba(255,255,255,0.16); color: #fff; font-weight: 700; }
.admin-side-item svg { flex-shrink: 0; opacity: 0.85; }

.admin-side-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.14);
  padding-top: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.admin-side-user { min-width: 0; }
.admin-side-user strong {
  display: block;
  font-size: 0.75rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-side-user span { font-size: 0.66rem; color: rgba(255,255,255,0.5); }
.admin-side-logout {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}
.admin-side-logout:hover { background: rgba(255,255,255,0.2); }

.admin-main {
  flex: 1;
  min-width: 0;
  padding: 1.75rem clamp(1rem, 3vw, 2.5rem);
  max-width: 1000px;
}

.admin-page-head { margin-bottom: 1.4rem; }
.admin-page-head h1 {
  font-family: 'Lora', serif;
  font-size: 1.45rem;
  color: #1a2340;
  margin: 0 0 0.2rem;
}
.admin-page-head p { margin: 0; color: #6b7280; font-size: 0.86rem; }

.admin-back { font-size: 0.82rem; color: #006DFF; font-weight: 600; text-decoration: none; }
.admin-back:hover { text-decoration: underline; }

.admin-card {
  background: #fff;
  border: 1.5px solid #dde3ef;
  border-radius: 12px;
  padding: 1.4rem 1.5rem;
  box-shadow: 0 4px 24px rgba(21,65,148,0.06);
  margin-bottom: 1.25rem;
}
.admin-card-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #6b7280;
  font-weight: 700;
  margin: 0 0 0.9rem;
}

.admin-badge {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 0.16rem 0.55rem;
  white-space: nowrap;
}
.admin-badge--adm { background: #fef3c7; color: #92400e; }
.admin-badge--on  { background: #dcfce7; color: #15803d; }
.admin-badge--off { background: #f3f4f6; color: #6b7280; }
.admin-badge--danger { background: #fee2e2; color: #b42318; }

.admin-detail-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, #154194, #0d2f6e);
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
  color: #fff;
  margin-bottom: 1.25rem;
}
.admin-detail-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.85);
  flex-shrink: 0;
}
.admin-avatar-remove {
  background: none; border: 0; padding: 0; margin-top: 0.35rem; cursor: pointer;
  font: inherit; font-size: 0.75rem; color: #b91c1c; text-decoration: underline;
}
.admin-detail-avatar--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.15);
  font-family: 'Lora', serif;
  font-weight: 700;
  font-size: 1.15rem;
}
.admin-detail-hero h1 {
  font-family: 'Lora', serif;
  font-size: 1.2rem;
  margin: 0 0 0.2rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
/* :not(.admin-badge): sem isso o badge "admin" do h1 herda o branco e some no fundo amarelo */
.admin-detail-hero span:not(.admin-badge) { font-size: 0.82rem; color: rgba(255,255,255,0.72); }
.admin-detail-hero > div { min-width: 0; overflow-wrap: anywhere; }

.admin-grid2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.admin-app-head { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.1rem; }
.admin-app-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #154194, #0d2f6e);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Lora', serif;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.admin-app-title { flex: 1; min-width: 0; }
.admin-app-title h2 { font-family: 'Lora', serif; font-size: 1.1rem; color: #1a2340; margin: 0 0 0.25rem; }
.admin-app-title span { font-size: 0.8rem; color: #6b7280; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.admin-app-since { font-size: 0.78rem; color: #9ca3af; white-space: nowrap; flex-shrink: 0; }

.admin-app-dl { grid-template-columns: 120px minmax(0, 1fr); align-items: start; row-gap: 0.7rem; }
.admin-app-dl code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  background: #f3f4f6;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  color: #1a2340;
  word-break: break-all;
}
.admin-app-dl .admin-chip { margin-right: 0.35rem; }

.admin-uri-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }

/* Admin: cabeçalho com ação à direita + botões de app */
.admin-page-head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.admin-new-btn { display: inline-flex; align-items: center; padding: 0.6rem 1.1rem; text-decoration: none; white-space: nowrap; }

.admin-app-actions { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.admin-app-remove {
  background: none;
  border: 1.5px solid #fecaca;
  color: #dc2626;
  border-radius: 6px;
  padding: 0.3rem 0.75rem;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.admin-app-remove:hover { background: #fef2f2; border-color: #dc2626; }

.admin-app-card--new { border-color: #86efac; box-shadow: 0 0 0 3px rgba(134,239,172,0.35); }

/* Admin: banner do secret recém-criado */
.admin-secret-banner { border-color: #fde68a; background: #fffbeb; }
.admin-secret-value {
  margin-top: 0.75rem;
  background: #26241f;
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  overflow-x: auto;
}
.admin-secret-value code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9rem;
  color: #f2efe6;
  word-break: break-all;
}

/* Admin: formulário de app */
.admin-form { max-width: 620px; }
.admin-field-hint { font-size: 0.78rem; color: #6b7280; margin: -0.2rem 0 0.5rem; }
.admin-textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; resize: vertical; }
.admin-inline-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem; background: #f3f4f6; padding: 0.1rem 0.4rem; border-radius: 4px; word-break: break-all;
}

.admin-radio {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid #dde3ef;
  border-radius: 8px;
  margin-bottom: 0.6rem;
  cursor: pointer;
}
.admin-radio:hover { border-color: #006DFF; background: #f5f7fd; }
.admin-radio input { margin-top: 0.2rem; accent-color: #006DFF; }
.admin-radio strong { display: block; font-size: 0.9rem; color: #1a2340; }
.admin-radio em { font-style: normal; font-size: 0.8rem; color: #6b7280; }

.admin-checks { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.admin-check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border: 1.5px solid #dde3ef;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
}
.admin-check:hover { border-color: #006DFF; }
.admin-check input { accent-color: #006DFF; }

.admin-form-actions { display: flex; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.admin-submit { width: auto; padding: 0.7rem 1.5rem; }
.admin-cancel { color: #6b7280; text-decoration: none; font-size: 0.86rem; font-weight: 600; }
.admin-cancel:hover { color: #1a2340; }

.admin-search { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.admin-search .auth-input { flex: 1; min-width: 0; }
.admin-search-btn {
  background: #006DFF;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0 1.25rem;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.admin-search-btn:hover { background: #0056d6; }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.admin-table th {
  text-align: left;
  padding: 0.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  border-bottom: 1.5px solid #e5e7eb;
}
.admin-table td { padding: 0.65rem 0.5rem; border-bottom: 1px solid #f3f4f6; vertical-align: top; }

.admin-muted { color: #6b7280; font-size: 0.8rem; }
.admin-num { text-align: right; font-variant-numeric: tabular-nums; }
.admin-table th.admin-num { text-align: right; }
.admin-row-group td { background: #f8fafc; }
.admin-period-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.25rem; }
.admin-period-tab {
  padding: 0.35rem 0.8rem; border-radius: 999px; border: 1.5px solid #e5e7eb;
  color: #374151; font-size: 0.8rem; font-weight: 600; text-decoration: none;
}
.admin-period-tab:hover { background: #f5f7fd; }
.admin-period-tab.active { background: #154194; border-color: #154194; color: #fff; }
.admin-period-tab--disabled { color: #c4c9d4; border-color: #f0f1f4; cursor: default; }
.admin-period-tab--disabled:hover { background: none; }

/* Admin do Meu MD em destaque na lista de usuários */
.admin-row-admin td { background: #fffbeb; }
.admin-row-admin td:first-child { box-shadow: inset 3px 0 0 #f59e0b; }

.admin-pagination {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  margin-top: 1.1rem; text-align: center;
}
.admin-search select.auth-input { flex: 0 1 220px; }
.admin-search input[type="date"].auth-input { flex: 0 1 170px; }
.admin-link { color: #006DFF; font-weight: 600; text-decoration: none; }
.admin-link:hover { text-decoration: underline; }
.admin-user-name { color: #1a2340; font-weight: 700; text-decoration: none; }
.admin-user-name:hover { color: #006DFF; text-decoration: underline; }

.admin-dl {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  row-gap: 0.5rem;
  font-size: 0.875rem;
}
.admin-dl dt { color: #6b7280; }
.admin-dl dd { margin: 0; overflow-wrap: anywhere; }

.admin-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.admin-chip {
  background: #f3f4f6;
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  white-space: nowrap;
}
.admin-chip--app { background: #eaf1ff; color: #154194; font-weight: 600; }

.admin-stats { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem; }
.admin-stat {
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.6rem 1rem;
  display: flex;
  flex-direction: column;
  min-width: 90px;
}
.admin-stat strong { font-size: 1.25rem; }
.admin-stat span { font-size: 0.75rem; color: #6b7280; }

.admin-timeline { list-style: none; padding: 0; margin: 0; }
.admin-activity {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.875rem;
}
.admin-activity-time { color: #6b7280; font-size: 0.8rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.admin-activity-desc { min-width: 0; }

.activity-search-wrap { position: relative; margin-bottom: 1.75rem; }

.activity-search-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  background: white;
  border: 1.5px solid #dde3ef;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(21,65,148,0.14);
  list-style: none;
  margin: 0;
  padding: 0.35rem;
  max-height: 280px;
  overflow-y: auto;
}
.activity-search-suggestions li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #1a2340;
  cursor: pointer;
}
.activity-search-suggestions li:hover { background: #f5f7fd; }
.activity-search-suggestions li.activity-search-empty {
  color: #9ca3af;
  cursor: default;
}
.activity-search-suggestions li.activity-search-empty:hover { background: none; }
.activity-search-email { font-size: 0.78rem; color: #9ca3af; }

.activity-search-empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #6b7280;
  font-size: 0.9rem;
}

.activity-search-results-title {
  font-family: 'Lora', serif;
  font-size: 1.1rem;
  color: #1a2340;
  margin: 0 0 0.85rem;
}

/* Admin no celular: menu vira cabeçalho compacto (marca + Sair) com as
   seções numa faixa de rolagem horizontal, e as telas se ajustam à largura */
@media (max-width: 760px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    row-gap: 0.6rem;
    padding: 0.7rem 0 0.6rem;
  }
  .brand-lockup--admin { border: none; margin: 0; padding: 0 0 0 1rem; }
  .brand-lockup--admin .brand-lockup-mark { height: 30px; }
  .brand-lockup--admin .brand-lockup-sub { display: none; }
  .admin-side-footer {
    grid-row: 1;
    grid-column: 2;
    margin: 0;
    border-top: none;
    padding: 0 1rem 0 0;
  }
  .admin-side-user { display: none; }
  .admin-side-logout { padding: 0.45rem 0.85rem; font-size: 0.78rem; }

  .admin-side-nav {
    grid-column: 1 / -1;
    position: relative;
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    padding: 0 1rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .admin-side-nav::-webkit-scrollbar { display: none; }
  .admin-side-label { display: none; }
  .admin-side-item {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
  }

  .admin-main { max-width: none; padding: 1.25rem 1rem 2rem; }
  .admin-card { padding: 1.1rem 1rem; border-radius: 10px; }
  .admin-page-head h1 { font-size: 1.3rem; }
  .admin-page-head--row { flex-direction: column; align-items: stretch; }
  .admin-new-btn { justify-content: center; padding: 0.75rem 1.1rem; }

  /* 16px evita o zoom automático do iOS ao focar o campo */
  .admin-main .auth-input { font-size: 16px; }
  .admin-search .auth-input,
  .admin-search select.auth-input,
  .admin-search input[type="date"].auth-input { flex: 1 1 100%; }
  .admin-search-btn { flex: 1 1 100%; padding: 0.75rem 1rem; }

  /* Tabela de usuários vira lista de cartões, com o rótulo de cada coluna em data-label */
  .admin-table--stack thead { display: none; }
  .admin-table--stack,
  .admin-table--stack tbody,
  .admin-table--stack td { display: block; }
  .admin-table--stack tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem 0.75rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid #e5e7eb;
  }
  .admin-table--stack td { padding: 0; border: none; font-size: 0.82rem; }
  .admin-table--stack td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #9ca3af;
    margin-bottom: 0.1rem;
  }
  .admin-table--stack .admin-cell-main { grid-column: 1 / -1; font-size: 0.9rem; overflow-wrap: anywhere; }
  .admin-table--stack .admin-cell-action { display: none; }
  .admin-table--stack .admin-row-admin {
    background: #fffbeb;
    box-shadow: inset 3px 0 0 #f59e0b;
    padding: 0.85rem 0.75rem 0.85rem 0.9rem;
  }
  .admin-table--stack .admin-row-admin td { background: none; box-shadow: none; }
  .admin-pagination { flex-wrap: wrap; }
  .admin-pagination .admin-muted { order: -1; flex-basis: 100%; }

  .admin-detail-hero { padding: 1rem; align-items: flex-start; }
  .admin-detail-avatar { width: 48px; height: 48px; }
  .admin-detail-hero h1 { font-size: 1.1rem; }

  /* Lista rótulo/valor: rótulo em cima do valor, sem coluna fixa de 120–140px */
  .admin-dl, .admin-app-dl { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .admin-dl dt { font-size: 0.75rem; margin-top: 0.7rem; }
  .admin-dl dt:first-child { margin-top: 0; }
  .admin-dl dd { margin-top: 0.15rem; }

  /* Cartões de app/termo: ações descem pra uma linha própria em vez de espremer o título */
  .admin-app-head { flex-wrap: wrap; }
  .admin-app-actions {
    width: 100%;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
  }
  .admin-app-remove { padding: 0.45rem 0.9rem; }

  .admin-activity { flex-wrap: wrap; row-gap: 0.3rem; }
  .admin-activity-desc { flex-basis: 100%; }

  .admin-form-actions { flex-direction: column-reverse; align-items: stretch; text-align: center; }
  .admin-submit { width: 100%; }
}
