/* =========================================================================
   App Verdades Básicas — Design System (Apple minimalista premium)
   ========================================================================= */
:root {
  /* Cores base */
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #fbfbfd;
  --elevated: rgba(255, 255, 255, 0.72);
  --hairline: rgba(0, 0, 0, 0.08);
  --hairline-strong: rgba(0, 0, 0, 0.14);

  /* Texto */
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #8e8e93;

  /* Acento (azul Apple + tom espiritual quente) */
  --accent: #0a84ff;
  --accent-ink: #ffffff;
  --accent-soft: rgba(10, 132, 255, 0.12);
  --gold: #b8860b;
  --gold-soft: rgba(184, 134, 11, 0.12);

  /* Status */
  --green: #34c759;
  --green-soft: rgba(52, 199, 89, 0.14);
  --orange: #ff9f0a;
  --orange-soft: rgba(255, 159, 10, 0.14);
  --red: #ff3b30;
  --red-soft: rgba(255, 59, 48, 0.12);
  --purple: #5e5ce6;
  --purple-soft: rgba(94, 92, 230, 0.12);

  /* Raio e sombra */
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 20px rgba(0, 0, 0, 0.06);
  --shadow-2: 0 10px 40px rgba(0, 0, 0, 0.14);

  /* Tipografia */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #161618;
    --elevated: rgba(30, 30, 32, 0.72);
    --hairline: rgba(255, 255, 255, 0.10);
    --hairline-strong: rgba(255, 255, 255, 0.16);
    --ink: #f5f5f7;
    --ink-2: #a1a1a6;
    --ink-3: #8e8e93;
    --accent: #0a84ff;
    --accent-soft: rgba(10, 132, 255, 0.22);
    --gold: #e0b23a;
    --gold-soft: rgba(224, 178, 58, 0.18);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 20px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

/* Moldura de dispositivo no desktop */
#device-frame {
  width: 100%;
  height: 100%;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

@media (min-width: 720px) {
  body { background: radial-gradient(120% 120% at 50% 0%, #e9e9ef 0%, #d7d8de 100%); padding: 28px; }
  @media (prefers-color-scheme: dark) { body { background: radial-gradient(120% 120% at 50% 0%, #1a1a1c 0%, #050506 100%); } }
  #device-frame {
    width: 402px;
    height: 858px;
    max-height: calc(100vh - 40px);
    border-radius: 54px;
    box-shadow: var(--shadow-2), 0 0 0 12px #0b0b0d, 0 0 0 14px #2a2a2e;
    overflow: hidden;
  }
}

#app { position: relative; height: 100%; width: 100%; overflow: hidden; }

/* ============================== Utilitários ============================== */
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
  animation: fade .28s ease;
}
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.scroll {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 0 18px calc(var(--tabbar-h) + var(--safe-bottom) + 24px);
}
.scroll.no-tabbar { padding-bottom: calc(var(--safe-bottom) + 24px); }

/* Barra de navegação superior (large title estilo iOS) */
.nav {
  padding: calc(var(--safe-top) + 10px) 18px 4px;
  background: transparent;
}
.nav-top { display: flex; align-items: center; justify-content: space-between; min-height: 34px; }
.nav-top .back {
  display: inline-flex; align-items: center; gap: 2px;
  color: var(--accent); font-size: 17px; font-weight: 500;
  background: none; border: 0; padding: 4px 2px; cursor: pointer;
}
.nav-top .nav-action {
  color: var(--accent); font-size: 17px; font-weight: 500;
  background: none; border: 0; padding: 6px; cursor: pointer;
}
.nav-title-lg { font-size: 32px; font-weight: 750; letter-spacing: -0.03em; margin: 2px 0 10px; }
.nav-sub { color: var(--ink-2); font-size: 14px; margin: -6px 0 10px; }

/* Cartões */
.card {
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--shadow-1);
  padding: 16px;
  margin-bottom: 14px;
}
.card.tight { padding: 0; overflow: hidden; }
.card-hd { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-3); margin: 22px 4px 8px; }

/* Lista estilo iOS (inset grouped) */
.list { background: var(--surface); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-1); margin-bottom: 14px; }
.row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; min-height: 52px;
  border-bottom: 1px solid var(--hairline);
  background: none; width: 100%; text-align: left; border-left: 0; border-right: 0; border-top: 0;
  color: var(--ink); font-size: 16px; font-family: var(--font); cursor: pointer;
}
.row:last-child { border-bottom: 0; }
.row:active { background: var(--surface-2); }
.row.static { cursor: default; }
.row .row-main { flex: 1; min-width: 0; }
.row .row-title { font-size: 16px; font-weight: 500; }
.row .row-sub { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.row .chev { color: var(--ink-3); flex: none; }
.row .lead { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.row .lead.num { font-size: 15px; font-weight: 700; }

/* Ícones em círculo */
.iconbox { border-radius: 10px; display: grid; place-items: center; }
.iconbox svg { width: 20px; height: 20px; }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 14px; padding: 14px 18px;
  font-family: var(--font); font-size: 17px; font-weight: 600;
  background: var(--accent); color: var(--accent-ink); cursor: pointer;
  transition: transform .08s ease, opacity .2s ease; width: 100%;
}
.btn:active { transform: scale(0.98); }
.btn.secondary { background: var(--accent-soft); color: var(--accent); }
.btn.ghost { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.btn.danger { background: var(--red-soft); color: var(--red); }
.btn.success { background: var(--green); color: #fff; }
.btn[disabled] { opacity: 0.45; cursor: default; }
.btn.sm { padding: 9px 14px; font-size: 14px; border-radius: 11px; width: auto; }

/* Pílulas de status */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.pill.green { background: var(--green-soft); color: #248a3d; }
.pill.orange { background: var(--orange-soft); color: #b26a00; }
.pill.red { background: var(--red-soft); color: #c9271b; }
.pill.blue { background: var(--accent-soft); color: var(--accent); }
.pill.purple { background: var(--purple-soft); color: var(--purple); }
.pill.gold { background: var(--gold-soft); color: var(--gold); }
.pill.gray { background: rgba(120,120,128,0.12); color: var(--ink-2); }
@media (prefers-color-scheme: dark) {
  .pill.green { color: #34c759; } .pill.orange { color: #ff9f0a; } .pill.red { color: #ff6961; }
}

/* Hero / próxima aula */
.hero {
  border-radius: var(--r-lg); padding: 20px; color: #fff; margin-bottom: 16px;
  background: linear-gradient(135deg, #0a84ff 0%, #5e5ce6 100%);
  box-shadow: 0 14px 34px rgba(10,132,255,0.32);
  position: relative; overflow: hidden;
}
.hero::after { content:""; position:absolute; right:-40px; top:-40px; width:160px; height:160px; border-radius:50%; background:rgba(255,255,255,0.12); }
.hero .eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.9; }
.hero h2 { margin: 6px 0 2px; font-size: 24px; font-weight: 750; letter-spacing: -0.02em; }
.hero .meta { font-size: 14px; opacity: 0.92; }
.hero .hero-actions { margin-top: 16px; display: flex; gap: 10px; position: relative; z-index: 1; }
.hero .btn.ghost { background: rgba(255,255,255,0.18); color: #fff; box-shadow: none; backdrop-filter: blur(8px); }
.hero .btn.white { background: #fff; color: var(--accent); box-shadow: none; }

/* Métricas rápidas */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--surface); border-radius: var(--r); padding: 14px 12px; box-shadow: var(--shadow-1); text-align: center; }
.stat .n { font-size: 26px; font-weight: 750; letter-spacing: -0.03em; }
.stat .l { font-size: 11px; color: var(--ink-2); margin-top: 2px; font-weight: 500; }

/* Streak */
.streak { display: flex; gap: 6px; margin-top: 10px; }
.streak .dot { flex: 1; height: 8px; border-radius: 4px; background: var(--hairline-strong); }
.streak .dot.on { background: var(--orange); }

/* Barra de progresso */
.bar { height: 8px; border-radius: 4px; background: var(--hairline-strong); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }

/* Avatares */
.avatar { border-radius: 50%; object-fit: cover; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; flex: none; }

/* Tab bar */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: flex; align-items: stretch;
  background: var(--elevated);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--hairline);
  z-index: 20;
}
.tabbar button {
  flex: 1; background: none; border: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-3); font-size: 10px; font-weight: 550; font-family: var(--font); padding-top: 6px;
}
.tabbar button svg { width: 25px; height: 25px; }
.tabbar button.active { color: var(--accent); }

/* Segmented control */
.segmented { display: flex; background: rgba(120,120,128,0.12); border-radius: 10px; padding: 2px; margin: 4px 0 14px; }
.segmented button { flex: 1; border: 0; background: none; padding: 8px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); font-family: var(--font); cursor: pointer; }
.segmented button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }

/* Campos */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 0 4px 6px; }
.input, textarea.input, select.input {
  width: 100%; border: 1px solid var(--hairline-strong); background: var(--surface); color: var(--ink);
  border-radius: 12px; padding: 13px 14px; font-size: 16px; font-family: var(--font); outline: none;
}
.input:focus { border-color: var(--accent); }
textarea.input { resize: vertical; min-height: 92px; }

/* Chips rápidos (feedback) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--hairline-strong); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 500; cursor: pointer; font-family: var(--font); }
.chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Mural (feed) */
.post { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-1); margin-bottom: 14px; overflow: hidden; }
.post .p-hd { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.post .p-hd .who { flex: 1; }
.post .p-hd .who b { font-size: 15px; }
.post .p-hd .who span { display: block; font-size: 12px; color: var(--ink-3); }
.post .p-body { padding: 0 14px 12px; font-size: 15px; line-height: 1.45; }
.post .p-media { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: var(--surface-2); display:block; }
.post .p-media.cover { display:grid; place-items:center; color:#fff; font-weight:700; font-size:20px; }
.post .p-actions { display: flex; gap: 18px; padding: 10px 14px; border-top: 1px solid var(--hairline); }
.post .p-actions button { background: none; border: 0; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 14px; font-weight: 500; cursor: pointer; font-family: var(--font); }
.post .p-actions button.liked { color: var(--red); }

/* Grade painel da turma */
.panel-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r); box-shadow: var(--shadow-1); background: var(--surface); }
table.grid { border-collapse: collapse; font-size: 12px; width: max-content; min-width: 100%; }
table.grid th, table.grid td { padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--hairline); white-space: nowrap; }
table.grid thead th { position: sticky; top: 0; background: var(--surface-2); font-weight: 600; color: var(--ink-2); z-index: 2; }
table.grid td.name, table.grid th.name { position: sticky; left: 0; background: var(--surface); text-align: left; font-weight: 500; min-width: 128px; z-index: 1; box-shadow: 1px 0 0 var(--hairline); }
table.grid thead th.name { z-index: 3; background: var(--surface-2); }
.cell { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; font-size: 11px; font-weight: 700; }
.cell.P { background: var(--green-soft); color: #248a3d; }
.cell.A { background: var(--orange-soft); color: #b26a00; }
.cell.F { background: var(--red-soft); color: #c9271b; }
.cell.R { background: var(--accent-soft); color: var(--accent); }
.cell.dash { color: var(--ink-3); }

/* Login */
.login { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 26px calc(var(--safe-bottom) + 20px); background: var(--bg); }
.login .brand { text-align: center; margin-bottom: 30px; }
.login .brand .mark { width: 82px; height: 82px; border-radius: 22px; margin: 0 auto 16px; display: grid; place-items: center; background: linear-gradient(135deg, #0a84ff 0%, #5e5ce6 100%); box-shadow: 0 14px 34px rgba(10,132,255,0.34); }
.login .brand .mark svg { width: 44px; height: 44px; color: #fff; }
.login .brand h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; margin: 0; }
.login .brand p { color: var(--ink-2); font-size: 15px; margin: 6px 0 0; }
.login .role-card { display: flex; align-items: center; gap: 14px; text-align: left; }
.login .role-card .lead { width: 44px; height: 44px; border-radius: 12px; }
.login .hint { text-align: center; color: var(--ink-3); font-size: 12px; margin-top: 18px; line-height: 1.5; }

/* Toast */
#toast { position: absolute; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 20px); transform: translateX(-50%) translateY(20px); background: rgba(28,28,30,0.94); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: all .3s cubic-bezier(.2,.8,.2,1); z-index: 100; max-width: 84%; text-align: center; box-shadow: var(--shadow-2); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Modal / sheet inferior */
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.4); opacity: 0; pointer-events: none; transition: opacity .3s ease; z-index: 60; }
.sheet-backdrop.show { opacity: 1; pointer-events: auto; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--surface); border-radius: 22px 22px 0 0; padding: 8px 18px calc(var(--safe-bottom) + 22px); transform: translateY(102%); transition: transform .34s cubic-bezier(.2,.8,.2,1); z-index: 61; max-height: 88%; overflow-y: auto; box-shadow: var(--shadow-2); }
.sheet.show { transform: translateY(0); }
.sheet .grabber { width: 38px; height: 5px; border-radius: 3px; background: var(--hairline-strong); margin: 8px auto 14px; }
.sheet h3 { font-size: 20px; font-weight: 700; margin: 0 0 4px; letter-spacing: -0.02em; }
.sheet .sub { color: var(--ink-2); font-size: 14px; margin: 0 0 16px; }

/* QR fake */
.qr { width: 190px; height: 190px; margin: 8px auto 4px; border-radius: 18px; background:
  conic-gradient(#000 0 0) 0 0/17px 17px, var(--surface);
  display: grid; place-items: center; box-shadow: var(--shadow-1); position: relative; overflow: hidden; }
.qr svg { width: 100%; height: 100%; }

/* Empty state */
.empty { text-align: center; color: var(--ink-3); padding: 48px 20px; }
.empty svg { width: 46px; height: 46px; opacity: 0.5; margin-bottom: 12px; }
.empty p { font-size: 15px; margin: 0; }

.muted { color: var(--ink-2); }
.center { text-align: center; }
.mt { margin-top: 14px; }
.mb { margin-bottom: 14px; }
.flex { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }
.divider { height: 1px; background: var(--hairline); margin: 14px 0; }
.verse { font-style: italic; font-size: 16px; line-height: 1.5; color: var(--ink); }
.verse-ref { font-size: 13px; color: var(--accent); font-weight: 600; margin-top: 6px; }
.big-num { font-size: 15px; }
/* =========================================================================
   Rev01 — Layout novo: cabeçalho fixo (logo + voltar/avançar),
   barra horizontal de seções e correções de CSS (ícones e listas).
   ========================================================================= */

/* Correções globais (V1/V2 do relatório de UX) */
svg { width: 20px; height: 20px; flex: none; }
.qr svg { width: 100%; height: 100%; }
.row-title, .row-sub { display: block; }

/* Estrutura vertical: header + secbar + conteúdo */
#app { display: flex; flex-direction: column; }
#app > .login { flex: 1; overflow-y: auto; }

/* Cabeçalho padrão */
.hdr {
  flex: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--safe-top) + 10px) 14px 10px;
  background: var(--elevated);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
  z-index: 30;
}
.hdr-brand { display: flex; align-items: center; gap: 9px; }
.hdr-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, #0a84ff, #5e5ce6);
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 4px 12px rgba(10,132,255,.35);
}
.hdr-mark svg { width: 20px; height: 20px; }
.hdr-name { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.hdr-nav { display: flex; gap: 8px; }
.hdr-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 0; cursor: pointer;
  background: var(--surface); color: var(--accent);
  box-shadow: var(--shadow-1);
  display: grid; place-items: center;
}
.hdr-btn svg { width: 19px; height: 19px; }
.hdr-btn[disabled] { opacity: .35; cursor: default; color: var(--ink-3); }

