:root {
  --green-dark: #075e54;
  --green: #128c7e;
  --green-light: #25d366;
  --teal-panel: #008069;
  --chat-bg: #e5ddd5;
  --out-bubble: #dcf8c6;
  --in-bubble: #ffffff;
  --panel: #f0f2f5;
  --border: #e9edef;
  --text: #111b21;
  --muted: #667781;
  --danger: #ea4335;
  --shadow: 0 1px 3px rgba(11,20,26,.08);
  --radius: 8px;
  --header-h: 56px;
  --composer-h: 62px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  height: 100%;
  height: 100dvh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: #0b141a;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ========== LOGIN ========== */
#screen-login {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(24px + var(--safe-top)) 20px calc(24px + var(--safe-bottom));
  background: linear-gradient(160deg, #0b141a 0%, #075e54 60%, #128c7e 100%);
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px 24px;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
}
.login-logo {
  width: 64px; height: 64px; margin: 0 auto 12px;
  border-radius: 16px;
  background: var(--green-dark);
  display: grid; place-items: center;
  color: #fff; font-size: 28px; font-weight: 700;
}
.login-card h1 {
  margin: 0 0 4px; text-align: center; font-size: 1.35rem;
}
.login-card .sub {
  text-align: center; color: var(--muted); font-size: .9rem; margin: 0 0 20px;
}
.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: .8rem; color: var(--muted); margin-bottom: 6px;
}
.field input {
  width: 100%; padding: 14px 14px; border: 1px solid #d1d7db;
  border-radius: 10px; outline: none; font-size: 1rem;
}
.field input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(18,140,126,.15); }
.btn-primary {
  width: 100%; padding: 14px; border-radius: 10px;
  background: var(--green-dark); color: #fff; font-weight: 600; font-size: 1rem;
  min-height: 48px;
}
.btn-primary:active { opacity: .9; }
.login-hint {
  margin-top: 14px; font-size: .78rem; color: var(--muted); text-align: center;
}
.banner-fake {
  margin-top: 16px; padding: 10px 12px; border-radius: 8px;
  background: #fff8e1; color: #7a5c00; font-size: .78rem; line-height: 1.35;
}

/* ========== APP SHELL ========== */
#screen-app { display: none; height: 100dvh; }
#screen-app.active { display: flex; }

.app {
  display: flex;
  width: 100%;
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
  background: #fff;
  overflow: hidden;
}

