/* Typography cross-platform reset applied */
@import url('/css/typography-reset.css');

/* ============================================================================
   LAYOUT.CSS — Mentoria de Resultado
   Header, sidebar, navegação global
   Design: Apple-inspired, Inter/SF Pro, glassmorphism
   ============================================================================ */

/* ----------------------------------------------------------------------------
   CSS Variables (complementares às do tema das páginas)
   ---------------------------------------------------------------------------- */
:root {
    --layout-header-height: 64px;
    --layout-sidebar-width: 280px;
    --layout-sidebar-collapsed: 72px;
    --layout-z-header: 900;
    --layout-z-sidebar: 1100;
    --layout-z-overlay: 1000;
    --layout-transition: 300ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --layout-primary: #0071E3;
    --layout-primary-dark: #0051A8;
    --layout-text: #1D1D1F;
    --layout-text-secondary: #86868B;
    --layout-text-tertiary: #AEAEB2;
    --layout-bg: #F5F5F7;
    --layout-surface: rgba(255, 255, 255, 0.72);
    --layout-surface-solid: #FFFFFF;
    --layout-border: rgba(0, 0, 0, 0.06);
    --layout-glass: rgba(255, 255, 255, 0.65);
    --layout-glass-border: rgba(255, 255, 255, 0.25);
}

/* ----------------------------------------------------------------------------
   Reset para layout
   ----------------------------------------------------------------------------
   IMPORTANTE: o header tem position:fixed com altura 64px. Sem padding-top,
   o conteudo da pagina fica escondido embaixo. Aplicamos automaticamente
   via .mr-layout-injected no body — assim qualquer pagina que carrega
   layout.js ganha o espaco automaticamente, sem precisar editar cada HTML.
   Paginas que ja tem padding-top manual sao cobertas porque usamos apenas
   a diferenca restante. */
body.mr-layout-injected {
    margin: 0;
    padding-top: var(--layout-header-height);
}
/* Se a pagina ja define padding-top no body via :root style, nao dobrar.
   Truque: aplicamos um wrapper interno se existir. */
body.mr-layout-injected.mr-no-header-offset {
    padding-top: 0;
}

/* ----------------------------------------------------------------------------
   Header
   ---------------------------------------------------------------------------- */
.mr-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--layout-header-height);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--layout-border);
    z-index: var(--layout-z-header);
    display: flex;
    align-items: center;
    padding: 0 24px;
    transition: var(--layout-transition);
}

.mr-header-inner {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 100%;
    gap: 16px;
}

/* Botão hamburger */
.mr-header-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: background 200ms ease;
    flex-shrink: 0;
    padding: 0;
}

.mr-header-toggle:hover {
    background: rgba(0, 0, 0, 0.04);
}

.mr-header-toggle svg {
    width: 20px;
    height: 20px;
    stroke: var(--layout-text);
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Logo / Brand */
.mr-header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.mr-header-logo {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--layout-primary) 0%, var(--layout-primary-dark) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.25);
}

.mr-header-logo svg {
    width: 18px;
    height: 18px;
    stroke: #FFFFFF;
    stroke-width: 2;
    fill: none;
}

.mr-header-brand-text {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--layout-text);
}

/* ----------------------------------------------------------------------------
   Quick access pills — atalhos ao lado da brand (desktop only)
   RESULT IA, L.AI SECA, Caderno — abrem em novas abas
   ---------------------------------------------------------------------------- */
.mr-header-quick {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 14px;
    padding-left: 14px;
    border-left: 1px solid rgba(0, 0, 0, 0.08);
}

.mr-quick-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px 7px 10px;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--layout-text);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 100px;
    text-decoration: none;
    transition: all 180ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    white-space: nowrap;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.mr-quick-pill svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    transition: transform 200ms ease;
}

.mr-quick-pill:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 0, 0, 0.14);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.mr-quick-pill:hover svg {
    transform: scale(1.1) rotate(-4deg);
}
.mr-quick-pill:active {
    transform: translateY(0);
}

/* Cores tematicas discretas, ativadas no hover */
.mr-quick-pill.mr-quick-result svg { color: #8B5CF6; }
.mr-quick-pill.mr-quick-result:hover {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.18);
}

