/* Zori Messenger — base styles (shared pages) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #eef1fb;
  --panel:       #ffffff;
  --surface:     #f4f6fd;
  --surface-2:   #eaedfa;
  --border:      #dde3f5;
  --border-2:    #c8d0ee;
  /* Alinhar com base/tokens.css (marca Zori) — evita regressão de azul após app_css('base.css') na sidebar */
  --accent:      #20a078;
  --accent-h:    #178060;
  --accent-soft: #e8f7f2;
  --accent-glow: rgba(32,160,120,.22);
  --text:        #1a1e3a;
  --text-2:      #5b6380;
  --text-3:      #9fa8c8;
  --green:       #10b981;
  --red:         #ef4444;
  --radius:      12px;
  --radius-sm:   8px;
  --radius-xs:   6px;
  --font:        'Nunito', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --header:      56px;
  --shadow:      0 8px 32px rgba(30,34,80,.12);
}

html { height: 100%; overflow: hidden; -webkit-text-size-adjust: 100%; }
body { height: 100%; overflow: hidden; font-family: var(--font); background: var(--bg); color: var(--text); }
button, input { font-family: inherit; }

.page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--header);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: var(--accent);
  color: #fff;
}

.topbar .btn-ic {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 18px;
}
.topbar .btn-ic:active { transform: translateY(1px); }

.topbar .title {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.topbar .title strong { font-size: 16px; font-weight: 800; }
.topbar .title span { font-size: 12px; opacity: .9; }

.content {
  flex: 1;
  overflow: auto;
  padding: 14px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(221,227,245,.65);
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border-bottom: 1px solid var(--border);
}
.search .ic { color: var(--text-3); }
.search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--text);
}

.list { list-style: none; }
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(17, 24, 39, .06);
}
.row:last-child { border-bottom: none; }
.row .meta { flex: 1; min-width: 0; }
.row .name { font-weight: 800; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .sub { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border);
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.check {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid var(--border-2);
  display: grid;
  place-items: center;
  color: #fff;
}
.check.on { background: var(--green); border-color: var(--green); }

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 12px 0;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  max-width: 100%;
}
.chip button {
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1;
}

.footerbar {
  height: 66px;
  padding: 10px 14px;
  background: rgba(238,241,251,.9);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 900;
  cursor: pointer;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--text-2); }

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
}
.field label { font-size: 12px; color: var(--text-2); font-weight: 800; }
.field input[type="text"] {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 12px;
  font-size: 14px;
  outline: none;
  background: #fff;
}

.split {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  padding: 14px;
  align-items: center;
}
.big-avatar {
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow: hidden;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.big-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--panel);
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transform: translateY(110%);
  transition: transform .18s ease;
  z-index: 50;
}
.sheet.open { transform: translateY(0); }
.sheet .sheet-hd {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.sheet .sheet-hd strong { font-size: 14px; }
.sheet .sheet-hd button { border: none; background: transparent; cursor: pointer; font-size: 20px; }
.sheet .sheet-body { padding: 10px 8px 14px; }
.sheet .sheet-item {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 12px 10px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  color: var(--text);
}
.sheet .sheet-item:hover { background: var(--surface); }

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-bottom: 1px solid rgba(17, 24, 39, .06);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-row .t-meta { flex: 1; min-width: 0; }
.toggle-row .t-title { font-weight: 900; font-size: 14px; }
.toggle-row .t-sub { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.switch {
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  cursor: pointer;
  flex: 0 0 auto;
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #fff;
  transition: transform .16s ease;
}
.switch.on { background: var(--green); }
.switch.on::after { transform: translateX(18px); }

.notice {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-2);
}
/* touched: 2026-04-17 (forcar redeploy) */
