:root {
    --primary: #0b2253;
    --primary-light: #13366f;
    --accent: #ef1724;
    --accent-hover: #c80f1a;
    --text: #253044;
    --text-light: #667085;
    --muted: #98a2b3;
    --bg: #f4f7fb;
    --white: #fff;
    --border: #e4e7ec;
    --success: #067647;
    --warning: #b54708;
    --shadow: 0 6px 20px rgba(11, 34, 83, .08);
    --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
button, .btn { cursor: pointer; }

.container { width: min(1280px, calc(100% - 40px)); margin: 0 auto; }

.topbar { background: var(--primary); color: var(--white); font-size: 13px; }
.topbar .container { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar-links { display: flex; gap: 18px; }
.topbar a { color: rgba(255,255,255,.84); }
.topbar a:hover { color: #fff; }
.topbar-date { color: rgba(255,255,255,.72); text-align: right; }

.header { background: #fff; border-bottom: 1px solid var(--border); }
.header .container { min-height: 112px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.logo-img { width: 168px; height: 108px; object-fit: contain; }

.search-form { flex: 0 1 440px; display: flex; gap: 10px; }
.search-box { flex: 1; display: flex; align-items: center; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 0 16px; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; padding: 12px 4px; color: var(--text); }
.search-btn { border: 0; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; padding: 11px 18px; }
.search-btn:hover { background: var(--accent-hover); }

.navbar { background: var(--primary); position: sticky; top: 0; z-index: 50; box-shadow: 0 3px 12px rgba(0,0,0,.12); }
.navbar .container { display: flex; align-items: center; min-height: 54px; }
.nav-menu { list-style: none; display: flex; align-items: stretch; min-width: 0; }
.nav-item a { display: block; color: #fff; padding: 16px 18px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.nav-item a:hover, .nav-item.active a { background: var(--accent); }
.nav-right-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; padding-left: 12px; }
.admin-btn { display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.35); border-radius: 7px; padding: 7px 11px; color: #fff; font-size: 13px; font-weight: 700; white-space: nowrap; }
.admin-btn.solid { background: #fff; color: var(--primary); border-color: #fff; }
.admin-btn:hover { background: rgba(255,255,255,.12); }
.admin-btn.solid:hover { background: #eef2f8; }
.nome-usuario { color: rgba(255,255,255,.86); font-size: 13px; white-space: nowrap; }
.menu-toggle { display: none; margin-left: auto; background: transparent; border: 1px solid rgba(255,255,255,.45); color: #fff; border-radius: 7px; padding: 7px 10px; font-size: 20px; }

.alerta { width: min(1280px, calc(100% - 40px)); margin: 18px auto; padding: 13px 16px; border-radius: 9px; background: #fff4e5; color: #8a3b12; border: 1px solid #fedf89; }
.alerta.sucesso { background: #ecfdf3; color: var(--success); border-color: #abefc6; }
.alerta.erro { background: #fef3f2; color: #b42318; border-color: #fecdca; }

.breaking { background: var(--accent); color: #fff; }
.breaking .container { min-height: 46px; display: flex; align-items: center; gap: 14px; }
.breaking-label { background: rgba(0,0,0,.18); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 800; text-transform: uppercase; }

.main-layout { display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 28px; padding: 28px 0; }
.content-area { min-width: 0; }

.hero { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; margin-bottom: 32px; }
.hero-main, .hero-side-card { position: relative; overflow: hidden; border-radius: var(--radius); background: #dbe3ef; box-shadow: var(--shadow); }
.hero-main { min-height: 410px; }
.hero-side { display: grid; gap: 18px; }
.hero-side-card { min-height: 196px; }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.overlay { position: absolute; inset: auto 0 0 0; padding: 28px; background: linear-gradient(transparent, rgba(0,0,0,.88)); color: #fff; }
.hero-side-card .overlay { padding: 18px; }
.hero h1 { font-size: clamp(24px, 3vw, 34px); line-height: 1.18; }
.hero h3 { font-size: 18px; line-height: 1.25; }

.tag { display: inline-block; background: var(--accent); color: #fff; border-radius: 5px; padding: 4px 9px; font-size: 11px; font-weight: 800; text-transform: uppercase; margin-bottom: 10px; }
.section-title { display: flex; justify-content: space-between; align-items: end; gap: 16px; border-bottom: 3px solid var(--primary); padding-bottom: 10px; margin-bottom: 20px; }
.section-title h1, .section-title h2 { color: var(--primary); }
.section-subtitle { color: var(--text-light); font-size: 14px; }

.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.news-card { background: #fff; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid #eef1f5; transition: transform .2s ease, box-shadow .2s ease; }
.news-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(11,34,83,.14); }
.news-card img { width: 100%; height: 185px; object-fit: cover; background: #e8edf5; }
.news-placeholder { height: 185px; display: grid; place-items: center; background: #e8edf5; color: var(--muted); font-weight: 700; }
.news-card-body { padding: 17px; }
.news-card h3 { color: var(--primary); font-size: 17px; line-height: 1.3; margin-bottom: 10px; }
.news-card h3 a:hover { color: var(--accent); }
.news-card p { color: var(--text-light); font-size: 14px; margin-bottom: 14px; }
.meta { color: var(--muted); font-size: 12px; border-top: 1px solid var(--border); padding-top: 11px; }
.empty-state { background: #fff; border: 1px dashed #cfd6e2; border-radius: var(--radius); padding: 35px; text-align: center; color: var(--text-light); }

.sidebar { min-width: 0; }
.sidebar-widget { position: sticky; top: 80px; background: #fff; border: 1px solid #eef1f5; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.widget-title { color: var(--primary); border-bottom: 3px solid var(--accent); padding-bottom: 10px; margin-bottom: 16px; }
.sidebar-list { list-style: none; display: grid; gap: 10px; }
.sidebar-list a { display: block; padding: 9px 10px; border-radius: 7px; background: #f8fafc; }
.sidebar-list a:hover { background: #eef3f9; color: var(--accent); }

.footer { background: var(--primary); color: rgba(255,255,255,.7); margin-top: 44px; }
.footer .container { min-height: 80px; display: grid; place-items: center; text-align: center; font-size: 13px; }

.modal-overlay { position: fixed; inset: 0; background: rgba(5,18,43,.72); display: none; place-items: center; z-index: 100; padding: 20px; }
.modal-overlay.active { display: grid; }
.modal-content { width: min(680px, 100%); max-height: 92vh; overflow: auto; background: #fff; border-radius: 14px; padding: 26px; box-shadow: 0 22px 70px rgba(0,0,0,.3); }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.close-btn { border: 0; background: transparent; font-size: 28px; color: var(--text-light); }

.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 700; color: var(--primary); }
.form-group input, .form-group textarea, .form-group select { width: 100%; border: 1px solid #cfd6e2; border-radius: 8px; padding: 11px 12px; outline: none; background: #fff; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(19,54,111,.08); }
.form-group textarea { min-height: 130px; resize: vertical; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { border: 0; border-radius: 8px; padding: 10px 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-light { background: #eef2f7; color: var(--primary); }
.btn-warning { background: #fff4e5; color: var(--warning); }
.btn-danger { background: #b42318; color: #fff; }
.btn:hover { filter: brightness(.96); }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top, #eef4ff, #f7f9fc 55%); }
.login-card { width: min(430px, 100%); background: #fff; border-radius: 18px; padding: 30px; box-shadow: 0 18px 55px rgba(11,34,83,.14); border: 1px solid #e8edf4; }
.login-logo { width: 195px; margin: 0 auto 10px; }
.login-card h1 { color: var(--primary); text-align: center; font-size: 24px; }
.login-card .helper { text-align: center; color: var(--text-light); font-size: 14px; margin: 5px 0 22px; }

.admin-page { padding: 28px 0 50px; }
.admin-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.admin-head h1 { color: var(--primary); }
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 24px; }
.admin-tabs a { background: #fff; border: 1px solid var(--border); padding: 9px 12px; border-radius: 8px; font-weight: 700; font-size: 13px; }
.admin-tabs a.active, .admin-tabs a:hover { background: var(--primary); color: #fff; }
.admin-search { display: grid; grid-template-columns: minmax(0, 1fr) 220px auto; gap: 10px; margin-bottom: 20px; }
.admin-search input, .admin-search select { border: 1px solid #cfd6e2; border-radius: 8px; padding: 10px 12px; background: #fff; }
.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--border); background: #fff; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 850px; }
.admin-table th, .admin-table td { padding: 13px 14px; text-align: left; border-bottom: 1px solid #edf0f4; vertical-align: top; }
.admin-table th { background: #f8fafc; color: var(--primary); font-size: 13px; }
.admin-table td { font-size: 14px; }
.actions { display: flex; gap: 7px; flex-wrap: wrap; }
.actions form { display: inline; }

.article-wrap { width: min(940px, calc(100% - 40px)); margin: 30px auto; }
.article-card { background: #fff; border-radius: 14px; padding: clamp(20px, 4vw, 38px); box-shadow: var(--shadow); }
.article-card h1 { color: var(--primary); font-size: clamp(28px, 4vw, 42px); line-height: 1.15; margin: 8px 0 14px; }
.article-resumo { color: var(--text-light); font-size: clamp(17px, 2vw, 20px); margin-bottom: 14px; }
.article-image { width: 100%; max-height: 560px; object-fit: cover; border-radius: 10px; margin: 22px 0; }
.article-content { font-size: 18px; line-height: 1.8; overflow-wrap: anywhere; }
.article-admin-actions { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 10px; }

.home-feature-panel { margin-top: 30px; padding: 20px; border: 1px solid #d8e2f0; border-radius: 12px; background: #f8fbff; }
.home-feature-panel h3 { color: var(--primary); margin-bottom: 5px; }
.home-feature-panel p { color: var(--text-light); font-size: 14px; margin-bottom: 12px; }
.home-feature-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.home-feature-actions form { display: inline-flex; }
.feature-current { display: inline-block; margin-bottom: 13px; padding: 5px 9px; border-radius: 999px; background: #e8f0ff; color: var(--primary); font-size: 12px; font-weight: 800; }
.article-alert { width: 100%; margin: 0 0 18px; }

@media (max-width: 1100px) {
    .main-layout { grid-template-columns: 1fr; }
    .sidebar-widget { position: static; }
    .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nav-item a { padding-left: 12px; padding-right: 12px; }
    .nome-usuario { display: none; }
}

@media (max-width: 820px) {
    .container { width: min(100% - 28px, 1280px); }
    .topbar .container { padding: 7px 0; flex-direction: column; justify-content: center; gap: 4px; }
    .topbar-date { text-align: center; }
    .header .container { min-height: auto; padding: 15px 0; flex-direction: column; gap: 12px; }
    .logo-img { width: 148px; height: 90px; }
    .search-form { width: 100%; flex-basis: auto; }
    .navbar .container { min-height: 56px; flex-wrap: wrap; padding: 6px 0; }
    .menu-toggle { display: block; }
    .nav-menu { display: none; width: 100%; order: 3; flex-direction: column; margin-top: 6px; border-top: 1px solid rgba(255,255,255,.15); }
    .nav-menu.open { display: flex; }
    .nav-item a { padding: 12px 10px; }
    .nav-right-actions { margin-left: 0; padding-left: 0; gap: 7px; }
    .hero { grid-template-columns: 1fr; }
    .hero-main { min-height: 340px; }
    .hero-side { grid-template-columns: 1fr 1fr; }
    .hero-side-card { min-height: 180px; }
    .admin-search { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .search-form { display: grid; grid-template-columns: 1fr auto; }
    .search-btn { padding: 10px 14px; }
    .nav-right-actions .admin-btn { font-size: 12px; padding: 7px 9px; }
    .hero-main { min-height: 290px; }
    .hero-side { grid-template-columns: 1fr; }
    .hero-side-card { min-height: 180px; }
    .overlay { padding: 20px; }
    .news-grid { grid-template-columns: 1fr; }
    .news-card img, .news-placeholder { height: 210px; }
    .section-title { align-items: flex-start; flex-direction: column; }
    .modal-content { padding: 20px 16px; }
    .form-actions .btn { flex: 1 1 100%; }
    .article-wrap { width: min(100% - 24px, 940px); margin: 16px auto; }
    .article-card { border-radius: 10px; }
    .article-content { font-size: 16px; }
}

/* ---------------------------------------------------------------
   Chat das notícias | Omega News
   --------------------------------------------------------------- */
.chat-panel { margin-top: 36px; border: 1px solid #dbe3ef; border-radius: 16px; overflow: hidden; background: #fff; }
.chat-head { background: linear-gradient(115deg, #0b2253 0%, #173d7a 100%); color: #fff; padding: 23px 25px; display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.chat-eyebrow { font-size: 10px; font-weight: 800; letter-spacing: .14em; opacity: .74; margin-bottom: 5px; }
.chat-head h2 { font-size: clamp(19px, 3vw, 24px); line-height: 1.24; font-weight: 800; }
.chat-description { font-size: 13px; color: #cbd9f5; margin-top: 7px; }
.chat-live-label { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.20); border-radius: 100px; font-size: 11px; font-weight: 800; letter-spacing: .04em; white-space: nowrap; }
.chat-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #55e8a1; box-shadow: 0 0 0 3px rgba(85,232,161,.18); }
.chat-stream-header { display: flex; justify-content: space-between; gap: 10px; padding: 10px 20px; border-bottom: 1px solid #e9edf3; background: #f8fafd; color: #667085; font-size: 11px; font-weight: 700; }
.chat-messages { height: 350px; overflow-y: auto; overscroll-behavior: contain; padding: 20px; display: flex; flex-direction: column; gap: 17px; scrollbar-color: #cbd5e1 #f7faff; }
.chat-empty { margin: auto; color: #667085; text-align: center; font-size: 14px; line-height: 1.7; padding: 18px; }
.chat-message { display: flex; align-items: flex-start; gap: 11px; }
.chat-avatar { flex: 0 0 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: #e8eef8; color: #1b477b; font-size: 14px; font-weight: 800; text-transform: uppercase; }
.chat-message-equipe .chat-avatar { background: #ffe5e7; color: #c71729; }
.chat-message-main { min-width: 0; flex: 1 1 0; }
.chat-message-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 19px; }
.chat-message-author { color: #102c58; font-size: 13px; overflow-wrap: anywhere; }
.chat-staff-badge { font-size: 9px; font-weight: 800; letter-spacing: .04em; color: #b91c32; background: #fff0f2; border: 1px solid #ffd6db; border-radius: 4px; padding: 1px 5px; }
.chat-message-time { font-size: 10px; color: #8792a4; }
.chat-message-text { color: #344054; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; padding-top: 3px; }
.chat-delete-button { background: transparent; color: #b42318; font-size: 11px; border: 0; padding: 2px 4px; margin-left: auto; }
.chat-delete-button:hover { text-decoration: underline; }
.chat-form { background: #f9fbfe; border-top: 1px solid #e4eaf2; padding: 19px 20px 15px; }
.chat-nickname-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 13px; }
.chat-nickname-field label, .chat-message-label { display: block; color: #344054; font-size: 12px; font-weight: 800; margin-bottom: 6px; }
.chat-nickname-field input, .chat-compose-row textarea { border: 1px solid #d0d9e7; background: white; padding: 10px 12px; color: #253044; border-radius: 9px; outline: none; }
.chat-nickname-field input { width: min(310px, 100%); font-size: 14px; }
.chat-nickname-field input:focus, .chat-compose-row textarea:focus { border-color: #5375ad; box-shadow: 0 0 0 3px rgba(19,54,111,.10); }
.chat-team-identity { font-size: 13px; color: #546179; margin-bottom: 12px; }
.chat-team-identity .chat-staff-badge { margin-left: 5px; }
.chat-compose-row { display: flex; gap: 10px; align-items: stretch; }
.chat-compose-row textarea { resize: vertical; flex: 1 1 0; min-height: 64px; max-height: 170px; font-size: 14px; line-height: 1.45; }
.chat-send-button { align-self: stretch; min-width: 105px; font-size: 13px; }
.chat-send-button:disabled { opacity: .6; cursor: not-allowed; }
.chat-form-footer { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 7px 15px; justify-content: space-between; align-items: start; }
.chat-rules { font-size: 11px; line-height: 1.6; color: #8993a4; max-width: 420px; }
.chat-feedback { font-size: 12px; color: #067647; font-weight: 700; }
.chat-feedback-error { color: #b42318; }
@media (max-width: 560px) {
    .chat-head { padding: 18px 15px; flex-direction: column-reverse; gap: 12px; }
    .chat-live-label { align-self: flex-start; }
    .chat-stream-header { padding: 10px 13px; }
    .chat-messages { height: 320px; padding: 14px 11px; gap: 16px; }
    .chat-form { padding: 15px 12px; }
    .chat-compose-row { flex-direction: column; }
    .chat-send-button { align-self: stretch; min-height: 42px; }
}