.mr-quick-pill.mr-quick-laiseca svg { color: #1a1a2e; }
.mr-quick-pill.mr-quick-laiseca:hover {
    border-color: rgba(26, 26, 46, 0.25);
    box-shadow: 0 4px 12px rgba(26, 26, 46, 0.18);
}

.mr-quick-pill.mr-quick-caderno svg { color: #0071E3; }
.mr-quick-pill.mr-quick-caderno:hover {
    border-color: rgba(0, 113, 227, 0.28);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.18);
}

/* Mobile: esconder por completo. A brand ja some do header em <768px, e
   os atalhos ficam disponiveis no sidebar lateral pelo menu hamburger. */
@media (max-width: 900px) {
    .mr-header-quick { display: none; }
}

/* Notebooks estreitos (1024-1200px): esconder os textos, manter so icones */
@media (max-width: 1200px) and (min-width: 901px) {
    .mr-quick-pill {
        padding: 8px;
        width: 34px;
        height: 34px;
        justify-content: center;
    }
    .mr-quick-pill span { display: none; }
    .mr-quick-pill svg { width: 15px; height: 15px; }
}

/* Spacer */
.mr-header-spacer {
    flex: 1;
}

/* Online counter */
.mr-header-online {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(48, 209, 88, 0.08);
    border-radius: 100px;
    border: 1px solid rgba(48, 209, 88, 0.15);
    flex-shrink: 0;
}

.mr-header-online-dot {
    width: 7px;
    height: 7px;
    background: #30D158;
    border-radius: 50%;
    animation: mr-pulse 2.5s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes mr-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.mr-header-online-text {
    font-size: 12px;
    font-weight: 500;
    color: var(--layout-text-secondary);
    white-space: nowrap;
    max-width: 460px;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 1280px) {
    .mr-header-online-text {
        max-width: 340px;
    }
}

@media (max-width: 1024px) {
    .mr-header-online-text {
        max-width: 240px;
    }
}

/* Level badge */
.mr-header-level {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 8px;
    background: var(--layout-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 100px;
    border: 1px solid var(--layout-glass-border);
    cursor: pointer;
    transition: all 200ms ease;
    flex-shrink: 0;
    text-decoration: none;
}

.mr-header-level:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 113, 227, 0.2);
}

.mr-header-level-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--layout-primary) 0%, #5856D6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    flex-shrink: 0;
}

.mr-header-level-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mr-header-level-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--layout-text-tertiary);
    line-height: 1;
}

.mr-header-level-bar {
    width: 48px;
    height: 3px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 100px;
    overflow: hidden;
}

.mr-header-level-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--layout-primary), #5856D6);
    border-radius: 100px;
    transition: width 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Agenda badge */
.mr-header-agenda {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    transition: background 200ms ease;
    flex-shrink: 0;
    padding: 0;
    text-decoration: none;
}

.mr-header-agenda:hover {
    background: rgba(0, 0, 0, 0.04);
}

.mr-header-agenda svg {
    width: 20px;
    height: 20px;
    stroke: var(--layout-text-secondary);
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mr-header-agenda-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--layout-surface-solid);
    display: none;
}

.mr-header-agenda-badge.has-agenda {
    display: block;
    background: #30D158;
}

.mr-header-agenda-badge.no-agenda {
    display: block;
    background: #FF9F0A;
}

.mr-header-agenda-badge.rest-day {
    display: block;
    background: var(--layout-text-tertiary);
}

/* Chat badge — mais destacado com pulse */
.mr-chat-badge {
    width: auto !important;
    height: 20px !important;
    min-width: 20px;
    border-radius: 10px !important;
    background: #FF3B30 !important;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.5);
    animation: chatBadgePulse 2s infinite;
}

@keyframes chatBadgePulse {
    0%   { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.5); }
    70%  { box-shadow: 0 0 0 8px rgba(255, 59, 48, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); }
    border: 2px solid var(--layout-surface-solid) !important;
    top: 2px !important;
    right: 0px !important;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1;
    box-shadow: 0 1px 4px rgba(255, 59, 48, 0.3);
}

/* ----------------------------------------------------------------------------
   Sidebar Overlay (mobile)
   ---------------------------------------------------------------------------- */
