/* Paleta de Cores Bambu Invest:
   #000000 - Preto
   #0F3827 - Verde escuro
   #266244 - Verde mais claro
   #797B77 - Cinza escuro
   #646465 - Cinza 2
   #F7F5F0 - Fundo do site
*/

:root {
    --bambu-black: #000000;
    --bambu-dark-green: #0F3827;
    --bambu-light-green: #266244;
    --bambu-gray-dark: #797B77;
    --bambu-gray-2: #646465;
    --bambu-bg: #F7F5F0;
    --bambu-white: #ffffff;
    --bambu-border: #e3dfd5;
    --bambu-radius: 8px;
}

body.bambu-academy-body {
    background-color: var(--bambu-bg);
}

.bambu-portal-wrap, .bambu-player-container, .bambu-access-box {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--bambu-black);
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
    box-sizing: border-box;
}

/* HEADER DO PORTAL */
.bambu-portal-header {
    background: var(--bambu-white);
    border: 1px solid var(--bambu-border);
    border-radius: var(--bambu-radius);
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(15, 56, 39, 0.04);
}

.bambu-portal-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.bambu-avatar img {
    border-radius: 50%;
    border: 3px solid var(--bambu-light-green);
    display: block;
}

.bambu-user-info h2 {
    margin: 0 0 6px 0;
    font-size: 22px;
    color: var(--bambu-dark-green);
    font-weight: 700;
}

.bambu-badge-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bambu-user-meta-text {
    font-size: 13px;
    color: var(--bambu-gray-2);
}

.bambu-portal-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.bambu-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--bambu-gray-dark);
    background: var(--bambu-bg);
    border: 1px solid var(--bambu-border);
    transition: all 0.2s;
}

.bambu-nav-link:hover, .bambu-nav-link.active {
    background: var(--bambu-dark-green);
    color: var(--bambu-white) !important;
    border-color: var(--bambu-dark-green);
}

/* CARDS DE CURSO */
.bambu-section-title {
    margin-bottom: 24px;
}

.bambu-section-title h3 {
    margin: 0 0 6px 0;
    font-size: 22px;
    color: var(--bambu-dark-green);
}

.bambu-section-title p {
    margin: 0;
    color: var(--bambu-gray-2);
    font-size: 14px;
}

.bambu-courses-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.bambu-card {
    background: var(--bambu-white);
    border-radius: var(--bambu-radius);
    border: 1px solid var(--bambu-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: transform 0.2s, box-shadow 0.2s;
}

.bambu-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(15, 56, 39, 0.08);
}

.bambu-card-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: var(--bambu-dark-green);
}

.bambu-production-overlay, .bambu-drip-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    gap: 6px;
    backdrop-filter: blur(2px);
}

.bambu-card-content {
    padding: 20px;
    flex: 1;
}

.bambu-card-content h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: var(--bambu-black);
}

.bambu-course-desc {
    font-size: 13px;
    color: var(--bambu-gray-2);
    margin: 0 0 16px 0;
    line-height: 1.4;
}

.bambu-progress-bar-container {
    margin-top: auto;
}

.bambu-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: var(--bambu-gray-dark);
    margin-bottom: 6px;
}

.bambu-progress-bar {
    height: 6px;
    background: #e6e3da;
    border-radius: 3px;
    overflow: hidden;
}

.bambu-progress-fill {
    height: 100%;
    background: var(--bambu-light-green);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.bambu-card-action {
    padding: 16px 20px;
    border-top: 1px solid var(--bambu-border);
    background: #faf8f5;
}

.bambu-card-action .bambu-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
}

/* BOTÕES GERAIS */
.bambu-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.2s;
    box-sizing: border-box;
}

.bambu-btn-primary {
    background: var(--bambu-dark-green);
    color: var(--bambu-white) !important;
}

.bambu-btn-primary:hover {
    background: var(--bambu-light-green);
    color: var(--bambu-white) !important;
}

.bambu-btn-secondary {
    background: #f1eee7;
    color: var(--bambu-dark-green) !important;
    border-color: var(--bambu-border);
}

.bambu-btn-secondary:hover {
    background: #e2ded5;
}

.bambu-btn-disabled {
    background: #e0ded8;
    color: var(--bambu-gray-dark);
    cursor: not-allowed;
    border: none;
}

/* PLAYER DA AULA */
.bambu-player-container {
    max-width: 1400px;
    padding: 0;
}

