/* =====================================================================
   Portal Xeryus — app.css
   Identidade: preto + branco + dourado #ffbf3c (assinatura) · Nunito
   ===================================================================== */

/* ---------- tokens ---------- */
:root {
    --black:    #000000;
    --ink:      #1a1a1a;
    --ink-2:    #141414;
    --gold:     #ffbf3c;
    --gold-600: #f0aa24;
    --gold-700: #c98912;
    --gold-text: #7d5200; /* dourado escuro p/ texto sobre claro (contraste WCAG AA ~6:1) */

    --paper:    #f1f5f9;
    --surface:  #ffffff;
    --surface-2:#f8fafc;
    --line:     #e2e8f0;
    --line-2:   #cbd5e1;

    --text:     #2b2b2b;
    --body:     #444444;
    --muted:    #6c6c6c;

    --green:    #1db84a;
    --green-bg: #e7f7ee;
    --red:      #f01d2c;
    --red-bg:   #fde8ea;
    --blue:     #2563eb;

    --radius:   14px;
    --radius-sm:9px;
    --shadow-xs:0 1px 2px rgba(0, 0, 0, .05);
    --shadow:   0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .04);
    --shadow-md:0 8px 24px rgba(0, 0, 0, .10);
    --shadow-lg:0 20px 50px rgba(0, 0, 0, .18);

    --sidebar-w:264px;
    --font: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    color: var(--body);
    background: var(--paper);
    line-height: 1.55;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--gold-700); }
button, input, select, textarea { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 3px solid rgba(255, 191, 60, .55); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; font-weight: 700; }

.ico { width: 20px; height: 20px; flex: none; }
code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .86em; background: var(--surface-2); border: 1px solid var(--line);
    padding: 1px 5px; border-radius: 5px; color: var(--ink);
}

/* ---------- utilitarios ---------- */
.muted { color: var(--muted); }
.ta-right { text-align: right; }
.cell-sub { font-size: .82em; display: block; }

.skip-link {
    position: absolute; left: -999px; top: 8px; z-index: 200;
    background: var(--gold); color: var(--black); padding: 10px 16px;
    border-radius: 8px; font-weight: 700;
}
.skip-link:focus { left: 8px; }

/* =====================================================================
   BOTOES
   ===================================================================== */
