/* Semear EAD — identidade: papel #ECEBEA, marinho #011F5B, azul #568CF8, Lora + Poppins */
:root {
  --paper: #ECEBEA;
  --white: #FFFFFF;
  --navy: #011F5B;
  --navy-2: #0B2C70;
  --blue: #568CF8;
  --blue-text: #2F63C9;
  --blue-soft: #EEF3FE;
  --blue-line: #C9D5F0;
  --track: #E6ECF8;
  --ink: #1F2B47;
  --muted: #4A5675;
  --danger: #B42318;
  --ok: #1D7A46;
  --radius: 24px;
  --serif: 'Lora', Georgia, serif;
  --sans: 'Poppins', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.5; }
a { color: var(--blue-text); }
a:hover { color: var(--navy); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; color: var(--navy); }
.serif { font-family: var(--serif); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 20px; height: 20px; flex-shrink: 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ---------- estrutura ---------- */
.shell { min-height: 100vh; display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; padding: 16px; }
.sidebar { flex: 1 1 240px; max-width: 100%; background: var(--white); border-radius: var(--radius); padding: 24px 18px; display: flex; flex-direction: column; gap: 28px; }
.content { flex: 999 1 560px; min-width: 0; padding: 8px 8px 24px 16px; display: flex; flex-direction: column; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); padding: 0 6px; }
/* Texto do logo (INSTITUTO DE TEOLOGIA acima de semear), recortado do logo oficial da nova identidade */
.logo-type { display: block; width: 132px; height: auto; }
.logo-type.lg { width: 190px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-label { font-size: 11px; font-weight: 600; letter-spacing: .12em; color: var(--muted); padding: 0 12px 8px; }
.nav a, .nav button { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; background: none; border: 0; cursor: pointer; text-align: left; width: 100%; }
.nav a:hover, .nav button:hover { background: #F1F4FB; }
.nav a[aria-current="page"] { background: var(--navy); color: var(--white); }
.nav .count { margin-left: auto; font-size: 12px; font-weight: 600; opacity: .8; }
.verse { background: var(--blue-soft); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.verse p { margin: 0; font-family: var(--serif); font-size: 16px; line-height: 1.35; color: var(--navy); }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .12em; color: var(--blue-text); text-transform: uppercase; }

.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; }
.crumbs { font-size: 12px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.page-title { font-family: var(--serif); font-weight: 600; font-size: 40px; line-height: 1.02; }
.user-chip { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 18px 0 6px; background: var(--white); border-radius: 999px; }
.avatar { width: 36px; height: 36px; border-radius: 999px; background: var(--blue); color: var(--navy); font-weight: 600; font-size: 14px; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- blocos ---------- */
.card { background: var(--white); border-radius: var(--radius); padding: 24px; }
.row { display: flex; flex-wrap: wrap; gap: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.section-title { font-family: var(--serif); font-weight: 600; font-size: 28px; }
.hero { background-color: var(--navy); background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 28px 28px; color: var(--white); border-radius: 28px; padding: 36px 40px; position: relative; overflow: hidden; flex: 2 1 480px; min-height: 240px; display: flex; align-items: center; }
.hero h1 { color: var(--white); font-family: var(--serif); font-weight: 600; font-size: 44px; line-height: 1.02; }
.hero p { color: #E3EAF8; margin: 0; max-width: 460px; }
.hero .inner { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 14px; max-width: 480px; }
.hero .inner .btn { align-self: flex-start; }
.hero .mark { position: absolute; right: -30px; bottom: -20px; width: 300px; opacity: .9; }
.pill { display: inline-flex; align-self: flex-start; align-items: center; font-size: 11px; font-weight: 600; letter-spacing: .1em; padding: 6px 12px; border-radius: 999px; background: var(--blue); color: var(--navy); text-transform: uppercase; }
.pill.navy { background: var(--navy); color: var(--white); }
.pill.soft { background: var(--blue-soft); color: var(--navy); letter-spacing: 0; text-transform: none; }
.pill.gray { background: var(--paper); color: var(--muted); letter-spacing: 0; text-transform: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none; font-size: 14px; font-weight: 600; background: var(--navy); color: var(--white); }
.btn:hover { color: var(--white); background: var(--navy-2); }
.btn.light { background: var(--white); color: var(--navy); }
.btn.soft { background: var(--blue-soft); color: var(--navy); }
.btn.soft:hover { background: #DCE6FB; color: var(--navy); }
.btn.outline { background: var(--white); color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.btn.danger { background: #FDECEA; color: var(--danger); }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: default; }
.link-btn { background: none; border: 0; padding: 0; color: var(--blue-text); font-weight: 600; cursor: pointer; font-size: 13px; }

.tabs { display: inline-flex; flex-wrap: wrap; gap: 6px; background: var(--white); padding: 5px; border-radius: 999px; }
.tabs button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 600; background: transparent; color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--navy); color: var(--white); }

.bar { height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--blue); }
.bar.done > span { background: var(--navy); }

/* cartões de curso */
.course { background: var(--white); border-radius: 24px; padding: 14px 14px 20px; display: flex; flex-direction: column; gap: 14px; }
.cover { position: relative; overflow: hidden; height: 132px; border-radius: 16px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; }
.cover svg { position: absolute; right: -14px; bottom: -10px; width: 150px; }
.cover .t { position: relative; font-family: var(--serif); font-weight: 600; font-size: 26px; line-height: 1; }
.cover .pill { position: relative; font-size: 10px; padding: 5px 10px; }
.cover.navy { background: var(--navy); color: var(--white); }
.cover.blue { background: var(--blue); color: var(--navy); }
.cover.paper { background: var(--paper); color: var(--navy); }
.cover.navy .pill { background: var(--blue); color: var(--navy); }
.cover.blue .pill, .cover.paper .pill { background: var(--navy); color: var(--white); }
.course .body { padding: 0 6px; display: flex; flex-direction: column; gap: 4px; }
.course h3 { font-size: 16px; font-weight: 600; }
.course .foot { padding: 0 6px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.meta-row { display: flex; justify-content: space-between; font-size: 12px; gap: 8px; }

/* progresso */
.ring-wrap { display: flex; align-items: center; gap: 20px; }
.kv { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; }
.kv strong { color: var(--navy); }

/* sala da disciplina */
.room { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.room-main { flex: 2 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.room-side { flex: 1 1 300px; min-width: 0; background: var(--white); border-radius: 24px; padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; }
.player { position: relative; aspect-ratio: 16 / 9; border-radius: 24px; overflow: hidden; background: var(--navy); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player .empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #E3EAF8; text-align: center; padding: 24px; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 28px 28px; }
.lesson-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.mod-title { display: flex; justify-content: space-between; padding: 12px 8px 6px; }
.lesson { display: flex; align-items: center; gap: 12px; min-height: 52px; width: 100%; padding: 6px 8px; border: 0; border-radius: 14px; cursor: pointer; background: transparent; text-align: left; text-decoration: none; color: var(--ink); }
.lesson:hover { background: #F4F6FB; color: var(--ink); }
.lesson[aria-current="true"] { background: var(--blue-soft); }
.dot { width: 28px; height: 28px; flex-shrink: 0; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; background: var(--white); color: var(--muted); box-shadow: inset 0 0 0 2px var(--blue-line); }
.dot.done { background: var(--navy); color: var(--white); box-shadow: none; }
.dot.cur { background: var(--blue); color: var(--navy); box-shadow: none; }
.lesson .lt { font-size: 13px; line-height: 1.3; font-weight: 500; display: block; }
.lesson .lm { font-size: 11px; color: var(--muted); display: block; }
.material { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 0 14px; border-radius: 14px; text-decoration: none; color: var(--ink); }
.material:hover { background: #F4F6FB; }
.material .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--blue-soft); color: var(--navy); display: flex; align-items: center; justify-content: center; }

/* formulários */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: 13px; font-weight: 600; color: var(--navy); }
.input, select.input, textarea.input { width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--blue-line); border-radius: 12px; background: var(--white); }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:focus { outline: 2px solid var(--blue); border-color: var(--blue); }
.hint { font-size: 12px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.search { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px; background: var(--white); border-radius: 999px; color: var(--muted); flex: 0 1 340px; }
.search input { flex: 1; border: 0; outline: none; background: transparent; font-size: 14px; color: var(--ink); min-width: 0; }

/* tabelas */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--paper); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--paper); vertical-align: middle; }

/* editor de curso */
.mod-box { border: 1px solid var(--blue-line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.lesson-box { background: #F7F8FC; border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* login */
.login { min-height: 100vh; display: flex; flex-wrap: wrap; }
.login-art { flex: 1 1 420px; min-height: 320px; display: flex; flex-direction: column; justify-content: space-between; padding: 48px; color: var(--white); background-color: var(--navy); background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 28px 28px; position: relative; overflow: hidden; }
.login-art h1 { color: var(--white); font-family: var(--serif); font-weight: 600; font-size: 52px; line-height: 1; max-width: 520px; }
.login-art p { color: #E3EAF8; max-width: 440px; }
.login-form { flex: 1 1 420px; display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.login-box { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 18px; }
.google-btn { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; border-radius: 999px; border: 0; background: var(--white); color: var(--navy); font-weight: 600; font-size: 15px; cursor: pointer; box-shadow: inset 0 0 0 1px var(--blue-line); }
.google-btn:hover { background: #F7F8FC; }

.notice { padding: 14px 16px; border-radius: 14px; background: var(--blue-soft); color: var(--navy); font-size: 13px; }
.notice.warn { background: #FFF4E0; color: #6B4300; }
.notice.err { background: #FDECEA; color: var(--danger); }
.empty-state { text-align: center; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--navy); color: var(--white); padding: 12px 20px; border-radius: 999px; font-size: 14px; font-weight: 500; z-index: 50; box-shadow: 0 8px 24px rgba(1,31,91,.25); }
.toast.err { background: var(--danger); }
.loading { min-height: 60vh; display: flex; align-items: center; justify-content: center; color: var(--muted); }

/* Ajustes vindos do canvas (busca no painel, professor, etiquetas, cabeçalho do conteúdo) */
.search.wide { flex: 1 1 320px; }
.avatar.navy { width: 40px; height: 40px; background: var(--navy); color: var(--white); }
.prof-card { gap: 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.tag { font-size: 12px; font-weight: 500; padding: 6px 12px; border-radius: 999px; background: var(--blue-soft); color: var(--navy); }
.side-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 0 8px 10px; }

@media (max-width: 820px) {
  .shell { padding: 10px; }
  .sidebar { padding: 16px; gap: 14px; }
  .sidebar .nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar .nav a, .sidebar .nav button { width: auto; }
  .nav-label, .verse { display: none; }
  .content { padding: 8px 4px 24px; }
  .page-title { font-size: 32px; }
  .hero { padding: 28px 24px; }
  .hero h1 { font-size: 34px; }
  .hero .mark { width: 200px; opacity: .35; right: -40px; bottom: -30px; }
  .tabs button { padding: 0 12px; }
  .login-art { padding: 32px 24px; }
  .login-art h1 { font-size: 38px; }
}