.bambu-player-topbar {
    background: var(--bambu-white);
    border-bottom: 1px solid var(--bambu-border);
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.bambu-topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.bambu-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f1eee7;
    color: var(--bambu-dark-green);
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}


.bambu-btn-toggle-menu {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f1eee7;
    color: var(--bambu-dark-green);
    border: 1px solid var(--bambu-border);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.bambu-btn-toggle-menu:hover, .bambu-btn-toggle-menu.active {
    background: var(--bambu-dark-green);
    color: var(--bambu-white);
    border-color: var(--bambu-dark-green);
}

.bambu-btn-back:hover {
    background: #e2ded5;
}

.bambu-player-course-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--bambu-dark-green);
}

.bambu-topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.bambu-player-progress-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--bambu-gray-dark);
}

.bambu-mini-progress {
    width: 80px;
    height: 6px;
    background: #e6e3da;
    border-radius: 3px;
    overflow: hidden;
}

.bambu-mini-progress-fill {
    height: 100%;
    background: var(--bambu-light-green);
}

/* LAYOUT DO PLAYER */
.bambu-player-layout {
    display: flex;
    min-height: calc(100vh - 65px);
    position: relative;
}

/* SIDEBAR RETRÁTIL */
.bambu-player-sidebar {
    width: 340px;
    background: var(--bambu-white);
    border-right: 1px solid var(--bambu-border);
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
    flex-shrink: 0;
}

.bambu-player-sidebar.collapsed {
    margin-left: -340px;
}

.bambu-sidebar-reopen-btn {
    display: none;
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bambu-dark-green);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 999;
}

.bambu-player-sidebar.collapsed + .bambu-sidebar-reopen-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

.bambu-sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--bambu-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #faf8f5;
}


.bambu-sidebar-header .bambu-btn-icon {
    background: #f1eee7;
    color: var(--bambu-dark-green);
    border: 1px solid var(--bambu-border);
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.bambu-sidebar-header .bambu-btn-icon:hover {
    background: var(--bambu-dark-green);
    color: #fff;
}

.bambu-sidebar-reopen-btn {
    display: none;
    position: fixed;
    top: 80px;
    left: 16px;
    width: 38px;
    height: 38px;
    border-radius: 6px;
    background: var(--bambu-dark-green);
    color: #fff;
    border: 1px solid var(--bambu-dark-green);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15, 56, 39, 0.2);
    z-index: 999;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.bambu-sidebar-reopen-btn:hover {
    background: var(--bambu-light-green);
}

.bambu-sidebar-header h3 {
    margin: 0;
    font-size: 15px;
    color: var(--bambu-dark-green);
    font-weight: 700;
}

.bambu-sidebar-modules {
    overflow-y: auto;
    flex: 1;
}

.bambu-sidebar-module {
    border-bottom: 1px solid var(--bambu-border);
}

.bambu-sidebar-module-title {
    padding: 14px 20px;
    font-weight: 700;
    font-size: 14px;
    color: var(--bambu-black);
    background: #fcfbf9;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bambu-sidebar-lessons {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bambu-sidebar-lessons li {
    border-top: 1px solid #f6f4ed;
}

.bambu-sidebar-lessons li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--bambu-gray-2);
    font-size: 13px;
    line-height: 1.3;
    transition: background 0.15s;
}

.bambu-sidebar-lessons li a:hover, .bambu-sidebar-lessons li.active a {
    background: #edf4f0;
    color: var(--bambu-dark-green);
    font-weight: 600;
}

.bambu-sidebar-lessons li.active {
    border-left: 4px solid var(--bambu-light-green);
}

.bambu-check-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.bambu-check-circle.checked {
    background: var(--bambu-light-green);
    border-color: var(--bambu-light-green);
}

.bambu-lesson-locked {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    color: var(--bambu-gray-dark);
    font-size: 13px;
    opacity: 0.7;
    cursor: not-allowed;
}

/* ÁREA PRINCIPAL DO PLAYER */
.bambu-player-main {
    flex: 1;
    background: var(--bambu-bg);
    padding: 30px 40px;
    overflow-y: auto;
}

.bambu-lesson-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.bambu-lesson-header h2 {
    margin: 0;
    font-size: 26px;
    color: var(--bambu-dark-green);
}

