/* Portal do Aluno - Residência ARQ 01
   Visual: protótipo V4 do portal (papel creme, painéis claros) +
   identidade do site de vendas (Crimson Pro / Montserrat, cobre e terracota). */
:root {
  /* do site de vendas */
  --fundo-escuro: #1a1512;
  --fundo-escuro-2: #251e1a;
  --destaque: #d9824f;     /* cobre */
  --cta: #c0623d;          /* terracota */
  --cta-hover: #a8522f;
  --serif: "Crimson Pro", Georgia, serif;
  --sans: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* do protótipo V4 */
  --ink: #3a2923;
  --deep: #4b3228;
  --muted: #8a776d;
  --warm: #aa6649;
  --cream: #f9f6f0;
  --paper: #fffcf8;
  --line: #e9ddd3;
  --sage: #69745d;
  --raio: 13px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font: 15px/1.6 var(--sans); background: var(--cream); color: var(--ink);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; color: var(--deep); }
h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.12; }
h2 { font-size: 27px; line-height: 1.2; }
h3 { font-size: 22px; line-height: 1.25; }
.oculto { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.eyebrow {
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; color: var(--warm);
}

/* ---------- Faixa de modo demonstração ---------- */
.faixa-demo {
  background: #ffd75e; color: #1a1512; font-size: 12px; font-weight: 700; text-align: center;
  padding: 8px 16px; line-height: 1.4; position: relative; z-index: 30;
}
.faixa-demo button {
  border: 1px solid #1a1512; background: transparent; border-radius: 4px; font-size: 11px;
  font-weight: 700; padding: 2px 8px; margin-left: 6px;
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border-radius: 8px; border: 1px solid var(--cta); background: var(--cta); color: #fff;
  padding: 12px 18px; font-size: 14px; font-weight: 700; text-decoration: none;
  transition: background .15s;
}
.btn:hover { background: var(--cta-hover); }
.btn.outline { background: transparent; color: var(--deep); border-color: #d6b6a2; }
.btn.outline:hover { background: #f8eee7; }
.btn.claro { background: #fbede0; color: #623f31; border-color: #fbede0; }
.btn[disabled] { opacity: .55; cursor: wait; }
.btn-google { background: #fff; color: #2a211c; border: 1px solid #d8cdbf; width: 100%; padding: 15px 18px; font-size: 15px; }
.btn-google:hover { background: #f6f1ea; }
.btn-google svg { width: 20px; height: 20px; flex: none; }
.linklike { background: none; border: 0; color: #a26042; font-weight: 700; font-size: 13px; padding: 4px 0; text-decoration: none; }

/* ---------- Tela de entrada / sem acesso ---------- */
.tela-entrada {
  min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(120% 80% at 50% 0%, #2c231e 0%, var(--fundo-escuro) 60%);
}
.cartao-entrada {
  width: 100%; max-width: 440px; background: var(--paper); border-radius: 16px;
  padding: 34px 26px 26px; box-shadow: 0 24px 60px rgba(0,0,0,.35); text-align: center;
}
.cartao-entrada .logo { width: 190px; max-width: 70%; margin: 0 auto 18px; display: block; }
.cartao-entrada .curso {
  font-family: var(--serif); font-size: 34px; font-weight: 700; color: var(--cta); line-height: 1.05;
}
.cartao-entrada .rotulo { letter-spacing: .3em; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; margin-bottom: 6px; }
.cartao-entrada p { color: #6f5c52; font-size: 14px; margin: 14px 0 22px; }
.cartao-entrada .rodape-cartao { font-size: 12px; color: var(--muted); margin-top: 20px; border-top: 1px solid var(--line); padding-top: 14px; }
.cartao-entrada .erro { color: #a33b22; font-size: 13px; min-height: 1em; margin-top: 12px; }
.demo-perfis { display: grid; gap: 8px; margin-top: 12px; }
.demo-perfis .btn { width: 100%; font-size: 13px; padding: 10px 12px; }
.email-box { background: #f5eae0; border-radius: 8px; padding: 10px 12px; font-weight: 700; word-break: break-all; margin: 0 0 18px; color: var(--deep); }

/* ---------- Estrutura do portal ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 250px; flex: none; background: #f4eee5; border-right: 1px solid #e9d9cb;
  display: flex; flex-direction: column; padding: 26px 16px 22px; position: sticky; top: 0; height: 100vh;
}
.brand { padding: 4px 12px 26px; }
.brand img { width: 170px; height: auto; display: block; }
.brand .brand-curso {
  border-top: 1px solid #e1d0c3; margin-top: 12px; padding-top: 12px;
  font-family: var(--serif); font-size: 21px; font-weight: 700; color: var(--cta); line-height: 1.1;
}
.brand .brand-turma { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--muted); margin-top: 4px; }
.nav-sec { padding: 12px 14px 6px; color: #ad9589; font-size: 10px; letter-spacing: .18em; font-weight: 800; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 0; background: transparent;
  color: #6c574d; border-radius: 10px; width: 100%; text-align: left; font-weight: 600; font-size: 14px;
  margin: 2px 0; text-decoration: none;
}
.nav-item:hover { background: #efe3d7; }
.nav-item.ativo { color: var(--deep); background: #ead9c9; box-shadow: inset 3px 0 0 var(--warm); }
.nav-item svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.65; fill: none; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sidebar-conta { margin-top: auto; border-top: 1px solid #ddcfc2; padding: 16px 10px 0; font-size: 12px; color: #725d52; }
.conta-linha { display: flex; align-items: center; gap: 9px; min-width: 0; }
.conta-linha div { min-width: 0; }
.conta-linha strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conta-linha .email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.avatar { display: inline-grid; place-items: center; background: #d7b6a1; color: #53392e; font-size: 12px; border-radius: 50%; height: 36px; width: 36px; font-weight: 700; flex: none; }
.main { flex: 1; min-width: 0; }
.topbar {
  background: rgba(255,252,248,.85); border-bottom: 1px solid #f0e8df; min-height: 64px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(16px, 3.7vw, 60px); gap: 14px;
}
.topbar-left { font-size: 12px; color: #90796e; }
.pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #e3d3c6; padding: 5px 11px; border-radius: 100px; color: #966547; background: #fffaf5; font-size: 11px; font-weight: 700; }
.pill.admin { background: #edf0e8; color: #526444; border-color: #ced6c4; }
.content { max-width: 1180px; margin: 0 auto; padding: 34px clamp(16px, 3.7vw, 60px) 60px; }
.carregando { padding: 60px 0; text-align: center; color: var(--muted); }
.footer { margin-top: 46px; display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid #e8dcd2; padding-top: 16px; color: #9b877c; font-size: 11px; flex-wrap: wrap; }

/* ---------- Componentes ---------- */
.hero {
  background: linear-gradient(114deg, var(--fundo-escuro) 0%, #3a2a22 55%, #6a4434 100%);
  border-radius: 17px; overflow: hidden; color: #fef7f0; padding: 38px 36px; position: relative;
}
.hero .eyebrow { color: var(--destaque); margin-bottom: 14px; }
.hero h1 { color: #fef7f0; max-width: 620px; }
.hero h1 .dest { color: var(--destaque); }
.hero p { color: #f0ded1; max-width: 560px; margin: 14px 0 22px; font-size: 14px; }
.hero-acoes { display: flex; gap: 10px; flex-wrap: wrap; }
.page-head { margin-bottom: 24px; }
.page-head .eyebrow { margin-bottom: 8px; }
.subline { color: #857267; margin-top: 8px; font-size: 14px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin: 34px 0 14px; flex-wrap: wrap; }
.panel, .module-card, .stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--raio); box-shadow: 0 4px 19px rgba(71,47,35,.025); }
.panel { padding: 24px; }
.panel > p { font-size: 14px; color: #6f5d53; }
.two-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .9fr); gap: 18px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.stat { padding: 18px 20px; }
.stat small { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #987f73; }
.stat strong { display: block; font: 600 26px var(--serif); color: var(--deep); margin: 6px 0 2px; }
.stat span { color: #8b7368; font-size: 12px; }
.badge { display: inline-block; border: 1px solid #ead6c8; border-radius: 99px; padding: 3px 10px; font-size: 11px; font-weight: 700; color: #9b684b; background: #fbf1e8; white-space: nowrap; }
.badge.ok { background: #edf0e8; color: #526444; border-color: #ced6c4; }
.badge.muted { background: #f5f2ee; color: #817c73; border-color: #e8e3dc; }
.badge.alerta { background: #fff4d6; color: #7a5a00; border-color: #f0dc9c; }
.notice { border-left: 3px solid #b98060; background: #f5eae0; padding: 14px 16px; margin-bottom: 20px; color: #6a493a; font-size: 13px; line-height: 1.6; border-radius: 0 8px 8px 0; }

/* Calendário */
.calendario { display: grid; gap: 0; }
.cal-linha { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid #eddfd2; text-decoration: none; }
.cal-linha:first-child { border-top: 0; }
.cal-linha .cod { font: 600 20px var(--serif); color: #ad6c4e; }
.cal-linha strong { font-size: 14px; display: block; color: var(--deep); }
.cal-linha span.data { font-size: 12px; color: var(--muted); }
a.cal-linha:hover strong { color: var(--cta); }

/* Encontros */
.encontro { border-top: 1px solid #eaddd1; margin-top: 16px; padding-top: 16px; }
.encontro strong { font-size: 14px; color: var(--deep); }
.encontro p { font-size: 13px; color: #7d685d; margin-top: 4px; }

/* Módulos */
.module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.module-card { padding: 18px; display: flex; flex-direction: column; min-height: 190px; text-decoration: none; transition: transform .2s, border-color .2s; }
.module-card:hover { transform: translateY(-2px); border-color: #d6b5a1; }
.module-card.bloqueado { opacity: .72; }
.module-card.bloqueado:hover { transform: none; border-color: var(--line); }
.mod-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.module-number { font: 600 32px var(--serif); color: #bd8f73; }
.module-card h3 { font-size: 21px; margin: 10px 0 6px; }
.module-card p { font-size: 13px; color: #8a766a; margin-bottom: 14px; }
.module-footer { margin-top: auto; padding-top: 10px; border-top: 1px solid #ede2d9; font-size: 12px; color: #8e7b70; }

/* Aulas */
.detail-back { display: inline-block; font-size: 13px; color: #a16648; font-weight: 700; padding: 0 0 16px; text-decoration: none; }
.lesson { padding: 15px 0; border-bottom: 1px solid #eadfd5; display: flex; gap: 14px; align-items: center; text-decoration: none; }
.lesson:last-child { border-bottom: 0; }
.lesson:hover strong { color: var(--cta); }
.lesson-num { font: 600 22px var(--serif); color: #ab8067; width: 40px; flex: none; }
.lesson-copy { flex: 1; min-width: 0; }
.lesson-copy strong { font-size: 15px; display: block; color: var(--deep); }
.lesson-copy span { font-size: 12px; color: #917d70; }
.lesson .seta { color: #b17757; font-size: 20px; }

.player {
  position: relative; width: 100%; aspect-ratio: 16 / 9; background: var(--fundo-escuro);
  border-radius: 12px; overflow: hidden;
}
.player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player .player-vazio { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #cbbfb0; padding: 20px; font-size: 14px; }
.player-ajuda { font-size: 12px; color: var(--muted); margin-top: 8px; }
.texto-aula { margin-top: 22px; }
.texto-aula p { margin: 0 0 12px; font-size: 15px; color: #4f3d34; }
.nav-aulas { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

/* Materiais */
.material { display: flex; gap: 14px; align-items: flex-start; padding: 15px 0; border-bottom: 1px solid #eadfd5; }
.material:last-child { border-bottom: 0; }
.material-icon { height: 42px; width: 42px; border-radius: 10px; background: #f1e0d2; color: #a66e4f; display: grid; place-items: center; flex: none; }
.material-icon svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.material-copy { flex: 1; min-width: 0; }
.material-copy strong { display: block; font-size: 14px; color: var(--deep); }
.material-copy p { font-size: 13px; color: #806e64; }
.material-copy small { color: #ae7760; font-weight: 700; }
.vazio { text-align: center; border: 1px dashed #d8beaa; border-radius: 13px; padding: 30px 20px; background: #fffcf8; color: #826b60; font-size: 14px; }

@media (max-width: 1100px) {
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .two-cols { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .app { display: block; }
  .sidebar { width: 100%; height: auto; position: static; padding: 10px 12px; display: block; border-right: 0; border-bottom: 1px solid #e9d9cb; }
  .brand { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 4px 10px; }
  .brand img { width: 120px; }
  .brand .brand-curso { border: 0; margin: 0; padding: 0; font-size: 17px; text-align: right; }
  .brand .brand-turma { display: none; }
  .sidebar nav { display: flex; overflow-x: auto; gap: 4px; }
  .nav-sec, .sidebar-conta { display: none; }
  .nav-item { width: auto; white-space: nowrap; font-size: 13px; padding: 8px 11px; flex: none; }
  .nav-item svg { display: none; }
  .topbar { min-height: 50px; padding: 8px 16px; }
  .content { padding: 22px 16px 44px; }
  .hero { padding: 28px 22px; }
  .stats { grid-template-columns: 1fr; }
  .module-grid { grid-template-columns: 1fr; }
  .footer { display: block; }
  .footer span { display: block; margin-bottom: 6px; }
}