/* Barra horizontal de seções */
.secbar {
  flex: none;
  display: flex; gap: 8px;
  padding: 10px 14px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: var(--bg);
  border-bottom: 1px solid var(--hairline);
}
.secbar::-webkit-scrollbar { display: none; }
.secbtn {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; cursor: pointer;
  padding: 8px 14px; border-radius: 999px;
  background: var(--surface); color: var(--ink-2);
  font-family: var(--font); font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-1);
  white-space: nowrap;
}
.secbtn svg { width: 16px; height: 16px; }
.secbtn.on { background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(10,132,255,.35); }

/* Conteúdo rolável */
.content {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 14px 18px calc(var(--safe-bottom) + 32px);
}
.content .screen { position: static; display: block; background: none; animation: fade .28s ease; }

/* Cabeçalho de página (título + ação) */
.pagehead { margin: 0 0 6px; }
.pagehead .nav-title-lg { font-size: 28px; margin: 0 0 4px; display: flex; align-items: center; }
.pagehead .pg-action { margin-left: auto; }
.pagehead .nav-sub { margin: 0 0 12px; }

/* Linhas destacadas */
.cardrow { border-radius: 16px; box-shadow: var(--shadow-1); margin-bottom: 12px; background: var(--surface); }
.alertrow { border-radius: 16px; box-shadow: var(--shadow-1); margin-bottom: 12px; background: var(--surface); outline: 1.5px solid var(--orange-soft); }