/* PLAYER DE VÍDEO (16:9 RESPONSIVO) */
.bambu-video-player-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: var(--bambu-radius);
    background: #000;
    margin-bottom: 30px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.bambu-video-player-container iframe,
.bambu-video-player-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* MATERIAIS PARA DOWNLOAD */
.bambu-materials-section {
    background: var(--bambu-white);
    border: 1px solid var(--bambu-border);
    border-radius: var(--bambu-radius);
    padding: 20px 24px;
    margin-bottom: 30px;
}

.bambu-materials-section h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    color: var(--bambu-dark-green);
    display: flex;
    align-items: center;
    gap: 8px;
}

.bambu-attachments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.bambu-attachment-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--bambu-border);
    border-radius: 6px;
    background: #faf8f5;
    text-decoration: none;
    color: var(--bambu-black);
    transition: all 0.2s;
}

.bambu-attachment-card:hover {
    background: #edf4f0;
    border-color: var(--bambu-light-green);
    color: var(--bambu-dark-green);
}

.bambu-att-info {
    flex: 1;
}

.bambu-att-title {
    display: block;
    font-size: 14px;
}

.bambu-att-size {
    font-size: 11px;
    color: var(--bambu-gray-dark);
}

/* CONTEÚDO TEXTUAL */
.bambu-lesson-text-content {
    background: var(--bambu-white);
    border: 1px solid var(--bambu-border);
    border-radius: var(--bambu-radius);
    padding: 30px;
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--bambu-black);
}

.bambu-lesson-text-content h1, .bambu-lesson-text-content h2 {
    color: var(--bambu-dark-green);
}

.bambu-lesson-text-content hr {
    border: 0;
    border-top: 1px solid var(--bambu-border);
    margin: 24px 0;
}

/* NAVEGAÇÃO ANTERIOR / PRÓXIMA */
.bambu-lesson-nav-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    gap: 16px;
}

/* SEÇÃO DE COMENTÁRIOS / DÚVIDAS */
.bambu-comments-section {
    background: var(--bambu-white);
    border: 1px solid var(--bambu-border);
    border-radius: var(--bambu-radius);
    padding: 30px;
}

.bambu-comments-header h3 {
    margin: 0 0 6px 0;
    font-size: 20px;
    color: var(--bambu-dark-green);
}

.bambu-comment-form {
    margin: 20px 0 30px 0;
}

.bambu-comment-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.bambu-comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bambu-comment-item {
    border: 1px solid var(--bambu-border);
    border-radius: 8px;
    padding: 20px;
    background: #fff;
}

.bambu-comment-item.is-replied {
    border-left: 4px solid var(--bambu-dark-green);
}

.bambu-comment-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
}

.bambu-comment-author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bambu-author-name {
    font-weight: 700;
    color: var(--bambu-black);
}

.bambu-comment-time {
    color: var(--bambu-gray-2);
    font-size: 12px;
}

.bambu-pending-tag {
    background: #fff3cd;
    color: #856404;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.bambu-link-btn {
    background: none;
    border: none;
    color: var(--bambu-gray-dark);
    text-decoration: underline;
    cursor: pointer;
    font-size: 12px;
    margin-left: 8px;
}

.bambu-link-btn:hover {
    color: var(--bambu-dark-green);
}

.bambu-comment-text {
    font-size: 15px;
    color: var(--bambu-black);
    line-height: 1.5;
}

.bambu-reply-card {
    background: #edf4f0;
    border-radius: 6px;
    padding: 16px;
    margin-top: 14px;
}

.bambu-reply-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 12px;
}

.bambu-instructor-tag {
    font-weight: 700;
    color: var(--bambu-dark-green);
}

.bambu-reply-body {
    font-size: 14px;
    color: var(--bambu-black);
    line-height: 1.5;
}

/* GAMIFICAÇÃO & MEDALHAS */
.bambu-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    background: #edf4f0;
    color: var(--bambu-dark-green);
    cursor: help;
}

.bambu-badge-master {
    background: #fef5e7;
    color: #975a16;
    border: 1px solid #f6ad55;
}

/* Tooltip Customizado */
.bambu-badge::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    white-space: pre-wrap;
    width: max-content;
    max-width: 250px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-align: center;
    line-height: 1.3;
}

.bambu-badge:hover::after {
    opacity: 1;
}

