:root {
  --indigo: #3d5afe;
  --indigo-2: #4a3aff;
  --indigo-grad: linear-gradient(160deg, #4a5cff 0%, #3d3df0 100%);
  --bg: #eef1f6;
  --card: #ffffff;
  --text: #1b2330;
  --muted: #8a93a3;
  --line: #eef0f4;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --radius: 18px;
  --shadow: 0 6px 20px rgba(30, 40, 90, .06);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #d9dee8;
  color: var(--text);
  display: grid; place-items: center;
}
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }
.center { text-align: center; }
button { cursor: pointer; font: inherit; border: 0; background: none; color: inherit; }

/* moldura tipo celular */
.phone {
  width: 440px; max-width: 100vw; height: 100vh; max-height: 100dvh;
  background: var(--bg); position: relative; overflow: hidden;
  display: flex; flex-direction: column;
}
.screen { display: flex; flex-direction: column; height: 100%; }

/* ---------- Botões ---------- */
.btn-primary {
  background: var(--indigo); color: #fff; padding: 14px; border-radius: 14px;
  font-weight: 700; font-size: 15px; width: 100%;
}
.btn-primary:active { transform: scale(.99); }
.btn-danger {
  background: #fff; color: var(--red); border: 1.5px solid #f3c9c9;
  padding: 14px; border-radius: 14px; font-weight: 700; width: calc(100% - 40px);
  margin: 16px 20px;
}