.mr-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: var(--layout-z-overlay);
    opacity: 0;
    visibility: hidden;
    transition: all 250ms ease;
}

.mr-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ----------------------------------------------------------------------------
   Sidebar
   ---------------------------------------------------------------------------- */
.mr-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--layout-sidebar-width);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border-right: 1px solid var(--layout-border);
    z-index: var(--layout-z-sidebar);
    transform: translateX(-100%);
    transition: transform var(--layout-transition);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mr-sidebar.open {
    transform: translateX(0);
}

/* Sidebar header */
.mr-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    height: var(--layout-header-height);
    border-bottom: 1px solid var(--layout-border);
    flex-shrink: 0;
}

.mr-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.mr-sidebar-brand-logo {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--layout-primary) 0%, var(--layout-primary-dark) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.25);
}

.mr-sidebar-brand-logo svg {
    width: 18px;
    height: 18px;
    stroke: #FFFFFF;
    stroke-width: 2;
    fill: none;
}

.mr-sidebar-brand-text {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--layout-text);
}

.mr-sidebar-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: background 200ms ease;
    padding: 0;
}

.mr-sidebar-close:hover {
    background: rgba(0, 0, 0, 0.06);
}

.mr-sidebar-close svg {
    width: 18px;
    height: 18px;
    stroke: var(--layout-text-secondary);
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Sidebar nav */
.mr-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.08) transparent;
}

.mr-sidebar-nav::-webkit-scrollbar {
    width: 5px;
}

.mr-sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.mr-sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 3px;
}

/* Section label */
.mr-nav-section {
    padding: 20px 12px 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--layout-text-tertiary);
}

.mr-nav-section:first-child {
    padding-top: 4px;
}

/* Nav item */
.mr-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--layout-text-secondary);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.01em;
    transition: all 150ms ease;
    position: relative;
    margin-bottom: 2px;
}

.mr-nav-item:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--layout-text);
}

.mr-nav-item.active {
    background: rgba(0, 113, 227, 0.08);
    color: var(--layout-primary);
    font-weight: 600;
}

.mr-nav-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 200ms ease;
}

.mr-nav-item-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mr-nav-item.active .mr-nav-item-icon {
    background: rgba(0, 113, 227, 0.1);
}

.mr-nav-item-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mr-nav-item-badge {
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}

.mr-nav-item-badge.new {
    background: rgba(0, 113, 227, 0.1);
    color: var(--layout-primary);
}

.mr-nav-item-badge.count {
    background: rgba(255, 55, 95, 0.1);
    color: #FF375F;
}

.mr-nav-item-external::after {
    content: '';
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23AEAEB2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 150ms ease;
}

.mr-nav-item-external:hover::after {
    opacity: 1;
}

/* Nav divider */
.mr-nav-divider {
    height: 1px;
    margin: 8px 12px;
    background: var(--layout-border);
}

/* Sidebar footer */
.mr-sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--layout-border);
    flex-shrink: 0;
}

.mr-sidebar-footer-text {
    font-size: 11px;
    color: var(--layout-text-tertiary);
    text-align: center;
}

/* ----------------------------------------------------------------------------
   User Profile (header)
   ---------------------------------------------------------------------------- */
.mr-header-user {
    position: relative;
    display: flex;
    align-items: center;
}
.mr-header-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    border: none;
    background: transparent;
    border-radius: 980px;
    cursor: pointer;
    transition: background 200ms ease;
    font-family: inherit;
    color: var(--layout-text);
}
.mr-header-user-btn:hover {
    background: rgba(0, 0, 0, 0.04);
}
.mr-header-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--layout-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.mr-header-avatar span {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}
.mr-header-user-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--layout-text);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mr-header-user-btn svg {
    color: var(--layout-text-secondary);
    flex-shrink: 0;
    transition: transform 200ms ease;
}
.mr-header-user-dropdown.open + .mr-header-user-btn svg,
.mr-header-user-btn:has(+ .mr-header-user-dropdown.open) svg {
    transform: rotate(180deg);
}

