/* Numeria — dourado sobre creme, inspirado no logo */
:root {
  --bg: #f8f4ea;
  --card: #ffffff;
  --ink: #2a2218;
  --muted: #74685a;
  --gold: #a67c2e;
  --gold-dark: #7d5c1e;
  --gold-soft: #f1e6cc;
  --primary: var(--gold);
  --line: #e6dcc6;
  --ok: #2f7a4d;
  --warn: #9a6a00;
  --err: #a33a2b;
  --radius: 14px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 18px/1.6 var(--sans); }
a { color: var(--gold-dark); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.25; margin: 0 0 .6rem; }
h1 { font-size: 2rem; }
h2 { font-size: 1.35rem; }
p { margin: 0 0 .8rem; }
img { max-width: 100%; }

.container { width: min(1040px, 100% - 32px); margin: 0 auto; }
.stack > * + * { margin-top: .9rem; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.center { text-align: center; }
.hint, .muted { color: var(--muted); font-size: .95rem; }
.small { font-size: .9rem; }
.grid { display: grid; gap: 1rem; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: 0 1px 2px rgba(60, 40, 10, .04); }
.card + .card { margin-top: 1rem; }
.grid > .card + .card { margin-top: 0; }

/* Formulários */
.field { display: flex; flex-direction: column; gap: .3rem; }
.field label { font-weight: 600; font-size: .92rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=file], select, textarea {
  width: 100%; min-height: 48px; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 10px; background: #fffdf8; font: inherit; color: var(--ink);
}
.check input { width: 22px; height: 22px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold-soft); border-color: var(--gold); }
.check { display: flex; gap: .5rem; align-items: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 48px; padding: .7rem 1.3rem; border-radius: 10px; border: 1px solid var(--gold);
  background: var(--gold); color: #fff; font: 600 1rem var(--sans); cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.btn.ghost { background: transparent; color: var(--gold-dark); }
.btn.ghost:hover { background: var(--gold-soft); }
.btn.danger { background: var(--err); border-color: var(--err); }
.btn.block { width: 100%; }
.btn-google { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-google:hover { background: #faf6ee; border-color: var(--gold); }

.flash { padding: .8rem 1rem; border-radius: 10px; margin-bottom: 1rem; border: 1px solid; }
.flash.ok { background: #eef7f1; border-color: #b9dcc6; color: var(--ok); }
.flash.warn { background: #fff7e6; border-color: #ecd29a; color: var(--warn); }
.flash.err { background: #fbeeeb; border-color: #e9bdb5; color: var(--err); }

.badge { display: inline-block; padding: .15rem .55rem; border-radius: 99px; font-size: .78rem; font-weight: 600; background: var(--gold-soft); color: var(--gold-dark); }
.badge.green { background: #e3f3e9; color: var(--ok); }
.badge.red { background: #f7e1dc; color: var(--err); }

/* Tela de entrada */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 2rem 16px; }
.auth .box { width: min(420px, 100%); }
.auth .logo { width: 150px; display: block; margin: 0 auto 1rem; }
.divider { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .85rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Área logada */
.topbar { background: #fffdf8; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar .container { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font-family: var(--serif); font-weight: 600; font-size: 1.1rem; }
.brand img { width: 40px; height: 40px; }
.nav { display: flex; gap: .25rem; margin-left: auto; align-items: center; }
.nav a, .nav button { padding: .5rem .75rem; border-radius: 8px; text-decoration: none; color: var(--ink); font: 500 .95rem var(--sans); background: none; border: 0; cursor: pointer; }
.nav a:hover, .nav button:hover { background: var(--gold-soft); }
.nav a.on { background: var(--gold-soft); color: var(--gold-dark); font-weight: 600; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 8px; padding: .4rem .6rem; font-size: 1.2rem; cursor: pointer; }
main.page { padding: 1.5rem 0 3rem; }
.footer { border-top: 1px solid var(--line); padding: 1.2rem 0; color: var(--muted); font-size: .85rem; }

/* Menu lateral (mesmo padrão do admin do Next Edu) */
.container.wide { width: min(1320px, 100% - 32px); }
.who { color: var(--muted); padding: .5rem .25rem; }
.shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 2rem; width: min(1320px, 100% - 32px); margin: 0 auto; align-items: start; }
.sidetoggle { display: none; }
.sidebtn { display: none; }
.side { position: sticky; top: 80px; padding: 1.25rem 0; display: flex; flex-direction: column; gap: .15rem; max-height: calc(100vh - 90px); overflow-y: auto; }
.side a { display: flex; align-items: center; gap: .7rem; min-height: 46px; padding: .55rem .8rem; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 500; }
.side a:hover { background: var(--gold-soft); }
.side a.on { background: var(--gold-soft); color: var(--gold-dark); font-weight: 700; }
.side .ic { width: 1.6rem; text-align: center; font-size: 1.15rem; }
.side .ver { margin-left: auto; color: var(--muted); font-size: .8rem; font-weight: 400; }
.side .sg { margin-top: .6rem; }
.side .sg summary { cursor: pointer; list-style: none; padding: .4rem .8rem; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.side .sg summary::-webkit-details-marker { display: none; }
.side .sg summary::after { content: " ▾"; }
.side .sg:not([open]) summary::after { content: " ▸"; }
.shell main.page { padding: 1.5rem 0 3rem; }
.card[id] { scroll-margin-top: 90px; }

.stat { text-align: center; }
.stat b { display: block; font-family: var(--serif); font-size: 2.2rem; color: var(--gold-dark); line-height: 1.1; }
.tile { display: block; text-decoration: none; color: var(--ink); transition: border-color .15s; }
.tile:hover { border-color: var(--gold); }

table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: left; padding: .7rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }

.texto { border-top: 1px solid var(--line); padding-top: 1rem; }
.texto .num { display: inline-grid; place-items: center; min-width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--gold-soft); color: var(--gold-dark); font: 700 1rem var(--serif); margin-right: .5rem; }
.texto .corpo { white-space: pre-line; font-size: 19px; line-height: 1.75; max-width: 70ch; }
.texto summary { min-height: 44px; display: flex; align-items: center; }
.texto .corpo.curto { max-height: 7.5em; overflow: hidden; position: relative; }
.texto .corpo.curto::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2.5em; background: linear-gradient(transparent, #fff); }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; gap: 0; }
  .sidebtn { display: flex; align-items: center; gap: .5rem; min-height: 48px; margin-top: 1rem; padding: .6rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: #fffdf8; font-weight: 600; cursor: pointer; }
  .side { display: none; position: static; max-height: none; padding: .5rem 0 0; }
  .sidetoggle:checked ~ .side { display: flex; }
}
@media (max-width: 760px) {
  h1 { font-size: 1.6rem; }
  .hide-sm, table.list .hide-sm { display: none; }
  .brand span { font-size: 1rem; }
}