/* TELA MINHA JORNADA */
.bambu-journey-hero {
    background: var(--bambu-dark-green);
    color: #fff;
    border-radius: var(--bambu-radius);
    padding: 36px;
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 30px;
}

.bambu-hero-icon {
    font-size: 64px;
    line-height: 1;
}

.bambu-level-subtitle {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #a0c4b2;
}

.bambu-level-title {
    margin: 4px 0 8px 0;
    font-size: 28px;
    color: #fff;
}

.bambu-level-desc {
    margin: 0;
    color: #e2f0e8;
    font-size: 15px;
}

.bambu-journey-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.bambu-stat-card {
    background: var(--bambu-white);
    border: 1px solid var(--bambu-border);
    border-radius: var(--bambu-radius);
    padding: 24px;
    text-align: center;
}

.bambu-stat-card .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: var(--bambu-light-green);
    margin-bottom: 8px;
}

.bambu-stat-number {
    font-size: 26px;
    font-weight: 700;
    color: var(--bambu-dark-green);
}

.bambu-stat-label {
    font-size: 13px;
    color: var(--bambu-gray-2);
    margin-top: 4px;
}

/* ROADMAP DE NÍVEIS */
.bambu-levels-roadmap {
    background: var(--bambu-white);
    border: 1px solid var(--bambu-border);
    border-radius: var(--bambu-radius);
    padding: 30px;
}

.bambu-levels-roadmap h3 {
    margin: 0 0 6px 0;
    font-size: 20px;
    color: var(--bambu-dark-green);
}

.bambu-roadmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.bambu-roadmap-item {
    border: 1px solid var(--bambu-border);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background: #faf8f5;
    transition: transform 0.2s;
}

.bambu-roadmap-item.current {
    border: 2px solid var(--bambu-dark-green);
    background: #edf4f0;
    transform: scale(1.03);
}

.bambu-roadmap-item.is-master {
    background: #fffbf0;
    border-color: #fbd38d;
}

.bambu-road-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.bambu-roadmap-item h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: var(--bambu-dark-green);
}

.bambu-roadmap-item p {
    margin: 0;
    font-size: 12px;
    color: var(--bambu-gray-2);
    line-height: 1.4;
}

/* RANKING */
.bambu-ranking-table-container {
    background: var(--bambu-white);
    border: 1px solid var(--bambu-border);
    border-radius: var(--bambu-radius);
    overflow: hidden;
}

.bambu-ranking-table {
    width: 100%;
    border-collapse: collapse;
}

.bambu-ranking-table th, .bambu-ranking-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--bambu-border);
}

.bambu-ranking-table th {
    background: #faf8f5;
    color: var(--bambu-dark-green);
    font-weight: 700;
}

.bambu-ranking-table tr.highlight-user {
    background: #edf4f0;
    font-weight: 600;
}

.bambu-ranking-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bambu-ranking-user img {
    border-radius: 50%;
}

.bambu-you-tag {
    font-size: 11px;
    background: var(--bambu-dark-green);
    color: #fff;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
}

.pos-num {
    font-weight: 700;
    color: var(--bambu-dark-green);
}

/* TELAS DE BLOQUEIO */
.bambu-access-box {
    padding: 60px 20px;
    text-align: center;
}

.bambu-access-inner {
    background: var(--bambu-white);
    border: 1px solid var(--bambu-border);
    border-radius: var(--bambu-radius);
    padding: 40px 30px;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}

.bambu-access-inner h2 {
    color: var(--bambu-dark-green);
    margin: 16px 0 10px 0;
}