/* Dropdown */
.mr-header-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px) scale(0.98);
    transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 2000;
    overflow: hidden;
}
.mr-header-user-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.mr-user-dropdown-header {
    padding: 14px 16px 12px;
}
.mr-user-dropdown-name {
    font-size: 14px;
    font-weight: 600;
    color: #1D1D1F;
    margin-bottom: 2px;
}
.mr-user-dropdown-email {
    font-size: 12px;
    color: #86868B;
}
.mr-user-dropdown-sep {
    height: 1px;
    background: rgba(0, 0, 0, 0.06);
    margin: 0 12px;
}
.mr-user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #1D1D1F;
    text-decoration: none;
    transition: background 150ms ease;
}
.mr-user-dropdown-item:hover {
    background: rgba(0, 0, 0, 0.03);
}
.mr-user-dropdown-item svg {
    width: 16px;
    height: 16px;
    stroke: #86868B;
    stroke-width: 2;
    fill: none;
    flex-shrink: 0;
}
.mr-user-dropdown-logout {
    color: #FF3B30;
}
.mr-user-dropdown-logout svg {
    stroke: #FF3B30;
}

@media (max-width: 768px) {
    .mr-header-user-name {
        display: none;
    }
    .mr-header-user-btn svg:last-child {
        display: none;
    }
}

/* ----------------------------------------------------------------------------
   Header Major (sub-header com widgets)
   ---------------------------------------------------------------------------- */
.mr-header-major {
    position: fixed;
    top: var(--layout-header-height);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--layout-border);
    z-index: calc(var(--layout-z-header) - 1);
    padding: 0 24px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 300ms ease,
                padding 400ms ease;
}

.mr-header-major.visible {
    max-height: 80px;
    opacity: 1;
    padding: 12px 24px;
}

.mr-header-major-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.mr-header-major-inner::-webkit-scrollbar {
    display: none;
}

.mr-major-widget {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 200ms ease;
}

.mr-major-widget:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.mr-major-widget-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mr-major-widget-icon svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mr-major-widget-icon.concursos {
    background: rgba(16, 185, 129, 0.1);
}

.mr-major-widget-icon.concursos svg {
    stroke: #10B981;
}

.mr-major-widget-icon.simulados {
    background: rgba(244, 63, 94, 0.1);
}

.mr-major-widget-icon.simulados svg {
    stroke: #F43F5E;
}

.mr-major-widget-icon.recuperacao {
    background: rgba(99, 102, 241, 0.1);
}

.mr-major-widget-icon.recuperacao svg {
    stroke: #6366F1;
}

.mr-major-widget-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.mr-major-widget-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--layout-text-tertiary);
}

.mr-major-widget-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--layout-text);
    letter-spacing: -0.01em;
}

/* ----------------------------------------------------------------------------
   Page content offset
   IMPORTANTE: o padding-top de 64px vem do body.mr-layout-injected (acima).
   Nao duplicar aqui — antes, esta regra adicionava mais 64px no <main>, o
   que criava um gap vazio de 128px entre o header global e o conteudo das
   paginas (Leonardo reportou no caderno). O with-major adiciona apenas o
   offset do widget major (56px), nao o header base.
   ---------------------------------------------------------------------------- */
.mr-page-content {
    min-height: 100vh;
    transition: padding-top 300ms ease;
}

.mr-page-content.with-major {
    padding-top: 56px;
}

/* ----------------------------------------------------------------------------
   Responsive
   ---------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .mr-header {
        padding: 0 16px;
    }

    .mr-header-brand-text {
        display: none;
    }

    .mr-header-online-text {
        max-width: 140px;
        font-size: 11px;
    }

    .mr-header-level-info {
        display: none;
    }

    .mr-header-level {
        padding: 6px;
        border-radius: 50%;
    }

    .mr-header-major.visible {
        padding: 8px 16px;
    }

    .mr-major-widget {
        padding: 6px 12px;
    }

    .mr-major-widget-label {
        display: none;
    }
}

@media (max-width: 480px) {
    .mr-header-online {
        display: none;
    }
}

/* ----------------------------------------------------------------------------
   Animações
   ---------------------------------------------------------------------------- */
@keyframes mr-fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.mr-header {
    animation: mr-fadeIn 400ms ease forwards;
}