/* Segmented (mural) */
.seg {
  display: flex; gap: 4px; padding: 4px;
  background: rgba(120,120,128,.12); border-radius: 12px; margin-bottom: 14px;
}
.seg button {
  flex: 1; border: 0; cursor: pointer; border-radius: 9px;
  padding: 8px 10px; font-family: var(--font); font-size: 14px; font-weight: 600;
  background: none; color: var(--ink-2);
}
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px;
  border-radius: 999px; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 700; padding: 0 5px; margin-left: 4px;
}

/* Funil / barras de relatório */
.funil-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.funil-label { width: 118px; flex: none; font-size: 12px; color: var(--ink-2); font-weight: 500; }
.funil-row .bar { flex: 1; }
.funil-n { flex: none; font-size: 12px; color: var(--ink-2); white-space: nowrap; }

/* Nota no hero */
.hero-note { font-size: 12px; color: rgba(255,255,255,.8); margin-top: 8px; width: 100%; }
.hero .hero-actions { flex-wrap: wrap; }

/* Inputs de data/hora coerentes */
.input[type="date"], .input[type="time"] { -webkit-appearance: none; appearance: none; }

/* =========================================================================
   Rev01 — SEM moldura de celular (teste em tela cheia)
   ========================================================================= */
@media (min-width: 720px) {
  body { padding: 0; background: var(--bg); }
  @media (prefers-color-scheme: dark) { body { background: var(--bg); } }
  #device-frame {
    width: 100%;
    height: 100vh;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
  }
  /* conteúdo legível em monitores largos: centraliza com largura máxima */
  .content .screen, .secbar, .hdr { max-width: 860px; margin-left: auto; margin-right: auto; width: 100%; }
  .hdr { border-radius: 0; }
}


