/* TheNewsGB-PB · sistema visual renovado */
:root {
  color-scheme: light;
  --paper: #f5f7f2;
  --paper-deep: #e7eee8;
  --surface: #ffffff;
  --ink: #173533;
  --ink-soft: #526965;
  --muted: #72847e;
  --line: #d7e2dc;
  --accent: #167b68;
  --accent-dark: #105e50;
  --green: #bad9ca;
  --wrap: 1240px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #111a19;
  --paper-deep: #1a2926;
  --surface: #1b2825;
  --ink: #eff6f1;
  --ink-soft: #bdcdc4;
  --muted: #98aaa1;
  --line: #344640;
  --accent: #69d0b2;
  --accent-dark: #8be0c2;
  --green: #2b463b;
}
html { scroll-behavior: smooth; }
body { background: var(--paper); color: var(--ink); font-size: 15px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.wrap, .page-shell, .edition-inner { width: min(calc(100% - 56px), var(--wrap)); }
.page-shell { min-height: 58vh; }
.edition-bar { height: 32px; background: #102e2b; color: #e1f0e8; letter-spacing: .12em; }
.edition-inner { font-size: 10px; }
.live-dot { background: #efb64f; box-shadow: 0 0 0 4px rgb(239 182 79 / 16%); }
.site-header { position: sticky; top: 0; z-index: 30; background: var(--surface); box-shadow: 0 5px 22px rgb(20 47 42 / 6%); }
.brand-row { min-height: 82px; }
.brand img { width: 45px; height: 45px; }
.brand-copy strong { font-size: 30px; }
.brand-copy small { color: var(--muted); font-size: 10px; }
.header-search { border-radius: 9px; background: var(--paper); }
.header-search input, .header-search input::placeholder { color: var(--ink-soft); }
.nav-border { border: 0; background: #153b36; }
.primary-nav { min-height: 47px; }
.nav-links { gap: clamp(15px, 2vw, 27px); }
.nav-links a { color: #e5f0ea; font-size: 11px; }
.nav-links .nav-home { color: #fff; }
.nav-links a:hover, .nav-links a:focus-visible { color: #ffcc72; }
.nav-links .account-link { color: #ffcc72; }
.nav-links .header-logout { color: #fff; }
.nav-edition { color: #bdcec5; }
.theme-toggle, .menu-toggle, .header-logout { border-radius: 8px; }
.theme-toggle { min-height: 38px; }
.home-hero { min-height: 500px; margin-top: 27px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 20px 50px rgb(18 48 42 / 8%); }
.hero-copy { padding: clamp(34px, 5vw, 68px); background: linear-gradient(145deg, var(--surface) 0%, var(--paper) 100%); }
.hero-copy h1 { font-size: clamp(45px, 5.1vw, 69px); line-height: .97; }
.hero-copy .eyebrow { margin-bottom: 25px; }
.hero-summary { color: var(--ink-soft); font-size: 15px; }
.hero-visual { min-height: 500px; }
.button { min-height: 46px; border-radius: 8px; cursor: pointer; }
.button-dark { background: #153b36; color: #fff; }
.button-dark:hover { background: #205a4e; }
.button span, .read-more span, .text-link span { color: #efb64f; }
.button-outline { border-color: var(--line); border-radius: 8px; }
.latest-section { padding-block: 76px; }
.section-heading h2 { font-size: 40px; }
.story-grid { gap: 24px; }
.story-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 9px 25px rgb(20 47 42 / 4%); }
.story-media { aspect-ratio: 1.55 / 1; }
.story-card-copy { padding: 18px 18px 20px; }
.story-card-copy h3 { font-size: clamp(23px, 2.2vw, 29px); }
.category-band { margin-block: 8px; border-radius: 18px; background: #153b36; }
.editor-pick { margin-bottom: 35px; }
.article-page { padding-top: 35px; }
.article-title { font-size: clamp(45px, 6vw, 76px); }
.article-prose { max-width: 700px; }
.article-prose p { color: var(--ink-soft); font-size: 19px; }
.article-prose .lead-paragraph { color: var(--ink); }
.article-media, .story-media { border-radius: 12px; }
.related-link { border-color: var(--line); }
.listing-page, .search-page, .about-page, .polls-page { padding-block: 38px 88px; }
.listing-intro h1, .about-title h1, .polls-intro h1 { font-size: clamp(48px, 7vw, 78px); }
.listing-intro > p, .about-title .about-lead, .polls-intro > p { color: var(--ink-soft); }
.filter-chip, .large-search input, .header-search, input, select, textarea { border-radius: 8px; }
.filter-chip { font-size: 10px; }
.filter-chip:hover, .filter-chip.is-active { border-color: #153b36; background: #153b36; }
.large-search input, input, select, textarea { color: var(--ink); background: var(--surface); }
.empty-state, .notice-card { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.about-poster { border-radius: 18px; background: #153b36; }
.site-footer { background: #102e2b; }
.footer-grid { padding-block: 58px 45px; }
.account-page, .settings-page, .admin-page { padding-block: 42px 92px; }
.account-card, .settings-card, .editor-form, .admin-queue, .admin-list, .comment-card, .comment-form { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 12px 35px rgb(18 48 42 / 5%); }
.account-card { padding: 30px; }
.settings-card { padding: 30px; }
.account-card input, .account-card select, .settings-card input:not([type="checkbox"]), .settings-card select, .editor-form input:not([type="checkbox"]), .editor-form select, .editor-form textarea, .comment-form textarea { border-radius: 8px; background: var(--paper); }
.form-message { position: relative; padding: 12px 14px 12px 44px; border-width: 1px; border-left-width: 4px; border-radius: 9px; }
.form-message::before { position: absolute; top: 50%; left: 13px; width: 20px; height: 20px; display: grid; place-items: center; transform: translateY(-50%); border-radius: 50%; font-size: 12px; font-weight: 800; }
.form-message.success::before { content: "✓"; color: #fff; background: #28784c; }
.form-message.error::before { content: "!"; color: #fff; background: #a63b30; }
.form-message.info::before { content: "i"; color: #fff; background: #316b5c; }
:root[data-theme="dark"] .form-message.success { color: #d6f5df; border-color: #3d7550; border-left-color: #6bc487; background: #193323; }
:root[data-theme="dark"] .form-message.error { color: #ffd9d2; border-color: #81483f; border-left-color: #ff8068; background: #3a211f; }
:root[data-theme="dark"] .form-message.info { color: #e0ebe4; border-color: #4b6255; border-left-color: #91b39d; background: #24342c; }
.admin-heading h1 { font-size: clamp(42px, 5.5vw, 66px); }
.admin-notice { border-radius: 10px; }
.admin-tabs { position: sticky; top: 129px; z-index: 10; margin: 0 0 25px; padding: 8px; display: flex; flex-wrap: wrap; gap: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 8px 20px rgb(18 48 42 / 5%); }
.admin-tabs a { min-height: 38px; padding: 0 14px; display: inline-flex; align-items: center; gap: 9px; border-radius: 8px; color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.admin-tabs a:hover { color: #fff; background: #153b36; }
.admin-tabs a span { padding: 2px 7px; border-radius: 30px; color: var(--accent-dark); background: var(--paper-deep); font-size: 9px; }
.admin-layout { scroll-margin-top: 190px; }
.admin-main, .admin-aside { gap: 18px; }
.editor-form, .admin-queue, .admin-list { padding: 24px; }
.editor-form-heading h2, .admin-list h2, .admin-queue h2 { font-size: 30px; }
.admin-item { padding-block: 16px; }
.admin-item h3 { font-size: 21px; }
.admin-polls-section { margin-top: 66px; padding-top: 33px; scroll-margin-top: 190px; border-top: 1px solid var(--line); }
.admin-polls-section > .section-heading { align-items: center; }
.admin-polls-section .section-heading h2 { font-size: 37px; }
.poll-admin-layout { display: grid; grid-template-columns: minmax(300px, .85fr) minmax(0, 1.15fr); gap: 20px; align-items: start; }
.poll-editor { position: sticky; top: 195px; }
.form-hint { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.poll-admin-item { align-items: flex-start; }
.poll-admin-options { margin-top: 10px; display: grid; gap: 5px; }
.poll-admin-options span { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-soft); font-size: 10px; }
.poll-admin-options b { color: var(--accent-dark); }
.poll-state { display: inline-flex; align-items: center; width: fit-content; padding: 5px 9px; border: 1px solid var(--line); border-radius: 30px; color: var(--ink-soft); background: var(--paper); font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.poll-state.open { color: #165c47; border-color: #a6d4ba; background: #e7f5ec; }
.poll-state.closed { color: #665d4e; border-color: #d8c8a6; background: #f7f1e3; }
.poll-state.draft { color: #566a66; border-color: #c4d1cb; background: #edf1ee; }
.polls-intro { max-width: 820px; margin-bottom: 34px; }
.polls-intro .breadcrumbs { margin-bottom: 31px; }
.polls-intro .eyebrow { margin-bottom: 12px; }
.polls-intro h1 { margin: 0; font-family: var(--display); font-weight: 500; letter-spacing: -.05em; line-height: .98; }
.polls-intro > p { max-width: 620px; margin-top: 16px; font-size: 16px; line-height: 1.7; }
.polls-list { max-width: 900px; display: grid; gap: 20px; }
.poll-card { padding: clamp(20px, 4vw, 34px); border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 12px 34px rgb(18 48 42 / 5%); }
.poll-card-head, .poll-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.poll-card-head time, .poll-card-foot { color: var(--muted); font-size: 10px; }
.poll-card h2 { margin: 20px 0 8px; font-family: var(--display); font-size: clamp(27px, 4vw, 39px); font-weight: 500; letter-spacing: -.03em; line-height: 1.08; }
.poll-description { max-width: 680px; margin: 0 0 20px; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.poll-options { display: grid; gap: 10px; }
.poll-vote-form fieldset { margin: 0 0 14px; padding: 0; display: grid; gap: 9px; border: 0; }
.poll-choice { min-height: 48px; padding: 10px 13px; display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); cursor: pointer; }
.poll-choice:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px rgb(22 123 104 / 10%); }
.poll-choice input { width: 17px; height: 17px; min-height: 17px; margin: 0; accent-color: var(--accent); }
.poll-choice span { color: var(--ink); font-size: 12px; font-weight: 600; }
.poll-result-label { margin-bottom: 6px; display: flex; justify-content: space-between; gap: 12px; font-size: 11px; }
.poll-result-label strong { color: var(--ink); font-weight: 600; }
.poll-result-label span { flex: 0 0 auto; color: var(--muted); }
.poll-meter { height: 10px; overflow: hidden; border-radius: 20px; background: var(--paper-deep); }
.poll-meter span { height: 100%; min-width: 2px; display: block; border-radius: inherit; background: linear-gradient(90deg, #147b67, #56b69a); }
.poll-card-foot { margin-top: 18px; padding-top: 13px; border-top: 1px solid var(--line); }
.polls-empty { max-width: 900px; }
.notice-card { padding: 24px; display: grid; grid-template-columns: 42px 1fr; gap: 16px; align-items: start; }
.notice-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--accent); font-size: 17px; font-weight: 700; }
.notice-card h2, .notice-card h3 { margin: 0; font-family: var(--display); font-size: 26px; font-weight: 500; }
.notice-card p { margin: 8px 0 0; color: var(--ink-soft); line-height: 1.65; }
.page-message { max-width: 850px; margin: 48px auto; padding: clamp(22px, 4vw, 38px); }
.page-message h1 { margin: 6px 0 8px; font-family: var(--display); font-size: clamp(31px, 5vw, 48px); font-weight: 500; }
.page-message p { color: var(--ink-soft); }
.page-message .button { margin-top: 8px; }
.setup-notice { margin-bottom: 18px; }
.toast-region { position: fixed; z-index: 100; right: 20px; bottom: 20px; width: min(420px, calc(100% - 40px)); display: grid; gap: 10px; }
.toast-message { padding: 15px 17px; border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: 12px; color: var(--ink); background: var(--surface); box-shadow: 0 14px 40px rgb(4 25 20 / 20%); font-size: 13px; font-weight: 600; line-height: 1.5; animation: toast-in .2s ease-out; }
.toast-message.success { border-left-color: #3c995f; }
.toast-message.error { border-left-color: #c2493b; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
:root[data-theme="dark"] .site-header { background: #15211f; }
:root[data-theme="dark"] .nav-border, :root[data-theme="dark"] .category-band { background: #102e2b; }
:root[data-theme="dark"] .story-card, :root[data-theme="dark"] .account-card, :root[data-theme="dark"] .settings-card, :root[data-theme="dark"] .editor-form, :root[data-theme="dark"] .admin-queue, :root[data-theme="dark"] .admin-list, :root[data-theme="dark"] .comment-card, :root[data-theme="dark"] .comment-form, :root[data-theme="dark"] .poll-card, :root[data-theme="dark"] .notice-card, :root[data-theme="dark"] .admin-tabs { color: var(--ink); border-color: var(--line); background: var(--surface); }
:root[data-theme="dark"] .hero-copy { background: linear-gradient(145deg, #1b2825, #1a2926); }
:root[data-theme="dark"] .button-dark { color: #10211e; background: #69d0b2; }
:root[data-theme="dark"] .button-dark:hover { background: #8be0c2; }
:root[data-theme="dark"] .nav-links a { color: #e5f0ea; }
:root[data-theme="dark"] .nav-links a:hover { color: #ffcc72; }
:root[data-theme="dark"] .nav-links .account-link { color: #ffcc72; }
:root[data-theme="dark"] .header-search, :root[data-theme="dark"] .large-search input, :root[data-theme="dark"] input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea, :root[data-theme="dark"] .poll-choice { color: var(--ink); border-color: var(--line); background: #15211f; }
:root[data-theme="dark"] .poll-choice span, :root[data-theme="dark"] .poll-result-label strong { color: var(--ink); }
:root[data-theme="dark"] .poll-state.open { color: #c7f2de; border-color: #3d755d; background: #19382c; }
:root[data-theme="dark"] .poll-state.closed { color: #f2dfb4; border-color: #716143; background: #322d20; }
:root[data-theme="dark"] .poll-state.draft { color: #d2ded7; border-color: #4a5b52; background: #252f2a; }
:root[data-theme="dark"] .poll-meter { background: #283a34; }
:root[data-theme="dark"] .admin-tabs a { color: var(--ink-soft); }
:root[data-theme="dark"] .admin-tabs a:hover { color: #10211e; background: #69d0b2; }
:root[data-theme="dark"] .form-hint, :root[data-theme="dark"] .poll-description, :root[data-theme="dark"] .notice-card p { color: var(--ink-soft); }
:root[data-theme="dark"] .status-published { color: #c7f2d0; border-color: #3d7550; background: #193323; }
:root[data-theme="dark"] .status-draft { color: #ffe4b0; border-color: #80673a; background: #382e1d; }
@media (max-width: 960px) {
  .wrap, .page-shell, .edition-inner { width: min(calc(100% - 42px), var(--wrap)); }
  .nav-links { gap: 15px; }
  .nav-links a { font-size: 10px; }
  .poll-admin-layout { grid-template-columns: 1fr; }
  .poll-editor { position: static; }
}
@media (max-width: 700px) {
  .wrap, .page-shell, .edition-inner { width: min(calc(100% - 32px), var(--wrap)); }
  .site-header { position: relative; }
  .brand-row { min-height: 73px; }
  .brand img { width: 39px; height: 39px; }
  .brand-copy strong { font-size: 24px; }
  .nav-border { background: var(--surface); }
  .primary-nav { padding-top: 8px; }
  .nav-links { gap: 0 12px; }
  .nav-links a { color: var(--ink); }
  .nav-links .header-logout { color: var(--ink); }
  .home-hero { margin-top: 18px; border-radius: 14px; }
  .hero-copy { min-height: 340px; padding: 28px 23px; }
  .hero-copy h1 { font-size: clamp(42px, 10vw, 57px); }
  .hero-visual { min-height: 285px; }
  .story-card { border-radius: 11px; }
  .story-card-copy { padding: 13px 12px 15px; }
  .category-band { border-radius: 14px; }
  .article-title { font-size: clamp(42px, 11vw, 58px); }
  .account-page, .settings-page, .admin-page { padding-block: 25px 65px; }
  .account-card, .settings-card, .editor-form, .admin-queue, .admin-list { padding: 18px; }
  .admin-tabs { position: static; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 4px; }
  .admin-tabs a { min-height: 42px; padding: 0 8px; justify-content: center; font-size: 9px; }
  .admin-tabs a span { display: none; }
  .admin-polls-section { margin-top: 45px; padding-top: 24px; }
  .admin-polls-section > .section-heading { align-items: flex-start; flex-direction: column; }
  .admin-polls-section .section-heading h2 { font-size: 31px; }
  .admin-item.poll-admin-item { align-items: flex-start; }
  .polls-page { padding-block: 25px 65px; }
  .polls-intro h1 { font-size: clamp(46px, 12vw, 65px); }
  .poll-card { padding: 20px 17px; }
  .poll-card h2 { font-size: 29px; }
  .poll-result-label { font-size: 10px; }
  .notice-card { padding: 19px; grid-template-columns: 34px 1fr; gap: 12px; }
  .notice-icon { width: 32px; height: 32px; }
  .page-message { margin-block: 25px; }
  .toast-region { right: 12px; bottom: 12px; width: calc(100% - 24px); }
  :root[data-theme="dark"] .nav-links a { color: var(--ink); }
}
@media (max-width: 390px) {
  .brand-copy strong { font-size: 21px; }
  .theme-toggle span { display: none; }
  .admin-tabs a { font-size: 8px; }
  .poll-card-head time { font-size: 8px; }
  .poll-card-foot { align-items: flex-start; flex-direction: column; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Gestão de contas e permissões operacionais */
.admin-accounts-section { margin-top: 48px; scroll-margin-top: 190px; }
.account-admin-list { display: grid; gap: 14px; }
.account-admin-card { padding: 20px; display: grid; grid-template-columns: minmax(210px, .8fr) minmax(0, 1.2fr); gap: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.account-admin-identity { min-width: 0; }
.account-admin-identity h3 { margin: 0 0 5px; overflow-wrap: anywhere; font-family: var(--display); font-size: 22px; font-weight: 500; }
.account-admin-identity p, .account-admin-identity small { margin: 0; display: block; overflow-wrap: anywhere; color: var(--muted); font-size: 11px; line-height: 1.6; }
.account-admin-identity .account-role { margin-top: 9px; color: var(--accent-dark); font-size: 10px; font-weight: 700; }
.account-permissions-form { min-width: 0; display: grid; gap: 12px; }
.account-permissions-form fieldset { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; border: 0; }
.permission-choice { min-height: 42px; padding: 9px 11px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-soft); background: var(--paper); font-size: 11px; font-weight: 600; cursor: pointer; }
.permission-choice:has(input:checked) { border-color: var(--accent); color: var(--ink); }
.permission-choice input { width: 16px; height: 16px; min-height: 16px; margin: 0; accent-color: var(--accent); }
.permission-choice input:disabled { opacity: .75; }
.account-permissions-form .button { justify-self: start; }
.poll-delete-button { color: #a83f35; }
.poll-delete-button:hover { border-color: #a83f35; color: #fff; background: #a83f35; }
:root[data-theme="dark"] .account-admin-card { border-color: var(--line); background: var(--surface); }
:root[data-theme="dark"] .permission-choice { border-color: var(--line); color: var(--ink-soft); background: #15211f; }
:root[data-theme="dark"] .permission-choice:has(input:checked) { color: var(--ink); border-color: var(--accent); }
:root[data-theme="dark"] .poll-delete-button { color: #ffc2b8; border-color: #81483f; }
@media (max-width: 700px) {
  .admin-accounts-section { margin-top: 35px; }
  .account-admin-card { grid-template-columns: 1fr; gap: 13px; }
  .account-permissions-form fieldset { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .admin-tabs { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
}