/* ---------- Auth ---------- */
.auth { background: var(--indigo-grad); padding: 0 24px; justify-content: center; gap: 22px; }
.auth-hero { text-align: center; color: #fff; }
.hero-badge {
  width: 74px; height: 74px; border-radius: 22px; background: rgba(255,255,255,.16);
  display: grid; place-items: center; font-size: 38px; margin: 0 auto 14px;
}
.auth-hero h1 { margin: 0 0 6px; font-size: 30px; }
.auth-hero p { margin: 0 auto; max-width: 300px; opacity: .9; font-size: 14px; line-height: 1.5; }
.auth-card { background: #fff; border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.seg { display: flex; background: var(--bg); border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.seg-btn { flex: 1; padding: 10px; border-radius: 9px; color: var(--muted); font-weight: 600; }
.seg-btn.active { background: #fff; color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
form { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
input {
  border: 1.5px solid var(--line); background: #fff; border-radius: 12px;
  padding: 13px; font-size: 15px; color: var(--text); font-weight: 500;
}
input:focus { outline: none; border-color: var(--indigo); }
.form-error { color: var(--red); font-size: 13px; min-height: 16px; margin: 0; text-align: center; }

/* ---------- Header do app ---------- */
.app-header {
  background: var(--indigo-grad); color: #fff; padding: 52px 18px 20px;
  display: flex; align-items: center; justify-content: space-between; position: relative;
  border-radius: 0 0 22px 22px;
}
.dev-switch { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.dev-avatar {
  width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.9);
  display: grid; place-items: center; font-size: 24px;
}
.dev-name { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.caret { font-size: 12px; opacity: .8; }
.dev-status {
  font-size: 12px; margin-top: 3px; display: inline-flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,.18); padding: 3px 10px; border-radius: 20px;
}
.dev-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.dev-status.online::before { background: var(--green); }
.header-actions { display: flex; gap: 8px; }
.hicon {
  width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.16);
  color: #fff; font-size: 22px; display: grid; place-items: center;
}
.dev-dropdown {
  position: absolute; top: 92px; left: 18px; right: 18px; background: #fff;
  border-radius: 16px; box-shadow: 0 12px 30px rgba(0,0,0,.18); padding: 8px; z-index: 20;
}
.dd-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; color: var(--text); }
.dd-item:active { background: var(--bg); }
.dd-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-left: auto; }
.dd-item .dot.online { background: var(--green); }
.dd-add { color: var(--indigo); font-weight: 700; }

/* ---------- Conteúdo ---------- */
.scroll { flex: 1; overflow-y: auto; padding: 18px 18px 90px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; }
.section-label { font-weight: 800; font-size: 15px; margin: 4px 4px 10px; display: flex; align-items: center; gap: 8px; }
.section-label::before { content: ""; width: 4px; height: 16px; border-radius: 3px; background: var(--indigo); }

/* destaques ao vivo */
.live-card { display: flex; justify-content: space-around; text-align: center; padding: 20px 12px; }
.feat { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; flex: 1; }
.feat:active { transform: scale(.96); }
.feat span { font-size: 13px; font-weight: 600; line-height: 1.25; }
.feat-ico { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 26px; }
.ico-cam { background: #e6e9ff; }
.ico-screen { background: #fdefd0; }
.ico-audio { background: #d9f6e4; }

/* alertas */
.card-title { font-weight: 700; font-size: 15px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.dot-alert { width: 8px; height: 8px; border-radius: 50%; background: var(--red); display: none; }
.dot-alert.show { display: inline-block; }
.alert-list .alert { display: flex; gap: 10px; align-items: flex-start; }
.alert .a-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); margin-top: 6px; flex: none; }
.alert .a-text { font-size: 13px; color: var(--muted); line-height: 1.45; }
.alert .a-title { color: var(--text); font-weight: 600; display: block; margin-bottom: 2px; }

/* linhas de menu */
.list-card { padding: 6px 18px; }
.row { display: flex; align-items: center; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.row:last-child { border-bottom: 0; }
.row-ico { font-size: 22px; width: 26px; text-align: center; }
.row-main { flex: 1; }
.row-title { font-weight: 600; font-size: 15px; }
.row-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.chev { color: var(--muted); font-size: 22px; }

.transparency {
  font-size: 12.5px; color: #6b7686; line-height: 1.5; background: #eaf0ff;
  border: 1px solid #d7e0ff; border-radius: 14px; padding: 14px; margin: 8px 2px 0;
}

.empty-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 34px 22px; text-align: center; margin-top: 20px; }
.empty-emoji { font-size: 44px; }
.empty-card h3 { margin: 12px 0 6px; }
.empty-card p { color: var(--muted); font-size: 14px; margin: 0 0 18px; }

/* ---------- Tab bar ---------- */
.tabbar {
  position: absolute; bottom: 0; left: 0; right: 0; background: #fff;
  border-top: 1px solid var(--line); display: flex; padding: 8px 4px 20px;
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); font-weight: 600; }
.tab span { font-size: 20px; }
.tab.active { color: var(--indigo); }

/* ---------- Sheets (overlays deslizantes) ---------- */
.sheet {
  position: absolute; inset: 0; background: var(--bg); z-index: 40;
  display: flex; flex-direction: column; animation: slideup .22s ease;
}
@keyframes slideup { from { transform: translateY(12px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet-head {
  background: var(--indigo-grad); color: #fff; padding: 50px 16px 16px;
  display: grid; grid-template-columns: 40px 1fr 40px; align-items: center;
  font-weight: 700; font-size: 17px; text-align: center;
}
.sheet-back { color: #fff; font-size: 30px; text-align: left; line-height: 1; }

.live-stage { flex: 1; background: #000; position: relative; display: grid; place-items: center; }
.live-stage video { width: 100%; height: 100%; object-fit: contain; }
.live-msg { position: absolute; color: #c9d2e0; font-size: 14px; }
.live-consent { text-align: center; font-size: 12.5px; color: var(--muted); padding: 12px 20px 0; margin: 0; }

.list-toolbar { display: flex; align-items: center; gap: 12px; padding: 14px 18px 0; }
.list-body { flex: 1; overflow-y: auto; padding: 14px 18px 24px; }

/* uso */
.u-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.u-top { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 7px; }
.u-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.u-bar { height: 7px; background: #e7ebf2; border-radius: 5px; overflow: hidden; }
.u-bar > span { display: block; height: 100%; background: var(--indigo); border-radius: 5px; }

/* notif */
.n-item { background: #fff; border-radius: 14px; padding: 13px 15px; margin-bottom: 10px; box-shadow: var(--shadow); }
.n-app { font-size: 12px; color: var(--indigo); font-weight: 700; }
.n-time { float: right; font-size: 11px; color: var(--muted); font-weight: 500; }
.n-title { font-weight: 600; font-size: 14px; margin: 3px 0; }
.n-text { font-size: 13px; color: var(--muted); line-height: 1.4; }

.me-body { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 50px; }
.me-avatar { width: 80px; height: 80px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 40px; box-shadow: var(--shadow); }
.me-email { font-weight: 600; }

/* ---------- Modal vinculação ---------- */
.modal { position: absolute; inset: 0; background: rgba(20,26,40,.55); display: grid; place-items: end center; z-index: 60; }
.modal-card { width: 100%; background: #fff; border-radius: 22px 22px 0 0; padding: 22px 22px 34px; display: flex; flex-direction: column; gap: 14px; animation: slideup .25s ease; }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { margin: 0; }
.modal-x { color: var(--muted); font-size: 18px; }
.pair-name-label { gap: 8px; }
.step { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.step-n { width: 24px; height: 24px; border-radius: 50%; background: var(--indigo); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; }
.pair-code {
  text-align: center; font-size: 38px; font-weight: 800; letter-spacing: .12em;
  color: var(--indigo); font-family: ui-monospace, monospace; padding: 10px 0;
}
.qr-box { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.qr-img { width: 160px; height: 160px; background: #fff; border-radius: 12px; padding: 6px; border: 1px solid var(--line); }
.dl-link { color: var(--indigo); font-weight: 600; font-size: 13px; text-decoration: none; }

/* toast */
.toast { position: absolute; bottom: 88px; left: 50%; transform: translateX(-50%); background: #1b2330; color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 14px; z-index: 80; box-shadow: 0 8px 24px rgba(0,0,0,.3); }
