/*
 * Painel editorial independente da página pública. Tokens, ações, campos e
 * estados vivem aqui; templates não criam estilos inline nem variantes locais.
 * O foco, os avisos e os controles nativos tornam todos os fluxos acessíveis.
 */
:root { --ink: #143547; --blue: #215d78; --muted: #687983; --canvas: #f5f6f4; --white: #fff; --line: #e0e6e4; --gold: #e4b33d; --green: #44785c; --danger: #a73535; --radius: 12px; }
/* Base e tamanhos mínimos evitam zoom e alvos de interação pequenos no celular. */
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 15px; line-height: 1.55; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .4; cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(27px, 2.8vw, 38px); line-height: 1.2; font-weight: 650; letter-spacing: -.035em; margin-bottom: 0; }
h2 { font-size: 20px; font-weight: 650; letter-spacing: -.02em; }
.muted, .lead { color: var(--muted); }
.lead { font-size: 16px; margin-bottom: 30px; max-width: 900px; }
.eyebrow { font-size: 10px; text-transform: uppercase; letter-spacing: .16em; color: var(--blue); font-weight: 800; margin: 0 0 11px; }
.skip-link { position: fixed; top: -8rem; left: 1rem; z-index: 100; padding: 1rem; background: var(--gold); }
.skip-link:focus { top: 1rem; }
/* Ui injeta sempre os elementos action-icon e texto: todas as variantes os usam. */
.action { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 11px 17px; border: 1px solid transparent; border-radius: 8px; font-size: 13px; line-height: 1.25; font-weight: 650; text-decoration: none; transition: background .15s, border-color .15s; }
.action-icon { flex: 0 0 auto; font-size: 17px; line-height: 1; }
.primary { color: var(--white); background: var(--ink); }
.primary:hover { background: var(--blue); }
.secondary { color: var(--ink); background: var(--white); border-color: var(--line); }
.secondary:hover { background: #edf2ef; border-color: #bed0c8; }
.danger { color: var(--danger); background: #fff1f0; }
.danger:hover { background: #ffe0dd; }
.text-action { color: var(--muted); background: transparent; padding-left: 0; padding-right: 0; }
.text-action:hover { color: var(--ink); }
.small { min-height: 36px; padding: 8px 12px; font-size: 12px; }
.full-width { width: 100%; }
.icon-action, .drag-handle { width: 34px; min-height: 36px; padding: 6px; border: 1px solid var(--line); color: var(--muted); background: var(--white); }
.icon-action > span:last-child, .drag-handle > span:last-child { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.drag-handle { cursor: grab; border: 0; background: transparent; }
.drag-handle:active { cursor: grabbing; }
/* Login oferece contexto em uma coluna e formulário compacto na outra. */
.auth-layout { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 10vw; width: min(1120px, calc(100% - 80px)); margin-inline: auto; padding-block: 60px; }
.admin-brand { display: inline-block; color: var(--ink); font-size: 34px; font-weight: 850; letter-spacing: -.065em; text-decoration: none; line-height: 1; }
.admin-brand span { color: var(--gold); }
.auth-intro .admin-brand { margin-bottom: 74px; }
.auth-intro h1 { font: 500 clamp(36px, 4.2vw, 56px)/1.12 Georgia, serif; margin-bottom: 24px; }
.auth-intro > p:not(.eyebrow) { max-width: 410px; color: var(--muted); font-size: 17px; }
.auth-art { width: 116px; height: 116px; border-radius: 50% 50% 50% 10%; background: #deebe1; color: var(--green); display: grid; place-items: center; margin-top: 42px; font-size: 70px; }
.auth-card { padding: 42px; background: var(--white); border: 1px solid var(--line); box-shadow: 0 14px 50px #14354708; border-radius: 16px; }
.auth-card h2 { font-size: 26px; margin-bottom: 9px; }
.auth-card .field { margin-bottom: 22px; }
.login-symbol { display: grid; place-items: center; width: 45px; height: 45px; margin-bottom: 22px; color: var(--blue); background: #e8f0f3; border-radius: 12px; font-size: 26px; }
/* Barra lateral permanece estável; sua navegação vira faixa fluida em telas pequenas. */
.sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: 252px; padding: 36px 22px 24px; display: flex; flex-direction: column; background: var(--white); border-right: 1px solid var(--line); z-index: 5; }
.sidebar .admin-brand { padding-left: 14px; }
.sidebar-caption { margin: 13px 0 38px; padding-left: 14px; color: var(--muted); font-size: 11px; }
.sidebar nav { display: grid; gap: 7px; }
.nav-action { justify-content: flex-start; background: transparent; color: var(--muted); padding: 14px; gap: 14px; font-size: 12px; }
.nav-action .action-icon { width: 18px; text-align: center; }
.nav-action:hover { color: var(--ink); background: #f2f5f3; }
.nav-action.active { color: var(--ink); background: #eaf0ec; }
.sidebar-bottom { margin-top: auto; padding-top: 35px; }
.sidebar-bottom > .action { width: 100%; }
.account-email { font-size: 10px; color: var(--muted); overflow-wrap: anywhere; padding: 16px 2px 0; margin-bottom: 6px; }
.panel { margin-left: 252px; min-height: 100vh; display: flex; flex-direction: column; }
.panel-header { display: flex; align-items: center; justify-content: space-between; min-height: 76px; border-bottom: 1px solid var(--line); padding: 16px 42px; background: var(--white); }
.panel-header > span { font-size: 11px; color: var(--muted); letter-spacing: .03em; }
.panel-main { width: 100%; max-width: 1350px; padding: 42px; margin-inline: auto; flex: 1; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.panel-footer { padding: 22px 42px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); }
/* Avisos usam semântica role no template; cor apenas complementa o texto. */
.notice { padding: 14px 18px; margin-bottom: 24px; border-radius: 9px; border: 1px solid; font-size: 14px; }
.notice.error { color: #882e2e; border-color: #efc3be; background: #fff0ee; }
.notice.success { color: #2b5b40; border-color: #bdd8c6; background: #eaf5ed; }
.notice.warning { color: #795a18; border-color: #e6d7ac; background: #fffae9; }
/* Visão geral resume presença pública, conteúdo e caminhos rápidos de edição. */
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 30px; }
.summary-card { padding: 24px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); display: grid; grid-template-columns: 1fr auto; }
.summary-card strong { grid-column: 1; font-size: 34px; font-weight: 600; line-height: 1.2; }
.summary-card > span:last-child { grid-column: 1 / -1; margin-top: 10px; color: var(--muted); font-size: 12px; }
.summary-icon { grid-column: 2; grid-row: 1; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; font-size: 22px; color: var(--blue); background: #e5eff2; }
.summary-icon.green { background: #e6f0e8; color: var(--green); }
.summary-icon.gold { background: #f8efce; color: #926916; }
.editor-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.option-card { padding: 34px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.option-card h2 { font-size: 27px; margin-bottom: 14px; }
.option-card > p:not(.eyebrow) { color: var(--muted); min-height: 73px; }
.tip-card { display: flex; gap: 20px; margin-top: 28px; padding: 24px; border-radius: var(--radius); background: #ecefe9; }
.tip-card > span { font-size: 24px; color: var(--green); }
.tip-card p { margin: 5px 0 0; font-size: 13px; color: var(--muted); }
/* Campos e grupos: um ponto oficial garante associação de labels e espaços. */
.edit-form { max-width: 1050px; }
.edit-form.narrow { max-width: 610px; }
.form-card { margin-bottom: 24px; padding: 30px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.form-card > h2 { margin-bottom: 25px; }
.form-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.form-card-heading h2, .form-card-heading .check-field { margin-bottom: 0; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.field-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { margin-bottom: 22px; min-width: 0; }
.field label { display: block; margin-bottom: 9px; font-size: 12px; font-weight: 650; }
.field input, .field textarea, .field select { display: block; width: 100%; min-height: 46px; border: 1px solid #cfd9d5; border-radius: 7px; background: var(--white); color: var(--ink); padding: 11px 13px; line-height: 1.5; }
.field input::placeholder { color: #8a989e; font-size: 12px; }
.field input[type=file] { padding: 9px; font-size: 12px; }
.field input[type=file]::file-selector-button { border: 0; background: #edf2ef; padding: 7px 10px; border-radius: 4px; color: var(--ink); margin-right: 12px; cursor: pointer; }
.field textarea { resize: vertical; }
.check-field { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink); margin-bottom: 12px; cursor: pointer; }
.check-field input { width: 18px; height: 18px; accent-color: var(--green); flex: 0 0 auto; }
.field-help { color: var(--muted); font-size: 11px; line-height: 1.65; margin: 9px 0 18px; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding-block: 7px 15px; }
.save-help { color: var(--muted); font-size: 11px; margin-left: auto; }
.sticky-actions { position: sticky; bottom: 0; padding: 16px 20px; margin: 0 -2px; border: 1px solid var(--line); border-radius: 10px; background: #ffffffee; box-shadow: 0 -6px 20px #14354706; }
.current-image { display: flex; align-items: center; gap: 18px; padding-bottom: 22px; font-size: 12px; color: var(--muted); }
.current-image img { width: 135px; height: 85px; object-fit: cover; border-radius: 8px; }
/* Editor tem fallback textarea; a classe js só é adicionada após inicialização. */
.editor-enhanced { display: none; }
.js .editor-enhanced { display: block; }
.js [data-rich-value] { display: none; }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 7px; border: 1px solid #cfd9d5; border-radius: 7px 7px 0 0; background: #f6f8f6; }
.toolbar-action { min-height: 32px; padding: 6px 8px; border: 0; background: transparent; border-radius: 4px; color: var(--ink); }
.toolbar-action:hover { background: #e2ebe5; }
.toolbar-action > span:last-child { font-size: 10px; }
.toolbar-action .action-icon { font-size: 16px; }
.editor-surface { min-height: 155px; padding: 16px; border: 1px solid #cfd9d5; border-top: 0; border-radius: 0 0 7px 7px; overflow-wrap: anywhere; background: var(--white); }
.editor-surface > :first-child { margin-top: 0; }
.editor-surface > :last-child { margin-bottom: 0; }
.editor-surface:focus { outline: 2px solid var(--blue); outline-offset: -2px; }
.editor-surface h2, .editor-surface h3 { font-size: 21px; margin: 22px 0 10px; }
.editor-surface a { color: var(--blue); text-underline-offset: 3px; }
/* Lista de cartões permite muitos itens sem tabela rígida ou scroll horizontal. */
.list-stack { display: grid; gap: 13px; }
.list-item { display: flex; align-items: center; gap: 20px; padding: 23px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.list-item.is-hidden { background: #f7f8f6; }
.list-leading { display: flex; gap: 14px; align-items: center; }
.list-symbol { display: grid; place-items: center; width: 48px; height: 48px; color: var(--blue); background: #e4eef0; border-radius: 12px; font: 25px Georgia, serif; }
.list-copy { flex: 1; min-width: 120px; }
.list-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.list-title h2 { font-size: 16px; margin: 0; overflow-wrap: anywhere; }
.list-copy p { color: var(--muted); font-size: 11px; margin: 7px 0 0; }
.visibility { border-radius: 99px; font-size: 9px; padding: 4px 8px; text-transform: uppercase; letter-spacing: .045em; font-weight: 750; }
.visibility.visible { color: #326348; background: #e1eee4; }
.visibility.hidden { color: #6f797d; background: #e8ebea; }
.list-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.move-actions { display: flex; gap: 3px; margin-right: 6px; }
.list-item.is-dragging { opacity: .5; }
.list-item.is-drop-target { outline: 2px dashed var(--green); outline-offset: 3px; }
.empty-state { padding: 70px 25px; text-align: center; border: 1px dashed #bed0c8; border-radius: 12px; }
.empty-state > span { color: var(--green); font-size: 40px; }
.empty-state h2 { margin-top: 20px; }
.empty-state p { color: var(--muted); }
/* Ajustes progressivos mantêm campos e ações completos em todas as larguras. */
@media (max-width: 1200px) { .sidebar { width: 225px; padding-inline: 15px; } .panel { margin-left: 225px; } .panel-main { padding: 32px; } .panel-header { padding-inline: 32px; } .list-item { flex-wrap: wrap; gap: 15px; } .list-actions { width: 100%; padding-left: 79px; } .summary-grid { gap: 14px; } .summary-card { padding: 20px; } }
@media (max-width: 850px) { .sidebar { position: static; width: auto; padding: 22px; display: block; border-right: 0; border-bottom: 1px solid var(--line); } .sidebar .admin-brand { padding-left: 0; } .sidebar-caption { display: none; } .sidebar nav { display: flex; flex-wrap: wrap; margin-top: 18px; gap: 5px; } .nav-action { padding: 10px 12px; font-size: 11px; gap: 8px; } .sidebar-bottom { margin-top: 16px; padding-top: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 15px; } .sidebar-bottom > .action { width: auto; } .account-email { margin: 0; padding: 0; } .panel { margin-left: 0; } .panel-header { display: none; } .auth-layout { gap: 50px; width: calc(100% - 50px); } .auth-card { padding: 30px; } .auth-intro .admin-brand { margin-bottom: 45px; } .field-grid.three { grid-template-columns: 1fr; gap: 0; } }
@media (max-width: 600px) { .auth-layout { grid-template-columns: 1fr; gap: 35px; padding-block: 35px; width: calc(100% - 36px); } .auth-intro h1 { font-size: 37px; } .auth-intro .admin-brand { margin-bottom: 30px; } .auth-intro > p:not(.eyebrow), .auth-art { display: none; } .panel-main { padding: 28px 18px; } .page-heading { align-items: start; flex-direction: column; gap: 20px; } .summary-grid { grid-template-columns: 1fr; gap: 12px; } .summary-card { grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; } .summary-card strong { grid-column: 3; grid-row: 1; font-size: 28px; } .summary-icon { grid-column: 1; } .summary-card > span:last-child { grid-column: 2; grid-row: 1; margin: 0; } .editor-options { grid-template-columns: 1fr; gap: 15px; } .option-card { padding: 26px; } .option-card > p:not(.eyebrow) { min-height: 0; } .form-card { padding: 23px 18px; } .field-grid { grid-template-columns: 1fr; gap: 0; } .form-card-heading { align-items: start; flex-direction: column; gap: 10px; } .list-item { padding: 17px 14px; gap: 12px; } .list-leading { gap: 4px; } .list-symbol { width: 36px; height: 36px; font-size: 21px; } .list-actions { padding-left: 0; gap: 6px; } .move-actions { margin-right: auto; } .list-title h2 { font-size: 14px; } .save-help { width: 100%; margin: 5px 0 0; } .toolbar-action > span:last-child { display: none; } .toolbar-action { min-width: 34px; } .panel-footer { padding: 20px 18px; } .sticky-actions { padding: 13px; } }
/* Motion respeita a escolha do sistema operacional. */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