.btn {
    --btn-bg: var(--surface); --btn-fg: var(--ink); --btn-bd: var(--line-2);
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-bd);
    padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 700;
    font-size: 14px; cursor: pointer; transition: all .15s ease; white-space: nowrap;
    text-decoration: none; line-height: 1;
}
.btn:hover { color: var(--btn-fg); border-color: var(--ink); box-shadow: var(--shadow-xs); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .ico { width: 16px; height: 16px; }
.btn-primary { --btn-bg: var(--gold); --btn-fg: var(--black); --btn-bd: var(--gold-600); }
.btn-primary:hover { --btn-bg: var(--gold-600); border-color: var(--gold-700); color: var(--black); }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--body); --btn-bd: var(--line-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { --btn-bg: #fff; --btn-fg: var(--red); --btn-bd: #f5c2c7; }
.btn-danger:hover { background: var(--red-bg); border-color: var(--red); color: var(--red); }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-xs { padding: 5px 9px; font-size: 12px; border-radius: 7px; }
.btn-xs .ico { width: 14px; height: 14px; }
.btn-xs span { display: none; }
.btn-block { width: 100%; }

/* =====================================================================
   LAYOUT ADMIN (sidebar + main)
   ===================================================================== */
.admin-body { background: var(--paper); }

.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w);
    background: var(--black); color: #cfcfcf; display: flex; flex-direction: column;
    padding: 22px 16px; z-index: 100; transition: transform .25s ease;
}
.brand { display: block; padding: 6px 10px 18px; border-bottom: 1px solid #1f1f1f; margin-bottom: 14px; }
.brand-text { color: #fff; font-weight: 800; font-size: 24px; letter-spacing: -.01em; line-height: 1; }
.brand-text .accent { color: var(--gold); }
.brand-text.lg { font-size: clamp(30px, 4vw, 38px); }

.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; }
.nav-link {
    display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 10px;
    color: #d2d2d2; font-weight: 600; font-size: 14.5px; transition: all .15s ease;
    border: none; background: transparent; cursor: pointer; text-align: left;
}
.nav-link:hover { background: #161616; color: var(--gold); }
.nav-link.is-active { background: var(--ink-2); color: var(--gold); box-shadow: inset 4px 0 0 var(--gold); }
.nav-ico { display: inline-flex; }
.nav-ico .ico { width: 19px; height: 19px; }
/* grupos colapsáveis (relatórios) */
.nav-group { display: flex; flex-direction: column; }
.nav-group-toggle { width: 100%; text-align: left; }
.nav-group-toggle.has-active .nav-text { color: #fff; }
.nav-group-toggle.has-active .nav-ico { color: var(--gold); }
.nav-group.has-active { position: relative; }
.nav-group.has-active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.nav-count { margin-left: auto; background: #1f1f1f; color: #9a9a9a; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.nav-caret { color: #b0b0b0; display: inline-flex; transition: transform .2s; }
.nav-caret .ico { width: 15px; height: 15px; }
.nav-group.open .nav-caret { transform: rotate(90deg); }
.nav-children { display: none; flex-direction: column; gap: 1px; padding: 2px 0 6px; }
.nav-group.open .nav-children { display: flex; }
.nav-child { padding: 8px 13px 8px 44px; font-size: 13px; font-weight: 600; color: #c4c4c4; border-radius: 8px; line-height: 1.3; }
.nav-child:hover { background: #161616; color: var(--gold); }
.nav-child.is-active { color: var(--gold); background: #1a1a1a; font-weight: 700; box-shadow: inset 3px 0 0 var(--gold); }
/* página de relatório (stub) */
.report-stub-head { margin-bottom: 8px; }
.report-stub-title { font-size: 26px; font-weight: 800; margin: 10px 0 4px; }
.report-stub-desc { font-size: 15px; max-width: 720px; }
/* grid de categorias no início */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 22px; }
.cat-card { align-items: flex-start; }
.cat-desc { font-size: 13px; margin-top: 4px; }
.qa-count { color: var(--muted); font-size: 13px; font-weight: 600; }

.side-foot { margin-top: 14px; padding-top: 14px; border-top: 1px solid #1f1f1f; display: flex; flex-direction: column; gap: 10px; }
.user-card { display: flex; align-items: center; gap: 11px; padding: 8px 10px; background: #0e0e0e; border-radius: 10px; }
.avatar {
    width: 38px; height: 38px; border-radius: 50%; flex: none;
    background: linear-gradient(135deg, var(--gold), var(--gold-600));
    color: var(--black); display: grid; place-items: center; font-weight: 800; font-size: 16px;
}
.user-meta { display: flex; flex-direction: column; min-width: 0; }
.user-name { color: #fff; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { color: #888; font-size: 12px; }
.nav-link.logout { color: #9a9a9a; }
.nav-link.logout:hover { background: #2a1010; color: var(--red); }
.logout-form { margin: 0; }
.logout-form .nav-link { width: 100%; }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 18px 28px; background: var(--surface); border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 40;
}
.page-title { font-size: clamp(18px, 2.2vw, 23px); font-weight: 800; }
.content { padding: 26px 28px; flex: 1; width: 100%; max-width: 1200px; }
.footer {
    padding: 18px 28px; display: flex; justify-content: space-between; gap: 10px;
    color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); background: var(--surface);
}
.footer a:hover { color: var(--gold-700); }

/* menu toggle (mobile) */
.menu-toggle { display: none; }
.overlay {
    position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 90;
    backdrop-filter: blur(2px); border: none; padding: 0;
}

/* =====================================================================
   CARDS / TABELAS / BADGES
   ===================================================================== */
.card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); margin-bottom: 22px; overflow: hidden;
}
.card-narrow { max-width: 560px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.card-title { font-size: 16px; font-weight: 800; }
.card > .form, .card > * + .table-wrap, .card-body { padding: 20px; }

.table-wrap { overflow-x: auto; }
.table th, .table td { padding: 13px 20px; text-align: left; vertical-align: middle; }
.table thead th { background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table tbody tr { border-bottom: 1px solid var(--line); transition: background .12s; }
.table tbody tr:last-child { border-bottom: none; }
.table tbody tr:hover { background: var(--surface-2); }
.table tr.is-inactive { opacity: .58; }
.cell-strong { font-weight: 700; color: var(--ink); }
.cell-actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.inline-form { margin: 0; }

.badge {
    display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 700; line-height: 1.5;
}
.badge-green { background: var(--green-bg); color: #0c7a30; }
.badge-gray  { background: #eef1f5; color: #5b6672; }
.badge-gold  { background: #fff3d6; color: var(--gold-text); }
.badge-red   { background: var(--red-bg); color: var(--red); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: middle; }
.dot-green { background: var(--green); }
.dot-gray  { background: var(--line-2); }

/* =====================================================================
   DASHBOARD
   ===================================================================== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px;
}
.stat-ico { width: 40px; height: 40px; border-radius: 10px; background: var(--black); color: var(--gold); display: grid; place-items: center; margin-bottom: 10px; }
.stat-ico .ico { width: 21px; height: 21px; }
.stat-num { font-size: 30px; font-weight: 800; color: var(--ink); line-height: 1; }
.stat-label { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat-delta { color: var(--green); font-weight: 800; font-size: 13px; margin-top: 2px; }

.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.qa-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 20px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-xs);
    transition: all .15s; color: var(--body);
}
.qa-card:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); }

.welcome-card { background: linear-gradient(135deg, #0f0f0f, #000); color: #fff; border-radius: var(--radius); padding: 30px 32px; box-shadow: var(--shadow); margin-bottom: 22px; position: relative; overflow: hidden; }
.welcome-card::after { content: ""; position: absolute; right: -80px; top: -80px; width: 220px; height: 220px; background: radial-gradient(circle, rgba(255,191,60,.22), transparent 65%); pointer-events: none; }
.welcome-card h2 { color: #fff; font-size: 26px; font-weight: 800; position: relative; z-index: 1; }
.welcome-card p { color: #c2c2c2; margin-top: 6px; position: relative; z-index: 1; }
.welcome-note { padding: 20px; margin: 0; }
.welcome-note a { color: var(--gold-text); font-weight: 700; }

.chart-wrap { padding: 16px 20px 8px; }
.chart { width: 100%; height: auto; display: block; }
.qa-ico { width: 38px; height: 38px; border-radius: 9px; background: #fff3d6; color: var(--gold-700); display: grid; place-items: center; }
.qa-go { align-self: flex-end; margin-top: auto; color: var(--muted); display: inline-flex; }
.qa-go .ico { width: 16px; height: 16px; }
.qa-card:hover .qa-go { color: var(--gold-text); }

.empty, .empty-state { padding: 20px; }
.empty-state { text-align: center; padding: 44px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-ico { width: 56px; height: 56px; border-radius: 14px; background: var(--surface-2); color: var(--muted); display: grid; place-items: center; margin-bottom: 6px; }
.empty-state h3 { font-size: 18px; }
.empty-state p { color: var(--muted); margin-bottom: 6px; }
.empty-state-inline { padding: 18px 20px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.empty-state-inline p { margin: 0; color: var(--muted); }

/* =====================================================================
   PAGINAS (lista) - tabs / actions
   ===================================================================== */
.page-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
    padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 13px;
    background: var(--surface); border: 1px solid var(--line); color: var(--muted);
}
.tab:hover { border-color: var(--line-2); color: var(--ink); }
.tab.is-active { background: var(--black); color: var(--gold); border-color: var(--black); }

/* =====================================================================
   FORMULARIOS
   ===================================================================== */
.form { display: flex; flex-direction: column; gap: 16px; padding: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-weight: 700; font-size: 13px; color: var(--ink); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.field-label small, .field-hint { color: var(--muted); font-weight: 500; font-size: 12px; }
.field-hint-inline code { font-size: 11px; }
.field input[type="text"], .field input[type="email"], .field input[type="password"],
.field input[type="search"], .field select, .field textarea, textarea.textarea {
    width: 100%; padding: 11px 13px; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text); transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus, textarea.textarea:focus {
    outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(255, 191, 60, .18);
}
.field input:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.textarea { resize: vertical; min-height: 220px; font-family: var(--font); line-height: 1.6; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-check { flex-direction: row; align-items: center; gap: 9px; }
.field-check input { width: 18px; height: 18px; accent-color: var(--gold-700); }
.field-check span { font-weight: 700; color: var(--ink); }
.field-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin: 4px 0; }
.field-divider::before, .field-divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

/* editor de pagina */
.edit-grid { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }
.edit-main { margin-bottom: 0; }
.edit-main .field:first-child { padding-top: 0; }
.edit-side { position: sticky; top: 84px; }
.side-sticky { margin-bottom: 0; }
.side-sticky .field { padding: 0; }
.side-sticky .card-head { padding-bottom: 14px; }
.side-meta { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.side-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.side-row > span:first-child { color: var(--muted); }
.side-row code { font-size: 12px; }

/* usuarios */
.users-layout { display: grid; grid-template-columns: 380px 1fr; gap: 22px; align-items: start; }
.users-form { margin-bottom: 0; position: sticky; top: 84px; }
.hint-box { padding: 14px 20px; background: var(--surface-2); border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* =====================================================================
   ALERTAS / FLASH
   ===================================================================== */
.alert {
    display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px; border-radius: var(--radius-sm);
    margin-bottom: 16px; font-weight: 600; font-size: 14px; border: 1px solid transparent;
}
.alert-ico { flex: none; margin-top: 1px; }
.alert-ico .ico { width: 18px; height: 18px; }
.alert-success { background: var(--green-bg); color: #0c7a30; border-color: #bfe9cc; }
.alert-error   { background: var(--red-bg); color: #b3141f; border-color: #f3c0c5; }
.alert-info    { background: #eef4ff; color: #1d4ed8; border-color: #c7d8fe; }
.alert-warning { background: #fff7e6; color: var(--gold-text); border-color: #ffe2a8; }
.alert-close { margin-left: auto; background: none; border: none; font-size: 20px; line-height: 1; cursor: pointer; color: inherit; opacity: .6; padding: 0 4px; }
.alert-close:hover { opacity: 1; }

/* =====================================================================
   LOGIN (split)
   ===================================================================== */
.auth-body { background: var(--paper); }
.auth-split {
    min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr;
    box-shadow: var(--shadow-lg);
}
.auth-panel {
    background: radial-gradient(120% 120% at 0% 0%, #1c1c1c 0%, #000 55%);
    color: #fff; padding: 56px 52px; display: flex; flex-direction: column; justify-content: center; gap: 24px;
    position: relative; overflow: hidden;
}
.auth-panel::after {
    content: ""; position: absolute; right: -120px; bottom: -120px; width: 340px; height: 340px;
    background: radial-gradient(circle, rgba(255, 191, 60, .22), transparent 65%); pointer-events: none;
}
.auth-logo { width: 180px; height: auto; position: relative; z-index: 1; }
.auth-panel-copy { position: relative; z-index: 1; }
.auth-panel-copy h1 { color: #fff; font-size: 30px; font-weight: 800; margin-bottom: 10px; }
.auth-panel-copy p { color: #b9b9b9; font-size: 16px; max-width: 360px; }
.auth-panel-link { color: var(--gold); font-weight: 700; font-size: 14px; position: relative; z-index: 1; }
.auth-panel-link:hover { color: #fff; }
.auth-formwrap { display: grid; place-items: center; padding: 40px; background: var(--surface); }
.auth-form-inner { width: 100%; max-width: 380px; }
.auth-mobile-brand { display: none; }
.auth-form-title { font-size: 26px; font-weight: 800; }
.auth-form-sub { color: var(--muted); margin-bottom: 22px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }

/* wordmark (texto) para fundos claros */
.wm { font-weight: 800; font-size: 22px; color: var(--ink); letter-spacing: -.02em; }
.wm-accent { color: var(--gold-text); }
.wm-tag {
    background: var(--gold); color: var(--black); font-weight: 800; font-size: 11px;
    padding: 3px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: .05em; margin-left: 8px;
}

/* =====================================================================
   SITE PUBLICO
   ===================================================================== */
.public-body { background: var(--surface); }
.pub-wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.pub-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.pub-header-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.pub-brand { display: inline-flex; align-items: center; }
.pub-brand:hover .wm { color: var(--black); }
.pub-nav { display: flex; gap: 22px; }
.pub-nav a { color: var(--body); font-weight: 600; font-size: 14px; }
.pub-nav a:hover { color: var(--gold-700); }
.pub-main { padding: 48px 0 64px; min-height: 60vh; }

.pub-hero { text-align: center; padding: 40px 0 52px; border-bottom: 1px solid var(--line); margin-bottom: 44px; }
.pub-hero h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; letter-spacing: -.02em; }
.pub-hero h1::after { content: ""; display: block; width: 64px; height: 5px; background: var(--gold); border-radius: 3px; margin: 18px auto 0; }
.pub-hero p { color: var(--muted); font-size: 18px; margin-top: 16px; }

.pub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.pub-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 26px; box-shadow: var(--shadow-xs); transition: all .18s; display: flex; flex-direction: column; gap: 8px; color: var(--body);
}
.pub-card:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: var(--shadow-md); color: var(--body); }
.pub-card-date { color: var(--gold-text); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.pub-card-title { font-size: 19px; font-weight: 800; color: var(--ink); }
.pub-card-excerpt { color: var(--muted); font-size: 14px; flex: 1; }
.pub-card-cta { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ink); font-size: 14px; margin-top: 6px; }
.pub-card-cta .ico { width: 16px; height: 16px; transition: transform .15s; }
.pub-card:hover .pub-card-cta .ico { transform: translateX(3px); }

.pub-article { max-width: 760px; margin: 0 auto; }
.pub-back { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-weight: 600; font-size: 14px; margin-bottom: 24px; }
.pub-back .ico { width: 16px; height: 16px; }
.pub-back:hover { color: var(--gold-700); }
.pub-title { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.pub-excerpt { font-size: 19px; color: var(--muted); margin-top: 12px; }
.pub-meta { display: flex; gap: 16px; color: var(--muted); font-size: 14px; margin: 18px 0 28px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.pub-body { font-size: 17px; line-height: 1.8; color: var(--text); }
.pub-body h2 { font-size: 26px; margin: 34px 0 12px; }
.pub-body h3 { font-size: 21px; margin: 28px 0 10px; }
.pub-body h4 { font-size: 18px; margin: 24px 0 8px; }
.pub-body p { margin-bottom: 16px; }
.pub-body ul, .pub-body ol { margin: 0 0 16px 22px; }
.pub-body li { margin-bottom: 6px; }
.pub-body blockquote { border-left: 4px solid var(--gold); padding: 6px 18px; margin: 0 0 16px; color: var(--muted); font-style: italic; background: var(--surface-2); border-radius: 0 8px 8px 0; }
.pub-body a { color: var(--gold-text); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.pub-body strong { color: var(--ink); }
.pub-empty { text-align: center; padding: 80px 20px; }
.pub-empty h1, .pub-empty h2 { margin-bottom: 8px; }
.pub-empty p { color: var(--muted); margin-bottom: 18px; }
.pub-empty .btn { margin-top: 6px; }
.pub-footer { border-top: 1px solid var(--line); background: var(--surface-2); }
.pub-footer-inner { display: flex; justify-content: space-between; align-items: center; height: 64px; color: var(--muted); font-size: 14px; }
.pub-footer a:hover { color: var(--gold-700); }

/* =====================================================================
   RESPONSIVO
   ===================================================================== */
@media (max-width: 1024px) {
    .edit-grid { grid-template-columns: 1fr; }
    .edit-side { position: static; }
    .users-layout { grid-template-columns: 1fr; }
    .users-form { position: static; }
}

@media (max-width: 860px) {
    .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
    .admin-body.nav-open .sidebar { transform: translateX(0); }
    .admin-body.nav-open .overlay { display: block; }
    .overlay[hidden] { display: none; }
    .main { margin-left: 0; }
    .menu-toggle {
        display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
        position: fixed; top: 14px; left: 14px; z-index: 110; width: 44px; height: 44px;
        background: var(--black); border: none; border-radius: 11px; cursor: pointer; padding: 11px;
        box-shadow: var(--shadow);
    }
    .menu-toggle span { display: block; height: 2.5px; width: 100%; background: var(--gold); border-radius: 2px; transition: transform .2s; }
    .admin-body.nav-open .menu-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
    .admin-body.nav-open .menu-toggle span:nth-child(2) { opacity: 0; }
    .admin-body.nav-open .menu-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
    .topbar { padding-left: 74px; }
    .content { padding: 20px 16px; }
    .footer { padding: 16px; }
    .btn-xs span { display: none; }

    /* login vira coluna unica */
    .auth-split { grid-template-columns: 1fr; }
    .auth-panel { display: none; }
    .auth-panel-copy h1 { font-size: 24px; }
    .auth-formwrap { padding: 32px 22px; }
    .auth-mobile-brand { display: flex; align-items: center; margin-bottom: 18px; }
}

@media (max-width: 560px) {
    .form-row { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .page-actions { flex-direction: column; align-items: stretch; }
    .page-actions .btn { width: 100%; }
    .topbar-actions { display: none; }
    .table th, .table td { padding: 11px 14px; }
    .pub-hero { padding: 24px 0 32px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
