/* ==========================================================================
   Rede Bravo — Folha de Estilos Principal
   Paleta: Navy #000080 | Laranja #F5703C | Fundo #F2F3F7
   Fonte: Inter (Google Fonts)
   ========================================================================== */

:root {
    --rb-navy:        #000080;
    --rb-navy-mid:    #0000a8;
    --rb-orange:      #F5703C;
    --rb-orange-dk:   #d45a25;
    --rb-bg:          #F2F3F7;
    --rb-sidebar-w:   230px;
    --rb-head-h:      64px;
    --rb-topbar-h:    44px;
    --rb-footer-h:    42px;
    --rb-font:        'Inter', system-ui, Arial, sans-serif;
    --rb-radius:      8px;
    --rb-shadow:      0 1px 3px rgba(0,0,0,.07), 0 4px 14px rgba(0,0,0,.07);
    --rb-t:           .18s ease;
}

/* --------------------------------------------------------------------------
   Reset / Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--rb-font);
    font-size: 14px;
    background: var(--rb-bg);
    color: #1C2B4A;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

div.row { margin-left: 0; margin-right: 0; }

/* ==========================================================================
   CABEÇALHO
   ========================================================================== */
#head {
    height: var(--rb-head-h);
    background: linear-gradient(135deg, var(--rb-navy) 0%, var(--rb-navy-mid) 100%);
    display: flex;
    align-items: center;
    padding: 0 22px;
    gap: 18px;
    box-shadow: 0 2px 10px rgba(0,0,128,.4);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    color: #fff;
}

/* Identidade: pill + títulos */
#head-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

#head-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--rb-orange);
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 5px 13px;
    border-radius: 7px;
    white-space: nowrap;
    flex-shrink: 0;
}
#head-pill i { font-size: .9rem; }

#head-titles {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
#head-t1 {
    font-size: .68rem;
    font-weight: 400;
    color: rgba(255,255,255,.6);
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#head-t2 {
    font-size: .8rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Logo direita */
#head-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
#head-logo img {
    height: 52px;
    width: 52px;
    object-fit: contain;
    border-radius: 50%;
    background: #fff;
    padding: 2px;
    box-shadow: 0 0 0 2px rgba(255,255,255,.25);
    transition: transform var(--rb-t);
}

/* Chip de usuário autenticado */
#head-user {
    display: flex;
    align-items: center;
    gap: 9px;
    background: rgba(255,255,255,.12);
    border-radius: 8px;
    padding: 6px 13px;
    flex-shrink: 0;
    cursor: pointer;
    transition: background var(--rb-t);
    text-decoration: none;
    color: #fff;
}
#head-user:hover { background: rgba(255,255,255,.2); text-decoration: none; color: #fff; }
#head-user .avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--rb-orange);
    color: #fff;
    font-weight: 700;
    font-size: .8rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
#head-user .user-name { font-size: .8rem; font-weight: 600; line-height: 1.2; }
#head-user .user-role { font-size: .68rem; color: rgba(255,255,255,.6); }

/* ==========================================================================
   BARRA DE NAVEGAÇÃO (Bootstrap navbar-expand-md)
   ========================================================================== */
#topbar.navbar {
    background: #fff;
    border-bottom: 3px solid var(--rb-orange);
    flex-shrink: 0;
    padding: 0 !important;
    min-height: var(--rb-topbar-h);
    border-radius: 0;
}

/* Hamburger toggler */
#topbar .navbar-toggler {
    border: none;
    color: var(--rb-navy);
    font-weight: 700;
    font-size: .88rem;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    outline: none !important;
    box-shadow: none !important;
}
#topbar .navbar-toggler i { font-size: 1.35rem; }
#topbar .navbar-toggler:hover { color: var(--rb-orange); }

/* Desktop: links horizontais */
#topbar .navbar-collapse.show,
#topbar .navbar-collapse.collapsing,
#topbar .navbar-collapse {
    flex-grow: 1;
}

.topbar-link {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px;
    color: var(--rb-navy);
    text-decoration: none;
    font-size: .81rem;
    font-weight: 600;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    margin-bottom: -3px;
    transition: background var(--rb-t), border-color var(--rb-t), color var(--rb-t);
}
.topbar-link i { font-size: .95rem; color: var(--rb-orange); flex-shrink: 0; }
.topbar-link:hover {
    background: rgba(245,112,60,.07);
    border-bottom-color: var(--rb-orange);
    color: var(--rb-orange);
    text-decoration: none;
}