/* ---- Rev03 · Aluno: Meu curso grid + Minhas aulas ---- */
.aulagrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.aulacell {
  aspect-ratio: 1 / 1; border-radius: 12px; border: 1px solid transparent;
  font-family: var(--font); font-size: 15px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
  transition: transform .08s ease;
}
.aulacell:active { transform: scale(0.94); }
.legenda { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 14px; }
.legenda span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.legenda i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.list-plain { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.aula-item { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-1); padding: 12px 14px; }
.aula-item-hd { display: flex; align-items: center; gap: 12px; }
.aula-item-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.aula-item-actions .btn.sm { flex: 1 1 auto; min-width: 96px; }
.checkin-off { border: 1px solid var(--hairline-strong); }


/* ---- Rev03b · check-in, feed social, aula bloqueada, oração ---- */
.checkin-card { display:flex; align-items:center; gap:12px; background:var(--surface); border-radius:var(--r); box-shadow:var(--shadow-1); padding:12px 14px; margin-bottom:14px; }
.checkin-card .ci-l { display:flex; align-items:center; gap:12px; flex:1; min-width:0; }
.checkin-card .ci-l b { display:block; font-size:15px; }
.checkin-card .ci-l .muted { display:block; font-size:12.5px; color:var(--ink-2); }
.checkin-card.off { background:var(--surface-2); }
.checkin-card.done { border:1px solid var(--green-soft); }
.checkin-card .btn.sm { flex:none; }