.bambu-access-inner p {
    color: var(--bambu-gray-2);
    font-size: 14px;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

/* RESPONSIVIDADE */
@media (max-width: 768px) {
    .bambu-player-sidebar {
        position: fixed;
        left: 0;
        top: 60px;
        bottom: 0;
        z-index: 999;
        margin-left: -340px;
    }
    .bambu-player-sidebar.mobile-open {
        margin-left: 0;
    }
    .bambu-sidebar-reopen-btn {
        display: flex;
    }
    .bambu-player-main {
        padding: 20px 16px;
    }
}

/* RANKING: coluna Match carteira–objetivo (Bambu Bank) */
.bambu-ranking-table th.bambu-sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.bambu-ranking-table th.bambu-sortable:hover {
    background: #f1ede6;
}

.bambu-ranking-table th.bambu-sortable .bambu-sort-icon {
    font-size: 16px;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    opacity: 0.6;
}

.bambu-ranking-table th.bambu-sortable.sorted-desc .bambu-sort-icon {
    opacity: 1;
}

.bambu-aderencia-none {
    color: #999;
    font-style: italic;
    font-weight: 400;
}

.bambu-aderencia-progress {
    color: #b8860b;
    font-weight: 600;
}

/* AVATAR EDITÁVEL */
.bambu-avatar-editable {
    position: relative;
    cursor: pointer;
    width: 70px;
    height: 70px;
    border-radius: 50%;
}

.bambu-avatar-editable img {
    width: 70px;
    height: 70px;
    object-fit: cover;
}

.bambu-avatar-overlay {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(15, 56, 39, 0.55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.bambu-avatar-overlay .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
}

.bambu-avatar-editable:hover .bambu-avatar-overlay,
.bambu-avatar-editable.uploading .bambu-avatar-overlay {
    opacity: 1;
}

.bambu-avatar-editable.uploading .dashicons {
    animation: bambu-spin 1s linear infinite;
}

@keyframes bambu-spin {
    to { transform: rotate(360deg); }
}

/* --- Exercícios de Compreensão (Quiz) --- */
.bambu-quiz-section { margin: 32px 0; padding: 24px; background: #fff; border: 1px solid #e3e6df; border-radius: 14px; }
.bambu-quiz-section-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.bambu-quiz-section-header h3 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 20px; color: #1B4332; }
.bambu-quiz-progress { font-size: 13px; font-weight: 600; color: #1B4332; background: #eef5ef; border-radius: 999px; padding: 4px 12px; }
.bambu-quiz-section > .bambu-help-text { margin: 8px 0 20px; }
.bambu-quiz-q { border: 1px solid #e3e6df; border-radius: 12px; padding: 18px; margin-bottom: 16px; transition: border-color .2s, background .2s; }
.bambu-quiz-q.is-correct { border-color: #52b788; background: #f3fbf6; }
.bambu-quiz-q.is-loading { opacity: .7; pointer-events: none; }
.bambu-quiz-q-head { display: flex; align-items: flex-start; gap: 12px; }
.bambu-quiz-q-number { flex: 0 0 30px; height: 30px; border-radius: 50%; background: #1B4332; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.bambu-quiz-q-text { flex: 1; margin: 4px 0 0; font-weight: 600; font-size: 16px; line-height: 1.45; color: #1f2937; }
.bambu-quiz-tag { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 3px 8px; border-radius: 999px; white-space: nowrap; margin-top: 4px; }
.bambu-quiz-tag.is-required { background: #fff4e5; color: #b45309; }
.bambu-quiz-tag.is-optional { background: #f1f5f9; color: #475569; }
.bambu-quiz-q.is-incorrect { border-color: #fca5a5; background: #fffafa; }
.bambu-quiz-q.is-missing { border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .15); }
.bambu-quiz-q-options { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 0 42px; }
/* Cores fixadas com !important para não herdar o hover de botões/labels do tema */
.bambu-quiz-section .bambu-quiz-opt { display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; margin: 0; text-align: left; padding: 12px 14px; background: #fafbf9 !important; border: 2px solid #e3e6df; border-radius: 10px; cursor: pointer; font-size: 15px; font-weight: 400; line-height: 1.4; color: #1f2937 !important; text-transform: none; letter-spacing: normal; box-shadow: none; transition: border-color .15s, background-color .15s; }
.bambu-quiz-section .bambu-quiz-opt:hover,
.bambu-quiz-section .bambu-quiz-opt:focus-within { border-color: #1B4332; background: #eef5ef !important; color: #0F3827 !important; }
.bambu-quiz-section .bambu-quiz-opt:hover .bambu-quiz-opt-text,
.bambu-quiz-section .bambu-quiz-opt:focus-within .bambu-quiz-opt-text { color: #0F3827 !important; }
.bambu-quiz-section .bambu-quiz-opt .bambu-quiz-opt-text { color: #1f2937 !important; }
.bambu-quiz-radio { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.bambu-quiz-section .bambu-quiz-opt.is-selected { border-color: #1B4332; background: #e6f0e8 !important; }
.bambu-quiz-section .bambu-quiz-opt.is-selected .bambu-quiz-opt-letter { background: #1B4332; color: #fff; }
.bambu-quiz-opt-letter { flex: 0 0 28px; height: 28px; border-radius: 8px; background: #e6ece6; color: #1B4332; font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.bambu-quiz-opt-text { flex: 1; }
.bambu-quiz-opt-icon { flex: 0 0 20px; font-size: 20px; width: 20px; height: 20px; }
.bambu-quiz-section .bambu-quiz-opt.is-wrong { border-color: #ef4444; background: #fff5f5 !important; animation: bambu-shake .3s; }
.bambu-quiz-section .bambu-quiz-opt.is-wrong .bambu-quiz-opt-letter { background: #ef4444; color: #fff; }
.bambu-quiz-opt.is-wrong .bambu-quiz-opt-icon::before { content: "\f335"; color: #ef4444; }
.bambu-quiz-section .bambu-quiz-opt.is-right { border-color: #2d6a4f; background: #edf8f1 !important; }
.bambu-quiz-section .bambu-quiz-opt.is-right .bambu-quiz-opt-letter { background: #2d6a4f; color: #fff; }
.bambu-quiz-opt.is-right .bambu-quiz-opt-icon::before { content: "\f147"; color: #2d6a4f; }
.bambu-quiz-feedback { margin: 12px 0 0 42px; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 0; }
.bambu-quiz-feedback:not(.is-error):not(.is-success) { display: none; }
.bambu-quiz-feedback.is-error { color: #b91c1c; }
.bambu-quiz-feedback.is-success { color: #1e6b45; }
.bambu-quiz-submit-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.bambu-quiz-submit-row .bambu-btn:disabled { opacity: .7; cursor: wait; }
.bambu-quiz-submit-msg { font-size: 14px; font-weight: 600; }
.bambu-quiz-submit-msg.is-error { color: #b45309; }
.bambu-quiz-result { display: flex; align-items: center; gap: 18px; margin-top: 18px; padding: 16px 18px; border-radius: 12px; border: 2px solid #e3e6df; background: #fafbf9; }
.bambu-quiz-result[hidden] { display: none; }
.bambu-quiz-result-score { flex: 0 0 auto; min-width: 84px; text-align: center; font-size: 30px; font-weight: 800; line-height: 1; }
.bambu-quiz-result-info { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.bambu-quiz-result-title { font-size: 16px; }
.bambu-quiz-result-msg { font-size: 14px; color: #374151; }
.bambu-quiz-result-meta { font-size: 12px; color: #6b7280; }
.bambu-quiz-result .bambu-quiz-next { align-self: flex-start; margin-top: 6px; }
.bambu-quiz-result.is-passed { border-color: #52b788; background: #f3fbf6; }
.bambu-quiz-result.is-passed .bambu-quiz-result-score, .bambu-quiz-result.is-passed .bambu-quiz-result-title { color: #1e6b45; }
.bambu-quiz-result.is-kept { border-color: #f59e0b; background: #fffbeb; }
.bambu-quiz-result.is-kept .bambu-quiz-result-score, .bambu-quiz-result.is-kept .bambu-quiz-result-title { color: #b45309; }
.bambu-quiz-result.is-failed { border-color: #fca5a5; background: #fff5f5; }
.bambu-quiz-result.is-failed .bambu-quiz-result-score, .bambu-quiz-result.is-failed .bambu-quiz-result-title { color: #b91c1c; }
.bambu-btn-disabled { background: #e5e7eb; color: #6b7280 !important; border-color: #e5e7eb; cursor: not-allowed; }
@keyframes bambu-shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@media (max-width: 600px) {
    .bambu-quiz-q-options, .bambu-quiz-feedback { margin-left: 0; }
    .bambu-quiz-result { flex-direction: column; align-items: flex-start; }
    .bambu-quiz-q-head { flex-wrap: wrap; }
}

/* Aula bloqueada por prazo (drip) — efeito "embaçado" */
.bambu-lesson-locked { opacity: 1; filter: blur(0); }
.bambu-lesson-locked .dashicons-lock { color: var(--bambu-gray-dark); opacity: .8; }
.bambu-lesson-locked-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bambu-lesson-locked-title { filter: blur(1.5px); opacity: .55; user-select: none; }
.bambu-lesson-locked-when { font-size: 11px; font-weight: 600; color: #b45309; background: #fff4e5; padding: 1px 8px; border-radius: 999px; align-self: flex-start; }