/* Barra autenticada — welcome message */
#topbar .col-md-12 {
    color: var(--rb-navy);
    font-weight: 600;
    font-size: 13px;
    font-style: italic;
    padding: 8px 18px;
    display: flex;
    align-items: center;
}

/* ==========================================================================
   CORPO PÚBLICO = SIDEBAR LATERAL + MAIN
   ========================================================================== */
#page-body {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: visible;
    padding-bottom: var(--rb-footer-h);
}

/* Sidebar pública */
#pub-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: var(--rb-navy);
    overflow-y: auto;
    overflow-x: hidden;
}
#pub-sidebar.hidden { display: none; }
#pub-sidebar-inner { padding: 14px 0 14px; }

#pub-sidebar::-webkit-scrollbar { width: 4px; }
#pub-sidebar::-webkit-scrollbar-track { background: transparent; }
#pub-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 4px; }

.pub-side-section { padding: 0 10px; }

.pub-side-title {
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255,255,255,.45);
    padding: 0 6px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.pub-side-title i { font-size: .85rem; }

.pub-side-list { display: flex; flex-direction: column; gap: 1px; }

.pub-side-header {
    font-size: .65rem !important;
    font-weight: 700 !important;
    color: rgba(255,255,255,.4) !important;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-bottom: 1px solid rgba(255,255,255,.1);
    padding-bottom: 5px;
    margin-bottom: 2px;
}

.pub-side-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 6px;
    font-size: .71rem;
    color: rgba(255,255,255,.78);
    border-bottom: 1px solid rgba(255,255,255,.04);
}
.pub-side-count {
    font-weight: 700;
    color: rgba(255,255,255,.92);
    min-width: 22px;
    text-align: right;
}
.pub-side-total {
    margin-top: 6px;
    background: rgba(245,112,60,.28);
    border-radius: 6px;
    padding: 6px 8px;
    font-weight: 800;
    font-size: .75rem !important;
    color: #fff !important;
    border-bottom: none;
}
.pub-side-empty {
    font-size: .72rem;
    color: rgba(255,255,255,.35);
    font-style: italic;
    padding: 0 6px;
    margin: 0;
}

/* Main content */
#main-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 22px;
}

/* ==========================================================================
   RODAPÉ FIXO
   ========================================================================== */
#rodape {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--rb-footer-h);
    background: #2d2d3a;
    border-top: 2px solid var(--rb-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
    padding: 0 20px;
}
#rodape-copy {
    font-size: 11.5px;
    font-weight: 500;
    color: rgba(255,255,255,.6);
    letter-spacing: .02em;
}

/* ==========================================================================
   ÁREA AUTENTICADA — SIDEBAR RETRÁTIL
   ========================================================================== */
#sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--rb-sidebar-w);
    height: 100vh;
    background: #1B2A4A;
    display: flex;
    flex-direction: column;
    z-index: 1040;
    transition: width var(--rb-t), transform var(--rb-t);
    overflow: hidden;
    box-shadow: 2px 0 10px rgba(0,0,0,.18);
}

body.no-sidebar #sidebar, body.has-pub-sidebar #sidebar { width: 0; min-width: 0; box-shadow: none; }

/* Sidebar colapsada: ícones visíveis, texto oculto */
body.sidebar-collapsed #sidebar { width: 56px; }
body.sidebar-collapsed #sidebar-brand { display: none; }
body.sidebar-collapsed #sidebar-header { justify-content: center; padding: 14px 0; }
body.sidebar-collapsed div.menu a.barra span { display: none; }
body.sidebar-collapsed div.menu a.barra {
    justify-content: center;
    padding: 12px 0;
    border-left: none;
    gap: 0;
    position: relative;
}
body.sidebar-collapsed div.menu a.barra i {
    font-size: 18px;
    opacity: 1;
    width: auto;
}
/* Tooltip CSS ao passar o mouse no modo colapsado */
body.sidebar-collapsed div.menu a.barra::after {
    content: attr(title);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: #1B2A4A;
    color: #fff;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s;
    margin-left: 8px;
    z-index: 1050;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
body.sidebar-collapsed div.menu a.barra:hover::after { opacity: 1; }

@media (max-width: 767px) {
    #sidebar { transform: translateX(-100%); width: var(--rb-sidebar-w) !important; }
    body.sidebar-open #sidebar { transform: translateX(0); }
}

#sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 12px;
    background: rgba(0,0,0,.18);
    border-bottom: 1px solid rgba(255,255,255,.1);
    flex-shrink: 0;
    min-height: 56px;
}
#sidebar-brand {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 700; color: #fff;
    white-space: nowrap; letter-spacing: .4px;
}
#sidebar-brand i { font-size: 18px; }