.feed { display:flex; flex-direction:column; gap:12px; margin-bottom:14px; }
.fcard { background:var(--surface); border-radius:16px; box-shadow:var(--shadow-1); padding:14px; }
.fc-hd { display:flex; align-items:center; gap:10px; }
.fc-who { flex:1; min-width:0; }
.fc-who b { display:block; font-size:15px; }
.fc-who span { font-size:12.5px; color:var(--ink-3); }
.fc-tag { display:inline-flex; align-items:center; gap:4px; font-size:11px; font-weight:600; color:var(--orange); background:var(--orange-soft); padding:3px 8px; border-radius:999px; }
.fc-tag svg { width:14px; height:14px; }
.fc-title { font-weight:700; margin:10px 0 2px; }
.fc-body { margin:8px 0 0; line-height:1.5; color:var(--ink); }
.fc-media { margin-top:10px; border-radius:12px; padding:26px 16px; color:#fff; font-weight:600; background:linear-gradient(135deg,#0a84ff,#5e5ce6); }
.fc-bar { display:flex; gap:8px; margin-top:12px; padding-top:10px; border-top:1px solid var(--hairline); }
.fc-act { display:inline-flex; align-items:center; gap:6px; background:none; border:none; font-family:var(--font); font-size:14px; color:var(--ink-2); cursor:pointer; padding:6px 10px; border-radius:10px; }
.fc-act svg { width:18px; height:18px; }
.fc-act:active { background:var(--surface-2); }
.fc-act.liked { color:var(--red); font-weight:600; }
.fc-act.done { color:var(--green); font-weight:600; }

.aula-item.locked { opacity:.72; }
.aula-item .lead.num.locked-num { background:var(--surface-2); color:var(--ink-3); display:flex; align-items:center; justify-content:center; }
.aula-item .lead.num.locked-num svg { width:18px; height:18px; }

.upd { border-left:2px solid var(--hairline-strong); margin:4px 0 4px 6px; padding-left:14px; display:flex; flex-direction:column; gap:8px; }
.upd-i { display:flex; gap:8px; position:relative; }
.upd-dot { width:8px; height:8px; border-radius:50%; background:var(--accent); margin-top:6px; flex:none; margin-left:-19px; }
.upd-d { font-size:12px; color:var(--ink-3); }
.upd-i p { margin:2px 0 0; font-size:14px; line-height:1.45; }
.testemunho { margin-top:10px; background:var(--green-soft); border-radius:12px; padding:10px 12px; font-size:14px; line-height:1.45; }

.btn.yv, a.btn.yv { display:inline-flex; align-items:center; gap:6px; width:auto; padding:9px 14px; font-size:14px; text-decoration:none; }


/* ---- Rev03c · lesson menu, NVI small link, reposição push ---- */
.yv-sm { font-size:12px; font-weight:600; color:var(--accent); background:var(--accent-soft); padding:3px 9px; border-radius:8px; text-decoration:none; white-space:nowrap; }
.repo-need { border:1px solid var(--orange-soft); }
.card.notif { border:1px solid var(--accent-soft); }
.notif-i { font-size:13.5px; line-height:1.45; padding:8px 0; border-top:1px solid var(--hairline); }
.notif-i:first-of-type { border-top:none; }


/* ---- Rev03d · devocional por dia (data + flag feita) ---- */
.dev-row { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.dev-row:last-child { margin-bottom:0; }
.dev-flag { flex:none; width:28px; height:28px; padding:0; border:none; background:none; cursor:pointer; color:var(--ink-3); display:flex; align-items:center; justify-content:center; border-radius:50%; }
.dev-flag svg { width:22px; height:22px; }
.dev-flag:active { background:var(--surface-2); }
.dev-flag.on { color:var(--green); }
.dev-meta { font-size:12.5px; color:var(--ink-2); white-space:nowrap; }
.dev-date { font-weight:700; color:var(--ink); }
.dev-read { font-size:13px; font-weight:600; margin-right:6px; text-align:right; }


/* ---- Rev03i · chamada (roll call) legend ---- */
.chamada-leg { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; margin:10px 2px 14px; font-size:12px; color:var(--ink-2); }
.chamada-leg .cell { display:inline-flex; align-items:center; justify-content:center; width:20px; height:20px; font-size:11px; }


/* ---- Rev04 F1 · beta placeholder, task marking, seg2 ---- */
.beta-card { border:1px dashed var(--gold); background:var(--gold-soft); }
.seg2 { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.cellbtn { border:none; font-family:var(--font); cursor:pointer; }
.cellbtn:active { transform:scale(0.92); }


/* ---- Rev04 · chips de validação devocional/versículo no check-in ---- */
.chklist { display:flex; flex-direction:column; gap:10px; margin-bottom:14px; }
.chkrow { background:var(--surface); border-radius:var(--r); box-shadow:var(--shadow-1); padding:12px 14px; }
.chkchips { display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }
.chip { display:inline-flex; align-items:center; gap:6px; border:1px solid var(--hairline-strong); background:var(--surface); color:var(--ink-2); border-radius:999px; padding:7px 12px; font-family:var(--font); font-size:13px; font-weight:600; cursor:pointer; }
.chip svg { width:16px; height:16px; }
.chip:active { transform:scale(0.96); }
.chip.on { background:var(--green-soft); border-color:transparent; color:#248a3d; }


/* ---- Rev04 · grade de presença com número da aula ---- */
.grade-row { display:flex; flex-wrap:wrap; gap:8px; }
.gcell { display:flex; flex-direction:column; align-items:center; gap:3px; }
.gnum { font-size:11px; font-weight:700; color:var(--ink-3); }


/* ---- Rev04 · chips de marcos (aceitou Jesus / batismo) ---- */
.chip.gold.on { background:var(--gold-soft); border-color:transparent; color:var(--gold); }
.chip.purple.on { background:var(--purple-soft); border-color:transparent; color:var(--purple); }


/* ---- Rev04 · marco não marcado fica apagado ---- */
.chip.gold:not(.on), .chip.purple:not(.on) { opacity:.5; }


/* ---- Rev04 · chip estático (só exibição na Home) ---- */
.chip.static { cursor:default; }


/* ---- Rev04 · Devocional/Versículo em azul (como o Dar check-in) ---- */
.chip.blue { border-color: var(--accent); color: var(--accent); background: var(--surface); opacity:1; }
.chip.blue.on { background: var(--accent); color: #fff; border-color: transparent; }


/* --- Rev06: HOME (boas-vindas, check-in do grupo, mural) --- */
.hdr-brand { min-width: 0; }
.hdr-welcome { font-size: 12.5px; color: var(--ink-2); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 8px; margin-left: 4px; border-left: 1px solid var(--hairline); }
.chkchips.stack-right { flex-direction: column; align-items: flex-end; }
.mural-actions { display: flex; gap: 8px; justify-content: flex-end; margin: 4px 0 12px; }

/* --- Rev07: HOME títulos + explicação --- */
.mural-title { font-weight: 800; color: #111; font-size: 16px; margin: 20px 2px 10px; }
.explain { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; font-size: 13px; color: var(--ink-2); line-height: 1.5; margin-bottom: 14px; }