/* Sidebar / list */
.sidebar {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: #fff;
  border-right: 1px solid var(--border);
  position: relative;
}
.side-header {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 12px;
  height: calc(var(--header-h) + var(--safe-top));
  padding: var(--safe-top) 12px 0 calc(12px + var(--safe-left));
  background: var(--panel);
}
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--green); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: .95rem;
  flex: 0 0 auto; overflow: hidden;
}
.avatar.sm { width: 48px; height: 48px; font-size: 1.05rem; }
.avatar.xs { width: 36px; height: 36px; font-size: .85rem; }
.side-title { flex: 1; font-weight: 600; font-size: 1.1rem; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; color: var(--muted);
}
.icon-btn:active { background: rgba(0,0,0,.06); }
.search-wrap {
  flex: 0 0 auto;
  padding: 8px 12px;
  background: #fff;
}
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel); border-radius: 8px; padding: 8px 12px;
}
.search-box input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: .95rem; min-height: 28px;
}
.chat-list {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.chat-item {
  display: flex; gap: 12px; align-items: center;
  padding: 12px 14px; min-height: 72px;
  border-bottom: 1px solid var(--border);
  width: 100%; text-align: left;
}
.chat-item:active, .chat-item.active { background: #f5f6f6; }
.chat-meta { flex: 1; min-width: 0; }
.chat-top {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
}
.chat-name {
  font-weight: 600; font-size: 1.02rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-time { font-size: .75rem; color: var(--muted); flex: 0 0 auto; }
.chat-time.unread { color: var(--green-light); font-weight: 600; }
.chat-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 2px;
}
.chat-preview {
  font-size: .88rem; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1;
}
.badge {
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px; background: var(--green-light); color: #fff;
  font-size: .72rem; font-weight: 700;
  display: grid; place-items: center; flex: 0 0 auto;
}
.side-footer {
  flex: 0 0 auto;
  padding: 8px 12px calc(8px + var(--safe-bottom));
  font-size: .72rem; color: var(--muted); text-align: center;
  border-top: 1px solid var(--border); background: #fff;
}

/* Chat pane */
.chat-pane {
  display: none;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: var(--chat-bg);
  position: absolute; inset: 0; z-index: 5;
}
.chat-pane.open { display: flex; }
.chat-header {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 8px;
  height: calc(var(--header-h) + var(--safe-top));
  padding: var(--safe-top) 8px 0 calc(4px + var(--safe-left));
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
.back-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; color: var(--muted); flex: 0 0 auto;
}
.back-btn:active { background: rgba(0,0,0,.06); }
.chat-header .info { flex: 1; min-width: 0; }
.chat-header .info .name {
  font-weight: 600; font-size: 1.02rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-header .info .status {
  font-size: .75rem; color: var(--muted);
}
.messages {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 12px 12px 8px;
  background-image:
    linear-gradient(rgba(229,221,213,.92), rgba(229,221,213,.92)),
    url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h60v60H0z' fill='%23d4ccc4'/%3E%3Cpath d='M30 8l2 6h6l-5 4 2 6-5-4-5 4 2-6-5-4h6z' fill='%23cbbfb4' opacity='.35'/%3E%3C/svg%3E");
}
.day-sep {
  display: flex; justify-content: center; margin: 10px 0;
}
.day-sep span {
  background: #e1f2fb; color: #54656f;
  font-size: .75rem; padding: 6px 12px; border-radius: 8px;
  box-shadow: var(--shadow);
}
.row {
  display: flex; margin-bottom: 4px;
}
.row.out { justify-content: flex-end; }
.row.in { justify-content: flex-start; }
.bubble {
  max-width: min(78%, 420px);
  padding: 6px 8px 4px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  position: relative;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.row.in .bubble { background: var(--in-bubble); border-top-left-radius: 0; }
.row.out .bubble { background: var(--out-bubble); border-top-right-radius: 0; }
.bubble .text { font-size: .95rem; line-height: 1.35; white-space: pre-wrap; }
.bubble .meta {
  display: flex; justify-content: flex-end; align-items: center; gap: 4px;
  margin-top: 2px; font-size: .68rem; color: var(--muted);
}
.ticks { letter-spacing: -1px; }
.ticks.pending { color: var(--muted); }
.ticks.sent { color: var(--muted); }
.ticks.read { color: #53bdeb; }
.media-img {
  width: 100%; max-width: 260px; border-radius: 6px; margin-bottom: 4px;
  background: #ccc; aspect-ratio: 4/3; object-fit: cover;
}
.doc-card {
  display: flex; align-items: center; gap: 10px;
  background: rgba(0,0,0,.04); border-radius: 6px; padding: 10px;
  min-width: 200px; margin-bottom: 4px;
}
.doc-icon {
  width: 40px; height: 40px; border-radius: 8px;
  background: #e53935; color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: .7rem;
  flex: 0 0 auto;
}
.doc-name { font-size: .9rem; font-weight: 600; }
.doc-size { font-size: .75rem; color: var(--muted); }
.audio-card {
  display: flex; align-items: center; gap: 10px;
  min-width: 220px; padding: 4px 2px 2px;
}
.audio-play {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--green); color: #fff;
  display: grid; place-items: center; flex: 0 0 auto;
}
.audio-wave {
  flex: 1; height: 28px;
  background: repeating-linear-gradient(
    90deg,
    #aebac1 0 2px,
    transparent 2px 5px
  );
  border-radius: 4px; opacity: .7;
}
.audio-dur { font-size: .75rem; color: var(--muted); }

.composer {
  flex: 0 0 auto;
  display: flex; align-items: flex-end; gap: 6px;
  padding: 8px 8px calc(8px + var(--safe-bottom)) calc(8px + var(--safe-left));
  background: var(--panel);
  border-top: 1px solid var(--border);
}
.composer .attach, .composer .send {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; flex: 0 0 auto;
  color: var(--muted);
}
.composer .send {
  background: var(--green-dark); color: #fff;
}
.composer .send:disabled { opacity: .45; }
.composer .input-wrap {
  flex: 1; background: #fff; border-radius: 24px;
  padding: 10px 14px; min-height: 44px;
  display: flex; align-items: center;
  border: 1px solid transparent;
}
.composer textarea {
  width: 100%; border: none; outline: none; resize: none;
  max-height: 120px; line-height: 1.35; font-size: 1rem;
  background: transparent;
}
.attach-menu {
  position: absolute; bottom: calc(70px + var(--safe-bottom)); left: 12px;
  background: #fff; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.18);
  padding: 8px; display: none; z-index: 10; min-width: 180px;
}
.attach-menu.show { display: block; }
.attach-menu button {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 12px 14px; border-radius: 8px;
  font-size: .95rem; text-align: left; min-height: 48px;
}
.attach-menu button:active { background: var(--panel); }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: #fff3cd; color: #7a5c00;
  font-size: .7rem; padding: 2px 8px; border-radius: 999px;
  margin-left: 6px;
}

/* Empty state on desktop when no chat selected */
.empty-pane {
  display: none;
  flex: 1;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 8px;
  background: #f8f9fa; color: var(--muted);
  border-bottom: 6px solid var(--green-light);
}
.empty-pane .big { font-size: 1.25rem; color: var(--text); font-weight: 500; }
.empty-pane .hint { font-size: .9rem; max-width: 360px; text-align: center; }

/* Desktop two-pane */
@media (min-width: 768px) {
  .app { height: 100%; }
  .sidebar {
    width: 38%; max-width: 420px; min-width: 320px;
    flex: 0 0 auto;
  }
  .chat-pane {
    position: relative; inset: auto;
    display: none; flex: 1;
  }
  .chat-pane.open { display: flex; }
  .empty-pane { display: flex; }
  .empty-pane.hidden { display: none; }
  .back-btn { display: none; }
  .chat-item.active { background: #f0f2f5; }
  #screen-app.active {
    padding: 0;
    background: #0b141a;
  }
  .app {
    height: min(100dvh, 920px);
    margin-top: max(0px, calc((100dvh - 920px) / 2));
    border-radius: 0;
    box-shadow: 0 0 0 1px rgba(255,255,255,.04);
  }
}
@media (min-width: 1024px) {
  .sidebar { width: 34%; }
}

/* Offline banner demo */
.offline-bar {
  display: none;
  background: #182229; color: #fff;
  font-size: .8rem; text-align: center;
  padding: 6px 8px;
}
.offline-bar.show { display: block; }

/* ===================== WeAds Whats v1: complementos do protótipo ===================== */
[hidden] { display: none !important; }
.login-error { color: var(--danger); font-size: .85rem; min-height: 1.2em; margin: -4px 0 10px; }
.btn-primary:disabled { opacity: .6; }
.avatar { position: relative; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.side-actions { display: flex; align-items: center; }
.icon-btn.on { color: var(--green); }
.notice {
  display: flex; align-items: center; gap: 10px;
  margin: 0; padding: 10px 14px; font-size: .82rem; line-height: 1.35;
  background: #fff8e1; color: #6b5200; border-bottom: 1px solid #f3e3a8;
}
.notice.info { background: #e7f6f3; color: #075e54; border-color: #cbe9e2; }
.notice.danger { background: #fdecea; color: #8a1c12; border-color: #f6c9c3; }
.notice button { margin-left: auto; font-weight: 600; color: inherit; text-decoration: underline; padding: 6px 4px; flex: 0 0 auto; }
.chat-empty { padding: 32px 24px; color: var(--muted); text-align: center; font-size: .9rem; }
.chat-preview .tick-inline { display: inline-flex; vertical-align: -2px; margin-right: 2px; }
.loading-more { text-align: center; color: var(--muted); font-size: .75rem; padding: 6px; }
.sender { font-size: .78rem; font-weight: 600; color: var(--green); margin-bottom: 2px; }
.text a { color: #027eb5; }
.ticks { display: inline-flex; align-items: center; }
.ticks svg { display: block; }
.ticks.read { color: #53bdeb; }
.ticks.fail { color: var(--danger); }
.ticks.warn { color: #c98a00; }
.msg-erro { font-size: .72rem; color: var(--danger); margin-top: 2px; text-align: right; }
.msg-erro.warn { color: #8a6200; }
.msg-erro button { color: inherit; text-decoration: underline; font-size: inherit; padding: 2px 0; }
.bubble.pending { opacity: .85; }
.media-img { aspect-ratio: auto; max-height: 340px; object-fit: cover; cursor: zoom-in; min-height: 80px; }
.media-sticker { width: 140px; height: 140px; object-fit: contain; background: transparent; }
.media-video { width: 100%; max-width: 300px; border-radius: 6px; margin-bottom: 4px; background: #000; display: block; }
.media-audio { width: 260px; max-width: 100%; height: 40px; display: block; margin: 2px 0 4px; }
.media-wait {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 240px; max-width: 100%; height: 120px; border-radius: 6px; margin-bottom: 4px;
  background: rgba(0,0,0,.06); color: var(--muted); font-size: .8rem; text-align: center; padding: 8px;
}
.media-wait.small { height: 48px; }
a.doc-card { color: inherit; text-decoration: none; }
.doc-icon.pdf { background: #e53935; } .doc-icon.doc { background: #1e88e5; } .doc-icon.xls { background: #2e7d32; }
.doc-icon.gen { background: #607d8b; }
.doc-name { word-break: break-all; }
.composer { position: relative; }
.preview-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 12;
  background: var(--panel); border-top: 1px solid var(--border);
  padding: 12px 12px calc(12px + var(--safe-bottom)); box-shadow: 0 -8px 24px rgba(0,0,0,.12);
}
.preview-sheet .pv-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.preview-sheet .pv-thumb { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; background: #ddd; flex: 0 0 auto; }
.preview-sheet .pv-info { flex: 1; min-width: 0; font-size: .85rem; }
.preview-sheet .pv-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview-sheet .pv-row { display: flex; gap: 8px; align-items: center; }
.preview-sheet input[type=text] { flex: 1; min-height: 44px; border-radius: 22px; border: 1px solid #d1d7db; padding: 0 14px; font-size: 1rem; outline: none; }
.preview-sheet .send { width: 44px; height: 44px; border-radius: 50%; background: var(--green-dark); color: #fff; display: grid; place-items: center; flex: 0 0 auto; }
.viewer { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; padding: var(--safe-top) 0 var(--safe-bottom); }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer .close { position: absolute; top: calc(8px + var(--safe-top)); right: 8px; color: #fff; width: 48px; height: 48px; font-size: 28px; }
.toast {
  position: fixed; left: 50%; bottom: calc(90px + var(--safe-bottom)); transform: translateX(-50%);
  background: #111b21; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: .85rem; z-index: 60;
  max-width: calc(100% - 32px); box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.menu-pop {
  position: absolute; top: calc(var(--header-h) + var(--safe-top) - 6px); right: 8px; z-index: 20;
  background: #fff; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.18); padding: 6px; min-width: 220px;
}
.menu-pop button { display: block; width: 100%; text-align: left; padding: 12px 14px; border-radius: 8px; font-size: .95rem; min-height: 44px; }
.menu-pop button:active { background: var(--panel); }
.menu-pop .who { padding: 8px 14px 10px; font-size: .78rem; color: var(--muted); border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.jump-bottom {
  position: absolute; right: 14px; bottom: calc(var(--composer-h) + 14px + var(--safe-bottom)); z-index: 6;
  width: 42px; height: 42px; border-radius: 50%; background: #fff; color: var(--muted); box-shadow: var(--shadow), 0 2px 8px rgba(0,0,0,.12);
  display: grid; place-items: center;
}
@media (min-width: 768px) {
  .composer textarea { font-size: .95rem; }
}
.app { position: relative; }

/* ===================== v2: Google, aprovação e administração ===================== */
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 10px;
  background: #fff; color: #1f1f1f; border: 1px solid #d1d7db; font-weight: 600; font-size: 1rem;
  text-decoration: none; box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.btn-google:active { background: #f5f6f6; }
.divider { display: flex; align-items: center; gap: 10px; margin: 18px 0 14px; color: var(--muted); font-size: .78rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.login-switch { margin: 16px 0 0; text-align: center; font-size: .88rem; color: var(--muted); }
.login-switch button { color: var(--green-dark); font-weight: 600; padding: 6px 2px; text-decoration: underline; }
.btn-secondary {
  width: 100%; min-height: 48px; margin-top: 10px; padding: 12px; border-radius: 10px;
  background: var(--panel); color: var(--text); font-weight: 600; font-size: .95rem;
}
.btn-secondary:active { background: #e4e7ea; }

#screen-pendente {
  min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  padding: calc(24px + var(--safe-top)) 20px calc(24px + var(--safe-bottom));
  background: linear-gradient(160deg, #0b141a 0%, #075e54 60%, #128c7e 100%);
}
.pend-card { text-align: center; }
.pend-card h1 { font-size: 1.2rem; line-height: 1.3; margin-bottom: 8px; }
.pend-card .sub { line-height: 1.45; }
.pend-icon {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%;
  background: #fff4d6; color: #b07800; display: grid; place-items: center;
}
.pend-conta {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: var(--panel); border-radius: 12px; padding: 12px; margin: 0 0 18px;
}
.pend-info { min-width: 0; flex: 1; }
.pend-nome { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pend-email { font-size: .82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.notice.warn { background: #fff8e1; color: #6b5200; border-color: #f3e3a8; }
.menu-pop #mi-admin { display: flex; align-items: center; gap: 8px; }
.menu-pop #mi-admin[hidden] { display: none !important; }
.menu-pop .badge { margin-left: auto; }

/* Tela de administração: ocupa a tela no celular; painel central no computador */
#screen-admin { position: fixed; inset: 0; z-index: 40; background: var(--panel); display: flex; justify-content: center; }
.adm { width: 100%; max-width: 760px; height: 100%; display: flex; flex-direction: column; background: #fff; }
.adm-header {
  flex: 0 0 auto; display: flex; align-items: center; gap: 6px;
  height: calc(var(--header-h) + var(--safe-top)); padding: var(--safe-top) 12px 0 calc(4px + var(--safe-left));
  background: var(--teal-panel); color: #fff;
}
.adm-header .adm-back { display: grid !important; color: #fff; width: 44px; height: 44px; place-items: center; border-radius: 50%; }
.adm-title { font-weight: 600; font-size: 1.08rem; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.adm-view[hidden] { display: none !important; }
.adm-tabs { flex: 0 0 auto; display: flex; background: var(--teal-panel); }
.adm-tabs button {
  flex: 1; min-height: 46px; color: rgba(255,255,255,.75); font-weight: 600; font-size: .9rem;
  text-transform: uppercase; letter-spacing: .02em; border-bottom: 3px solid transparent;
}
.adm-tabs button.on { color: #fff; border-bottom-color: #fff; }
.adm-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: calc(16px + var(--safe-bottom)); }
.adm-grupo { padding: 14px 16px 6px; font-size: .78rem; font-weight: 600; color: var(--green); text-transform: uppercase; letter-spacing: .03em; }
.adm-grupo.pend { color: #b07800; }
.u-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 10px 16px; min-height: 68px; border-bottom: 1px solid var(--border); background: #fff;
}
.u-item:active { background: #f5f6f6; }
.u-meta { flex: 1; min-width: 0; }
.u-nome { font-weight: 600; font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-email { font-size: .82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tag { font-size: .7rem; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--panel); color: var(--muted); }
.tag.admin { background: #e7f6f3; color: var(--green-dark); }
.tag.pendente { background: #fff4d6; color: #8a5f00; }
.tag.desativado { background: #fdecea; color: #8a1c12; }
.tag.google { background: #e8f0fe; color: #1a57c9; }
.u-acao {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  height: 36px; padding: 0 16px; border-radius: 18px; line-height: 1;
  background: var(--green-dark); color: #fff; font-weight: 600; font-size: .85rem;
}
.u-item.off .u-nome, .u-item.off .avatar { opacity: .55; }
.adm-vazio { padding: 28px 24px; color: var(--muted); text-align: center; font-size: .9rem; }
.i-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.i-dot { width: 10px; height: 10px; border-radius: 50%; background: #c4c9cc; flex: 0 0 auto; }
.i-dot.ok { background: var(--green-light); }
.i-dot.ruim { background: var(--danger); }
.i-status { font-size: .8rem; color: var(--muted); }
.adm-nota { margin: 12px 16px; font-size: .78rem; color: var(--muted); line-height: 1.4; }

.adm-perfil { display: flex; align-items: center; gap: 14px; padding: 18px 16px; border-bottom: 1px solid var(--border); }
.ed-meta { font-size: .75rem; color: var(--muted); margin-top: 4px; }
.adm-sec { margin: 0; padding: 18px 16px 8px; font-size: .8rem; font-weight: 600; color: var(--green); text-transform: uppercase; letter-spacing: .03em; }
.adm-hint { margin: 0 16px 8px; font-size: .82rem; color: var(--muted); }
.seg { display: flex; margin: 0 16px; border: 1px solid #d1d7db; border-radius: 10px; overflow: hidden; }
.seg button { flex: 1; min-height: 44px; font-size: .88rem; font-weight: 600; color: var(--muted); border-right: 1px solid #d1d7db; }
.seg button:last-child { border-right: none; }
.seg button.on[data-v=aprovado] { background: var(--green-dark); color: #fff; }
.seg button.on[data-v=pendente] { background: #f2b600; color: #3d2c00; }
.seg button.on[data-v=desativado] { background: var(--danger); color: #fff; }
.opt-list { margin: 0 16px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.opt { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; min-height: 52px; border-bottom: 1px solid var(--border); cursor: pointer; }
.opt:last-child { border-bottom: none; }
.opt input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--green-dark); flex: 0 0 auto; }
.opt span { display: flex; flex-direction: column; gap: 2px; font-size: .95rem; min-width: 0; }
.opt small { color: var(--muted); font-size: .78rem; }
.opt.disabled { opacity: .55; cursor: default; }
#adm-editar .login-error { margin: 12px 16px 0; }
.adm-footer { flex: 0 0 auto; padding: 10px 16px calc(10px + var(--safe-bottom)); border-top: 1px solid var(--border); background: #fff; }
@media (min-width: 768px) {
  #screen-admin { padding: 24px; background: rgba(11,20,26,.85); }
  .adm { height: min(100%, 860px); border-radius: 12px; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
  .adm-header { border-radius: 0; }
}