#sidebar-toggle {
    background: rgba(255,255,255,.12);
    border: none; color: #fff;
    width: 34px; height: 34px;
    border-radius: 6px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: background var(--rb-t);
}
#sidebar-toggle:hover { background: rgba(255,255,255,.22); }
#sidebar-toggle i { font-size: 18px; }

#sidebar-nav {
    flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px 0;
}
#sidebar-nav::-webkit-scrollbar { width: 4px; }
#sidebar-nav::-webkit-scrollbar-track { background: transparent; }
#sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 4px; }

div.menu { border-bottom: 1px solid rgba(255,255,255,.08); }

div.menu a.barra, #sidebar-nav a.barra {
    display: flex; align-items: center;
    gap: 10px;
    padding: 10px 18px;
    color: rgba(255,255,255,.88) !important;
    background: transparent !important;
    font-size: 13px; font-weight: 500;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background var(--rb-t), padding-left var(--rb-t);
    border-left: 3px solid transparent;
    width: 100%;
}
div.menu a.barra i, #sidebar-nav a.barra i {
    font-size: 15px;
    color: var(--rb-orange);
    width: 18px;
    text-align: center;
    flex-shrink: 0;
    opacity: .75;
    transition: opacity var(--rb-t);
}
div.menu a.barra:hover, #sidebar-nav a.barra:hover {
    background: rgba(255,255,255,.1) !important;
    color: #fff !important;
    border-left-color: var(--rb-orange);
    padding-left: 22px;
}
div.menu a.barra:hover i, #sidebar-nav a.barra:hover i { opacity: 1; }

a.barra2:link, a.barra2:visited {
    text-decoration: none; color: #fff;
    background: var(--rb-orange);
    height: 100%; width: 100%; display: block;
}
a.barra2:hover, a.barra2:active {
    text-decoration: none; background: var(--rb-navy); color: var(--rb-orange);
}

#sidebar-backdrop {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.45); z-index: 1039;
}
body.sidebar-open #sidebar-backdrop { display: block; }

/* Page-wrap (autenticado) */
#page-wrap {
    margin-left: var(--rb-sidebar-w);
    display: flex; flex-direction: column;
    min-height: 100vh;
    transition: margin-left var(--rb-t);
    padding-bottom: var(--rb-footer-h);
}
body.no-sidebar #page-wrap, body.has-pub-sidebar #page-wrap { margin-left: 0; }
body.sidebar-collapsed #page-wrap { margin-left: 56px; }
@media (max-width: 767px) { #page-wrap { margin-left: 0 !important; } }

#mobile-toggle {
    background: rgba(0,0,0,.12); border: none; color: inherit;
    width: 38px; height: 38px; border-radius: 6px; cursor: pointer;
    display: none; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 20px;
}
@media (max-width: 767px) { #mobile-toggle { display: flex; } }

/* Topbar autenticada */
#topbar.topbar-auth.navbar {
    background: #fff;
    border-bottom: 3px solid var(--rb-orange);
}
#topbar.topbar-auth .col-md-12 {
    color: var(--rb-navy);
    font-style: italic;
}

/* ==========================================================================
   FORMULÁRIOS
   ========================================================================== */
div#formulario {
    background: #fff;
    border-radius: var(--rb-radius);
    padding: 20px;
    box-shadow: var(--rb-shadow);
    font-size: 13px;
}
div#formulario input, div#formulario select,
div#formulario option, div#formulario textarea { font-size: 13px; }

.form-control:focus {
    border-color: var(--rb-navy);
    box-shadow: 0 0 0 .2rem rgba(0,0,128,.15);
}
.btn-primary { background: var(--rb-navy); border-color: var(--rb-navy); }
.btn-primary:hover, .btn-primary:focus { background: #0000a8; border-color: #0000a8; }

/* ==========================================================================
   TABELAS
   ========================================================================== */
.rb-table-wrap {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    max-width: 100%;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    background: #fff;
}
#main-content table {
    font-size: 11px; border-collapse: collapse; width: 100%; background: #fff;
}
#main-content table thead tr {
    background: #e8eaf0 !important; font-weight: 600; color: var(--rb-navy);
}
#main-content table tr:nth-child(even):not(thead tr) { background: #f9f9fc; }
#main-content table td, #main-content table th {
    padding: 5px 7px; border: 1px solid #dee2e6; vertical-align: middle;
}

/* ==========================================================================
   ALERTAS / UTILITÁRIOS
   ========================================================================== */
