/* Painel administrativo (início com as áreas, administradores e login) */
:root {
  --brand: #2f2a24;
  --bg: #f6f2ec;
  --surface: #ffffff;
  --text: #1f2430;
  --muted: #626878;
  --line: #e3e4ea;
  --error: #b42318;
  --ok: #067647;
  font-family: "Sora", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.5; font-size: 15px; }
a { color: var(--brand); }
h1 { font-family: "Sora", ui-sans-serif, system-ui, sans-serif; letter-spacing: -.01em; font-size: 1.8rem; line-height: 1.25; margin: 0 0 .6rem; }
h2 { font-size: 1.08rem; margin: 0 0 .9rem; display: flex; align-items: center; gap: .4rem; }
h3 { font-size: .95rem; margin: 1.1rem 0 .5rem; }
code { font-family: ui-monospace, Consolas, monospace; background: #eef0f6; border-radius: 4px; padding: .1rem .3rem; font-size: .85em; overflow-wrap: anywhere; }
.small { font-size: .82rem; }
.a-muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.a-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .6rem 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.a-brand { font-weight: 700; color: var(--text); text-decoration: none; }
.a-top nav { display: flex; gap: 1.1rem; align-items: center; }
.a-top nav a { color: var(--text); text-decoration: none; }
.a-top nav form { margin: 0; }
.a-link { background: none; border: 0; font: inherit; color: var(--muted); cursor: pointer; text-decoration: underline; padding: 0; }
.a-page { max-width: 980px; margin: 0 auto; padding: 1.4rem 16px 4rem; }
.a-crumbs { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .85rem; color: var(--muted); margin-bottom: .5rem; }
.a-crumbs a { color: var(--muted); }

.a-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem; margin-bottom: 1.2rem; }
.a-panel.danger { border-color: #f1d1cd; }
.a-notice { background: #eef0f6; border-radius: 10px; padding: .7rem .9rem; margin: 0 0 1rem; }
.a-notice.error { background: #fdecea; color: var(--error); }
.a-notice.ok { background: #e7f6ee; color: var(--ok); }

.a-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: inherit; font-weight: 600; padding: .6rem 1rem; border-radius: 10px; border: 1px solid #c9ccd6; background: var(--surface); color: var(--text); text-decoration: none; cursor: pointer; }
.a-btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.a-btn.danger { color: var(--error); border-color: #e7b7b2; }
.a-btn.small { padding: .3rem .65rem; font-size: .82rem; }
.a-btn.block { width: 100%; }
.a-btn:disabled { opacity: .6; cursor: progress; }
.a-form { display: block; }
.a-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 1rem; }
.a-field { display: block; margin-bottom: 1rem; }
.a-field.narrow { max-width: 160px; }
.a-field > span { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .35rem; }
.a-field small { display: block; margin-top: .3rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=url], textarea, select {
  width: 100%; font: inherit; font-size: 16px; padding: .6rem .75rem; color: var(--text); background: #fff; border: 1px solid #c9ccd6; border-radius: 8px;
}
input[type=color] { width: 70px; height: 40px; padding: 2px; border: 1px solid #c9ccd6; border-radius: 8px; background: #fff; }
textarea.a-code { font-family: ui-monospace, Consolas, monospace; font-size: 14px; }
.a-check { display: flex; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.a-preview { display: block; width: 96px; height: 96px; object-fit: cover; border-radius: 12px; margin-bottom: .5rem; border: 1px solid var(--line); }
.a-preview.tall { height: 120px; }

.a-table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { text-align: left; font-weight: 600; color: var(--muted); }
th, td { padding: .5rem .6rem .5rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }

/* Abas da área */
.a-tab { display: inline-flex; align-items: center; gap: .4rem; padding: .6rem .9rem; color: var(--muted); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.a-tab:hover { color: var(--text); }
.a-tab.active { color: var(--brand); border-bottom-color: var(--brand); }

/* Cards arrastáveis (produtos, módulos, conteúdos) */

/* Janelas */
.a-check.spread { justify-content: space-between; flex-wrap: wrap; gap: .3rem 1rem; margin-bottom: .6rem; }
.a-check.spread > span { display: flex; gap: .5rem; align-items: center; }
.a-field.narrow-wide { max-width: 360px; }

/* Vitrines */
.a-btn:disabled { opacity: .45; cursor: not-allowed; }

/* Filtros do hub de membros */

/* ---------- Página das áreas: mesmo estilo das áreas de membros ---------- */
.a-top { position: sticky; top: 0; z-index: 10; padding: .8rem 24px; background: rgba(255, 255, 255, .85); backdrop-filter: blur(10px); }
.a-brand { display: inline-flex; align-items: center; gap: .55rem; font-family: "Sora", ui-sans-serif, system-ui, sans-serif; letter-spacing: -.01em; font-size: 1.15rem; }
.a-brand-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--brand); color: #fff; }
.a-page { max-width: 1120px; padding: 2.2rem 24px 4rem; }
.a-lead { color: var(--muted); font-size: 1.02rem; max-width: 640px; margin: 0 0 1.8rem; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 1.4rem; }
.hub-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: 22px; background: #fff; color: var(--text);
  text-decoration: none; box-shadow: 0 1px 2px rgba(25, 20, 10, .04), 0 10px 30px rgba(25, 20, 10, .07); transition: transform .18s, box-shadow .18s;
}
.hub-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(25, 20, 10, .12); }
.hub-card-top {
  height: 150px; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--area) 22%, var(--area-bg)), var(--area-bg) 70%);
}
.hub-logo {
  width: 84px; height: 84px; border-radius: 24px; display: grid; place-items: center; overflow: hidden; background: var(--area); color: #fff;
  font-family: "Sora", ui-sans-serif, system-ui, sans-serif; letter-spacing: -.01em; font-weight: 700; font-size: 2.4rem; box-shadow: 0 10px 24px color-mix(in srgb, var(--area) 35%, transparent);
}
.hub-logo img { width: 100%; height: 100%; object-fit: cover; }
.hub-card-body { padding: 1.1rem 1.3rem .4rem; }
.hub-rule { display: block; width: 36px; height: 2px; background: var(--area); margin-bottom: .6rem; }
.hub-card h2 { font-family: "Sora", ui-sans-serif, system-ui, sans-serif; letter-spacing: -.01em; font-size: 1.35rem; margin: 0 0 .2rem; }
.hub-card .small { overflow-wrap: anywhere; margin: 0; }
.hub-go { display: inline-flex; align-items: center; gap: .3rem; margin: .9rem 1.3rem 1.2rem; font-weight: 700; font-size: .92rem; color: var(--area); }
.hub-card.new {
  align-items: center; justify-content: center; text-align: center; gap: .7rem; padding: 1.6rem; background: transparent;
  border: 2px dashed #d8cfc2; box-shadow: none; min-height: 330px;
}
.hub-card.new:hover { transform: none; border-color: var(--brand); }
.hub-card.new input { width: 100%; text-align: center; }
.hub-card.new h2 { margin: 0; }
.hub-card.new p { margin: 0 0 .4rem; max-width: 240px; }
.hub-add { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: #ece5da; color: var(--brand); }

.a-center { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.a-login { width: 100%; max-width: 380px; background: var(--surface); border-radius: 16px; padding: 2rem 1.5rem; box-shadow: 0 8px 30px rgba(20, 22, 40, .08); }

/* Card da área: país e idioma */
.hub-card { position: relative; }
/* Fica no corpo do card, embaixo do endereço: nunca passa por cima da logo, em nenhuma largura. */
.hub-country {
  display: inline-flex; align-items: center; gap: .4rem; max-width: 100%; margin-top: .75rem; padding: .3rem .65rem .3rem .4rem;
  border-radius: 99px; background: color-mix(in srgb, var(--area) 8%, #fff); font-size: .76rem; font-weight: 600; color: var(--text);
}
.hub-country img { width: 20px; height: 15px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.hub-lang { font-weight: 400; color: var(--muted); padding-left: .4rem; border-left: 1px solid var(--line); }
.hub-url { margin: 0; font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }

/* Tela de entrada do administrador */
.a-login { max-width: 400px; border-radius: 24px; padding: 2.2rem 1.8rem 1.6rem; box-shadow: 0 1px 2px rgba(25, 20, 10, .04), 0 18px 50px rgba(25, 20, 10, .1); }
.a-login-brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .5rem; margin-bottom: 1.4rem; }
.a-login-brand h1 { margin: .3rem 0 0; font-size: 1.5rem; }
.a-login-brand p { margin: 0; }
.a-login-mark { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: var(--brand); color: #fff; box-shadow: 0 10px 24px rgba(47, 42, 36, .25); }
.a-optional { font-style: normal; font-weight: 400; color: var(--muted); font-size: .78rem; margin-left: .2rem; }
.a-login-hint { text-align: center; margin: 1rem 0 0; }

/* Confirmação do painel */
.a-confirm { border: 0; border-radius: 20px; padding: 1.4rem 1.4rem 1.1rem; max-width: 380px; width: calc(100% - 32px); box-shadow: 0 24px 60px rgba(25, 20, 10, .25); font: inherit; color: var(--text); }
.a-confirm::backdrop { background: rgba(20, 18, 14, .45); }
.a-confirm p { margin: 0 0 1.1rem; line-height: 1.5; }
.a-confirm-actions { display: flex; justify-content: flex-end; gap: .5rem; }
.a-confirm .a-btn.danger { background: var(--error); border-color: var(--error); color: #fff; }

/* Card da área com capa: a imagem fica atrás e a logo na frente */
.hub-card-top { position: relative; overflow: hidden; }
.hub-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.hub-card-top.has-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .05), rgba(0, 0, 0, .28)); }
.hub-card:hover .hub-cover { transform: scale(1.04); }
.hub-card-top .hub-logo { position: relative; z-index: 1; }