.alert { font-size: 13px; border-radius: var(--rb-radius); }
h3, h4 { color: var(--rb-navy); font-weight: 700; }
h4 { text-align: center; }
.gap-2 { gap: 8px !important; }

.badge-success   { background: #28a745; color: #fff; }
.badge-danger    { background: #dc3545; color: #fff; }
.badge-warning   { background: #ffc107; color: #212529; }
.badge-secondary { background: #6c757d; color: #fff; }
.badge-light     { background: #f8f9fa; color: #495057; border: 1px solid #dee2e6; }

/* ==========================================================================
   CARDS DO CALENDÁRIO
   ========================================================================== */
.rb-month-header {
    background: var(--rb-navy); color: #fff;
    padding: 8px 14px; border-radius: var(--rb-radius);
    font-weight: 700; font-size: 13px; letter-spacing: .5px;
    margin: 16px 0 8px;
    display: flex; align-items: center; gap: 8px;
}
.rb-course-card {
    background: #fff;
    border: 1px solid #e0e4f0;
    border-left: 4px solid var(--rb-orange);
    border-radius: var(--rb-radius);
    margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    overflow: hidden;
    transition: box-shadow var(--rb-t);
}
.rb-course-card:hover { box-shadow: 0 3px 12px rgba(0,0,128,.12); }
.rb-course-title {
    background: #f0f2fb; padding: 8px 14px;
    font-weight: 700; font-size: 13px; color: var(--rb-navy);
    border-bottom: 1px solid #e0e4f0;
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.rb-course-info { padding: 10px 14px; font-size: 12px; line-height: 1.8; color: #444; }
.rb-course-info div { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.rb-course-info i { color: var(--rb-navy); flex-shrink: 0; margin-top: 2px; }
.rb-course-actions {
    padding: 8px 14px; background: #f8f9fc;
    border-top: 1px solid #e0e4f0;
    display: flex; gap: 8px; flex-wrap: wrap;
}

/* ==========================================================================
   HOME — CARDS DE ACESSO RÁPIDO
   ========================================================================== */
.home-wrap { max-width: 860px; margin: 0 auto; }

.home-hero {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #fff;
    border-radius: var(--rb-radius);
    padding: 18px 20px;
    margin-bottom: 22px;
    box-shadow: var(--rb-shadow);
    border-left: 4px solid var(--rb-orange);
}
.home-hero-icon { font-size: 2.2rem; color: var(--rb-orange); flex-shrink: 0; line-height: 1; margin-top: 2px; }
.home-hero-title { font-size: 1.1rem; font-weight: 800; color: var(--rb-navy); margin: 0 0 6px; }
.home-hero-sub { font-size: .85rem; color: #555; line-height: 1.65; margin: 0; }

.home-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.home-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 14px 16px;
    border-radius: var(--rb-radius);
    background: #fff;
    box-shadow: var(--rb-shadow);
    text-decoration: none !important;
    transition: transform var(--rb-t), box-shadow var(--rb-t);
    border-top: 3px solid transparent;
}
.home-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,128,.16);
    text-decoration: none !important;
}
.home-card-navy   { border-top-color: var(--rb-navy); }
.home-card-orange { border-top-color: var(--rb-orange); }

.home-card-icon { font-size: 2rem; margin-bottom: 10px; }
.home-card-navy  .home-card-icon { color: var(--rb-navy); }
.home-card-orange .home-card-icon { color: var(--rb-orange); }

.home-card-label { font-size: .88rem; font-weight: 700; color: var(--rb-navy); margin-bottom: 5px; }
.home-card-desc  { font-size: .74rem; color: #888; line-height: 1.4; }

.home-stat-bar {
    display: flex; align-items: center; gap: 10px;
    background: #f0f4ff;
    border-left: 3px solid var(--rb-navy);
    border-radius: var(--rb-radius);
    padding: 10px 14px;
    font-size: .84rem; color: #333;
}
.home-stat-bar i { color: var(--rb-navy); font-size: 1.1rem; flex-shrink: 0; }

/* ==========================================================================
   CAPTCHA
   ========================================================================== */
.captcha { display: flex; align-items: center; gap: 8px; }
.captcha span { display: flex; }
.captcha img { border-radius: 6px; }
.captcha .btn { padding: 4px 10px; font-size: 16px; }

/* ==========================================================================
   ÍCONES DE AÇÃO NAS TABELAS
   ========================================================================== */
.rb-icon-action {
    font-size: 1.05rem;
    transition: transform .15s, opacity .15s;
    cursor: pointer;
    vertical-align: middle;
}
a .rb-icon-action:hover,
a:hover .rb-icon-action { transform: scale(1.25); opacity: .85; }

/* Ícones de exportação */
.bi-file-earmark-spreadsheet-fill,
.bi-file-earmark-pdf-fill {
    font-size: 1.05rem;
    vertical-align: middle;
    transition: transform .15s;
}
a:hover .bi-file-earmark-spreadsheet-fill,
a:hover .bi-file-earmark-pdf-fill { transform: scale(1.2); }

/* ==========================================================================
   COMBO INSTITUIÇÃO — seções coloridas
   ========================================================================== */
.rounded.form-group[style*="rgba(246"] {
    background-color: rgba(245,112,60,.08) !important;
    border: 1px solid rgba(245,112,60,.2);
    border-radius: var(--rb-radius) !important;
}
.rounded.form-group[style*="2905f"] {
    background-color: rgba(0,0,128,.05) !important;
    border: 1px solid rgba(0,0,128,.15);
    border-radius: var(--rb-radius) !important;
}
.rounded.form-group[style*="fcc80"] {
    background-color: rgba(252,200,10,.08) !important;
    border: 1px solid rgba(252,200,10,.3);
    border-radius: var(--rb-radius) !important;
}

/* ==========================================================================
   RESPONSIVIDADE
   ========================================================================== */

/* ---------- Notebooks pequenos (≤ 1199px) ---------- */
@media (max-width: 1199px) {
    :root { --rb-sidebar-w: 200px; }
    .home-wrap { max-width: 100%; }
}

/* ---------- Tablets landscape / notebooks compactos (≤ 991px) ---------- */
@media (max-width: 991px) {
    :root { --rb-head-h: 56px; }
    .home-cards { grid-template-columns: repeat(2, 1fr); }
    #head-t1 { display: none; }
    .topbar-link { font-size: .76rem; padding: 0 8px; gap: 5px; }
}

/* ---------- Tablets portrait / mobile grande (≤ 767px) ---------- */
@media (max-width: 767px) {
    :root {
        --rb-head-h: 52px;
        --rb-topbar-h: 46px;
        --rb-footer-h: 38px;
    }

    #head { padding: 0 12px; gap: 10px; }
    #head-logo { display: none; }
    #head-t1 { display: none; }
    #head-t2 { font-size: .72rem; }

    /* Topbar — collapse ativo (< md) */
    .topbar-link {
        flex: none;
        justify-content: flex-start;
        padding: 12px 20px;
        font-size: .88rem;
        border-bottom: 1px solid #f0f2f8;
        margin-bottom: 0;
        border-left: 3px solid transparent;
    }
    .topbar-link:hover {
        border-left-color: var(--rb-orange);
        border-bottom-color: #f0f2f8;
        padding-left: 24px;
    }
    .topbar-link:last-child { border-bottom: none; }

    #page-body { flex-direction: column; }

    /* Sidebar pública vira faixa horizontal */
    #pub-sidebar { width: 100%; max-height: 180px; overflow-x: auto; overflow-y: hidden; }
    #pub-sidebar-inner { padding: 8px 12px; }
    .pub-side-section { padding: 0; }
    .pub-side-title { padding-bottom: 4px; }
    .pub-side-list { flex-direction: row; flex-wrap: wrap; gap: 4px; }
    .pub-side-row {
        width: auto; border-bottom: none;
        background: rgba(255,255,255,.1);
        border-radius: 4px; padding: 3px 9px;
    }
    .pub-side-header { display: none; }
    .pub-side-total { margin-top: 0; }

    #main-content { padding: 14px 12px; }

    .home-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
    .home-hero { flex-direction: column; gap: 10px; }
    .home-hero-icon { font-size: 1.6rem; }
    .home-hero-title { font-size: .95rem; }

    #rodape-copy { font-size: 10.5px; text-align: center; }
    #page-wrap { margin-left: 0 !important; }
}

/* ---------- Mobile pequeno (≤ 480px) ---------- */
@media (max-width: 480px) {
    :root { --rb-head-h: 48px; }
    #head-pill { font-size: .62rem; padding: 4px 9px; }
    #head-t2 { font-size: .67rem; }
    .home-cards { grid-template-columns: 1fr; gap: 8px; }
    .home-card { padding: 14px 12px 12px; }
    .home-card-icon { font-size: 1.5rem; margin-bottom: 7px; }
    #main-content { padding: 10px 9px; }
}

/* ---------- Mobile muito pequeno (≤ 360px) ---------- */
@media (max-width: 360px) {
    #head-pill span { display: none; }
    #head-t2 { font-size: .63rem; }
}
