/* ================================================
   Sala Virtual CEDEP — CSS Principal
   Herdado e adaptado da Dashboard CEDEP
   ================================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Cores principais */
    --sidebar-bg: #1a1d23;
    --sidebar-hover: #2a2d35;
    --sidebar-active: #353840;
    --sidebar-text: #9ca3af;
    --sidebar-text-active: #ffffff;
    --sidebar-width: 210px;
    --sidebar-collapsed: 72px;

    /* Área principal */
    --bg: #e9ecf1;
    --bg-card: #ffffff;
    --text: #111827;
    --text-muted: #4b5563;
    --border: #e2e8f0;

    /* Cores de destaque */
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;

    /* Tipografia */
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', monospace;

    /* Espaçamentos */
    --radius: 8px;
    --radius-sm: 4px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);

    /* Transições */
    --transition: 0.2s ease;
}

html {
    font-size: 15px;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: width var(--transition);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.sidebar-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
}

.sidebar-logo-mark i,
.sidebar-logo-mark svg {
    width: 22px;
    height: 22px;
}

.logo-icon {
    color: var(--primary);
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.logo-text {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.sidebar-toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    transition: background var(--transition);
}

.sidebar-header:hover .sidebar-toggle-icon {
    background: var(--sidebar-hover);
}

.sidebar-header:hover .sidebar-toggle-icon svg {
    stroke: #fff;
}

/* --- Collapsed state --- */
.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-label {
    display: none;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 12px 8px;
}

.sidebar.collapsed .sidebar-logo {
    display: none;
}

.sidebar.collapsed .sidebar-footer .user-info {
    justify-content: center;
}

/* --- Navigation --- */
.sidebar-nav {
    flex: 1;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 14px;
    border-radius: var(--radius);
    color: var(--sidebar-text);
    transition: all var(--transition);
    white-space: nowrap;
    font-size: 0.95rem;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-active);
}

.nav-item.active {
    background: var(--sidebar-active);
    color: var(--sidebar-text-active);
}

.nav-item i,
.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 9px;
}

/* --- Sidebar Footer --- */
.sidebar-footer {
    padding: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 14px;
    color: var(--sidebar-text);
    font-size: 0.9rem;
    border-radius: var(--radius);
    transition: all var(--transition);
}

/* Variante clicavel do user-info (link pra Meu Cadastro) */
.user-info-link {
    cursor: pointer;
    text-decoration: none;
}
.user-info-link:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-active);
}
.user-info-link.active {
    background: var(--sidebar-active);
    color: var(--sidebar-text-active);
}

.user-info i,
.user-info svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

/* Item promocional do menu (Indique e Ganhe $) */
.nav-item-promo {
    color: #fbbf24 !important;
}

.nav-item-promo:hover,
.nav-item-promo.active {
    background: rgba(251, 191, 36, 0.12) !important;
    color: #fde68a !important;
}

.nav-badge-money {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 800;
    margin-left: 4px;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.4);
}

/* --- Sidebar Badge (notificações) --- */
.nav-badge {
    display: none;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--danger);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    margin-left: auto;
    flex-shrink: 0;
}

.nav-badge.visible {
    display: inline-block;
}

.sidebar.collapsed .nav-badge.visible {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 8px;
    height: 8px;
    padding: 0;
    font-size: 0;
    margin-left: 0;
}

.sidebar.collapsed .nav-item {
    position: relative;
}

/* --- Main Content --- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    /* min-width:0 essencial: sem isso, flex-item nao encolhe abaixo do
       conteudo intrinseco e a pagina rola horizontal em telas estreitas */
    min-width: 0;
    transition: margin-left var(--transition);
    display: flex;
    flex-direction: column;
}

body.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-collapsed);
}

/* --- Top Header --- */
.top-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 24px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.page-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.top-header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.site-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* --- Bell de mensagens (sino com badge + dropdown preview) --- */
.msg-bell {
    position: relative;
    display: inline-flex;
}

.msg-bell-btn {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: none;
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.msg-bell-btn:hover { background: var(--border); color: var(--primary); }

.msg-bell-btn i { width: 20px; height: 20px; }

.msg-bell-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 9px;
    height: 9px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--bg-card);
    display: none;
}

.msg-bell.has-unread .msg-bell-dot { display: block; }

.msg-bell-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-width: calc(100vw - 24px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    z-index: 60;
    overflow: hidden;
}

.msg-bell-dropdown[hidden] { display: none; }

.msg-bell-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text);
}

.msg-bell-head .msg-bell-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.msg-bell-list {
    max-height: 340px;
    overflow-y: auto;
}

.msg-bell-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background var(--transition);
    color: var(--text);
}

.msg-bell-item:hover { background: var(--bg); }
.msg-bell-item:last-child { border-bottom: none; }

.msg-bell-item-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
}

.msg-bell-item-body {
    flex: 1;
    min-width: 0;
}

.msg-bell-item-from {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.msg-bell-item-from time {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.78rem;
    flex-shrink: 0;
}

.msg-bell-item-subject {
    font-size: 0.86rem;
    color: var(--text);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.msg-bell-empty,
.msg-bell-loading {
    padding: 22px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.msg-bell-foot {
    text-align: center;
    padding: 10px;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: background var(--transition);
    text-decoration: none;
    display: block;
}

.msg-bell-foot:hover { background: var(--bg); }

/* --- Pagina /mensagens (listagem) --- */
.msg-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    min-width: 0;
}

.msg-search {
    position: relative;
    flex: 1 1 160px;
    min-width: 0;
}

.msg-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

.msg-search input {
    width: 100%;
    padding: 9px 14px 9px 36px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    font-size: 0.92rem;
    font-family: var(--font);
    color: var(--text);
}

.msg-search input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-card);
}

.msg-list {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    min-width: 0;
}

.msg-list-row {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background var(--transition);
    color: var(--text);
    text-decoration: none;
    min-width: 0;
}

.msg-list-row:hover { background: rgba(59, 130, 246, 0.04); }
.msg-list-row:last-child { border-bottom: none; }

.msg-list-row.unread {
    background: rgba(59, 130, 246, 0.07);
    border-left: 3px solid var(--primary);
    padding-left: 11px;
}

.msg-list-row.unread .msg-list-dot {
    background: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.msg-list-row.unread .msg-list-subject-inline {
    font-weight: 800;
    color: var(--text);
}

.msg-list-row.unread .msg-list-time {
    color: var(--primary);
    font-weight: 700;
}

.msg-list-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: transparent;
    flex-shrink: 0;
}

.msg-list-assunto {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.92rem;
    color: var(--text);
}

.msg-list-subject-inline { color: var(--text); }
.msg-list-preview-inline { color: var(--text-muted); }

.msg-list-anexo {
    flex-shrink: 0;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
}

.msg-list-anexo i { width: 14px; height: 14px; }

.badge-tipo {
    display: inline-block;
    flex-shrink: 0;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 7px;
    border-radius: 4px;
    background: var(--bg);
    color: var(--text-muted);
}

.badge-tipo.enviado  { background: #ecfdf5; color: #047857; }
.badge-tipo.recebido { background: #eff6ff; color: #1d4ed8; }

.msg-list-time {
    font-size: 0.78rem;
    color: var(--text-muted);
    flex-shrink: 0;
    min-width: 38px;
    text-align: right;
}

.msg-list-empty {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
}

.msg-list-empty i {
    width: 40px;
    height: 40px;
    color: var(--border);
    margin-bottom: 8px;
}

/* --- Página /mensagens/{id} (visualização full-page) --- */
.msg-view-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 14px;
    text-decoration: none;
}

.msg-view-back i { width: 16px; height: 16px; }
.msg-view-back:hover { text-decoration: underline; }

.msg-view-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}

.msg-view-head {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}

.msg-view-subject {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.35;
}

.msg-view-from {
    display: flex;
    gap: 12px;
    align-items: center;
}

.msg-view-from-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.msg-view-from-info { flex: 1; min-width: 0; }
.msg-view-from-name {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}

.msg-view-from-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.msg-view-body {
    padding: 22px;
    color: var(--text);
    line-height: 1.6;
    word-break: break-word;
    overflow-x: auto;
}

/* Renderizacao inline do HTML do email: sem altura limitada,
   imagens responsivas, links na cor primaria, tabelas centradas. */
.msg-view-body-html img,
.msg-view-body-html table {
    max-width: 100% !important;
    height: auto;
}

.msg-view-body-html table {
    border-collapse: collapse;
    margin: 0 auto;
}

.msg-view-body-html a { color: var(--primary); }

.msg-view-body-html h1,
.msg-view-body-html h2,
.msg-view-body-html h3 { line-height: 1.3; }

.msg-view-body-html p { margin: 0 0 12px; }

.msg-view-anexos {
    padding: 14px 22px;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

.msg-view-anexos h4 {
    font-size: 0.84rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 8px;
}

.msg-view-anexo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.86rem;
    margin-right: 8px;
    margin-bottom: 6px;
    text-decoration: none;
    transition: all var(--transition);
}

.msg-view-anexo:hover { border-color: var(--primary); color: var(--primary); }

.msg-view-anexo i { width: 16px; height: 16px; color: var(--primary); }

/* --- Card "fale via WhatsApp" (acima do form de escrever) --- */
.contato-wa-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.25);
    color: #fff;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.contato-wa-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contato-wa-info { flex: 1; min-width: 200px; }
.contato-wa-info strong { display: block; font-size: 1rem; font-weight: 700; }
.contato-wa-info small { font-size: 0.82rem; opacity: 0.92; }

.contato-wa-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: #fff;
    color: #128c7e;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    transition: all var(--transition);
    flex-shrink: 0;
}

.contato-wa-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.contato-wa-btn i { width: 16px; height: 16px; }

.contato-or {
    text-align: center;
    margin: 14px 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.contato-or span {
    background: var(--bg);
    padding: 0 14px;
    position: relative;
    z-index: 1;
}

.contato-or::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

/* --- Footer global da sala --- */
.sala-footer {
    margin-top: auto;
    padding: 18px 24px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.sala-footer-empresa {
    font-weight: 600;
    color: var(--text);
}

.sala-footer-cnpj { color: var(--text-muted); }

.sala-footer-wa {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #128c7e;
    font-weight: 600;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(37, 211, 102, 0.1);
    transition: all var(--transition);
    margin-top: 4px;
}

.sala-footer-wa:hover {
    background: rgba(37, 211, 102, 0.18);
    color: #075e54;
}

/* ============================================================
   Meu Cadastro (/perfil)
   ============================================================ */

/* --- Abas do perfil --- */
.perfil-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.perfil-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-family: var(--font);
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.perfil-tab i,
.perfil-tab svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.perfil-tab:hover {
    color: var(--text);
    background: rgba(59, 130, 246, 0.04);
}

.perfil-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.perfil-tab-panel {
    display: none !important;
}

.perfil-tab-panel.active {
    display: block !important;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
    .perfil-tab {
        padding: 10px 14px;
        font-size: 0.88rem;
    }
    .perfil-tab span {
        display: inline; /* mantem texto mesmo no mobile (icone + texto) */
    }
}

.perfil-form { padding: 0; }

.perfil-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
}

.perfil-grid-end {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 700px) {
    .perfil-grid,
    .perfil-grid-end { grid-template-columns: 1fr; }
    .perfil-grid-end > .form-group[style*="span 2"] { grid-column: auto !important; }
}

.perfil-acoes {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.perfil-end-atual {
    padding: 12px 14px;
    background: var(--bg);
    border-radius: 10px;
    margin-bottom: 14px;
    font-size: 0.92rem;
    color: var(--text);
}

.perfil-end-toggle {
    cursor: pointer;
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    list-style: none;
}

.perfil-end-toggle::-webkit-details-marker { display: none; }
.perfil-end-toggle i { width: 16px; height: 16px; }

.perfil-end-form {
    margin-top: 14px;
    padding: 14px;
    background: var(--bg);
    border-radius: 10px;
}

/* Alerta de bounce no topo de /perfil */
.perfil-bounce-alert {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 18px 20px;
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border: 1px solid #fca5a5;
    border-radius: 14px;
    margin-bottom: 16px;
}

.perfil-bounce-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #ef4444;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.perfil-bounce-icon i { width: 22px; height: 22px; }

.perfil-bounce-info { flex: 1; min-width: 0; color: #7f1d1d; }
.perfil-bounce-info strong { display: block; font-size: 1rem; margin-bottom: 4px; }
.perfil-bounce-info p { font-size: 0.92rem; line-height: 1.5; margin-bottom: 6px; }
.perfil-bounce-info small { display: block; font-size: 0.8rem; color: #991b1b; opacity: 0.85; }

.perfil-bounce-acoes {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* ============================================================
   Alertas da dashboard (cadastro incompleto, bounce, CPF)
   ============================================================ */
.dash-alert {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 14px;
    border: 1px solid transparent;
}

.dash-alert > i {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    margin-top: 2px;
}

.dash-alert > div { flex: 1; min-width: 0; font-size: 0.92rem; line-height: 1.5; }
.dash-alert strong { display: inline; }
.dash-alert a { color: inherit; font-weight: 700; text-decoration: underline; }

.dash-alert-warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-color: #fcd34d;
    color: #78350f;
}
.dash-alert-warning > i { color: #b45309; }

.dash-alert-danger {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-color: #fca5a5;
    color: #7f1d1d;
}
.dash-alert-danger > i { color: #b91c1c; }

.dash-alert-info {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border-color: #93c5fd;
    color: #1e3a8a;
}
.dash-alert-info > i { color: #1d4ed8; }

.dash-alert-acoes {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* Modais "rapidos" (CPF / Nome) acionados pelas badges da dashboard */
.quick-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(3px);
}

.quick-modal[hidden] { display: none; }

.quick-modal-card {
    position: relative;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 26px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: quickModalIn 0.18s ease;
}

@keyframes quickModalIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.quick-modal-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.quick-modal-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin-bottom: 16px;
}

.quick-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg);
    color: var(--text-muted);
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.quick-modal-close:hover { background: var(--border); color: var(--text); }
.quick-modal-close i { width: 16px; height: 16px; }

.quick-modal-acoes {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 8px;
}

/* ============================================================
   Listagens (Em Andamento / Concluidos / Certificados)
   ============================================================ */
.curso-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.curso-card-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    transition: all var(--transition);
    min-width: 0;
}

a.curso-card-row:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
}

.curso-card-row.curso-concluido {
    background: rgba(34, 197, 94, 0.04);
}

.curso-card-row-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.12);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.curso-card-row-icon i { width: 22px; height: 22px; }

.curso-card-row-icon.green  { background: rgba(34, 197, 94, 0.15);  color: var(--success); }
.curso-card-row-icon.orange { background: rgba(245, 158, 11, 0.15); color: var(--warning); }

.curso-card-row-body { flex: 1; min-width: 0; }

.curso-card-row-nome {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.curso-card-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
    align-items: center;
}

.curso-card-row-meta span { display: inline-flex; align-items: center; gap: 4px; }
.curso-card-row-meta i { width: 13px; height: 13px; }

.curso-card-row-acao {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--primary);
    color: #fff;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    flex-shrink: 0;
    text-decoration: none;
}

.curso-card-row-acao i { width: 14px; height: 14px; }

.curso-card-row-tag {
    font-size: 0.78rem;
    color: var(--text-muted);
    background: var(--bg);
    padding: 4px 10px;
    border-radius: 999px;
    flex-shrink: 0;
}

.curso-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.curso-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.curso-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #a855f7);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.curso-progress-text {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    flex-shrink: 0;
    min-width: 36px;
    text-align: right;
}

@media (max-width: 600px) {
    .curso-card-row { flex-wrap: wrap; }
    .curso-card-row-acao,
    .curso-card-row-tag { margin-left: auto; }
}

/* ============================================================
   Pagamentos (tabela)
   ============================================================ */
.pag-resumo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.92rem;
}

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

.pag-table th {
    text-align: left;
    padding: 12px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
    background: var(--bg);
}

.pag-table th.text-right { text-align: right; }

.pag-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
    color: var(--text);
    vertical-align: top;
}

.pag-table td.text-right { text-align: right; }
.pag-table tr:last-child td { border-bottom: none; }
.pag-table tr:hover { background: rgba(59, 130, 246, 0.03); }

.pag-row-estornado {
    background: rgba(239, 68, 68, 0.04);
}

.pag-row-estornado td:first-child strong,
.pag-row-estornado td:nth-child(2) {
    text-decoration: line-through;
    color: var(--text-muted);
}

.text-right { text-align: right; }
.d-block { display: block; }

/* ============================================================
   Catalogo (Todos os Cursos)
   ============================================================ */

.catalog-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 26px;
    background: linear-gradient(135deg, #ede9fe, #e0e7ff);
    border: 1px solid #c7d2fe;
    border-radius: 16px;
    margin-bottom: 18px;
}

.catalog-hero-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), #a855f7);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.catalog-hero-icon i { width: 28px; height: 28px; }

.catalog-hero-text { flex: 1; min-width: 0; }
.catalog-hero-text h2 { font-size: 1.25rem; font-weight: 800; color: var(--text); }
.catalog-hero-text p { color: var(--text-muted); font-size: 0.92rem; margin-top: 2px; }

/* Grid de categorias — formato compacto horizontal (thumb pequena à esquerda + texto) */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}

.cat-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
    min-height: 64px;
}

.cat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.07);
    border-color: var(--primary);
}

.cat-card-img {
    position: relative;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    margin: 6px 0 6px 6px;
    border-radius: 8px;
    background: linear-gradient(135deg, #e9ecf1, #d1d5db);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cat-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.cat-card:hover .cat-card-img img { transform: scale(1.06); }

.cat-card-fallback-icon {
    display: none;
    color: var(--text-muted);
    opacity: 0.5;
}

.cat-card-fallback-icon i { width: 28px; height: 28px; }

.cat-card-img-fallback .cat-card-fallback-icon { display: block; }

.cat-card-body {
    padding: 8px 12px;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cat-card-nome {
    font-weight: 600;
    color: var(--text);
    font-size: 0.88rem;
    line-height: 1.25;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.cat-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cat-card-demo {
    border-color: var(--success);
    background: linear-gradient(135deg, #f0fdf4, #fff);
}

.cat-card-demo .cat-card-img {
    background: linear-gradient(135deg, #bbf7d0, #86efac);
}

/* Cabecalho da categoria escolhida */
.catalog-cat-header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 16px;
}

.catalog-cat-img {
    width: 90px;
    height: 90px;
    border-radius: 14px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg);
    flex-shrink: 0;
}

.catalog-cat-info { flex: 1; min-width: 0; }
.catalog-cat-info h2 { font-size: 1.4rem; font-weight: 800; color: var(--text); }
.catalog-cat-info p { color: var(--text-muted); font-size: 0.92rem; margin-top: 4px; }

@media (max-width: 600px) {
    .catalog-cat-header { flex-direction: column; align-items: flex-start; }
    .catalog-cat-img { width: 100%; height: 120px; }
}

/* Grid de cursos da categoria — formato compacto horizontal (thumb pequena à esquerda) */
.catalog-cursos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}

.curso-mini-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
    min-height: 64px;
    position: relative;
}

.curso-mini-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.07);
}

.curso-mini-img {
    position: relative;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    margin: 6px 0 6px 6px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.curso-mini-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.curso-mini-fallback-icon {
    display: none;
    color: var(--text-muted);
    opacity: 0.4;
}

.curso-mini-fallback-icon i { width: 26px; height: 26px; }

.curso-mini-img-fallback .curso-mini-fallback-icon { display: block; }

.curso-mini-body {
    padding: 8px 12px;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
}

.curso-mini-nome {
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.25;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.curso-mini-acao {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 600;
}

.curso-mini-acao i { width: 12px; height: 12px; }

.curso-mini-tag {
    position: absolute;
    top: 4px;
    left: 4px;
    background: var(--success);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 2px 6px;
    border-radius: 999px;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.curso-mini-tag-locked {
    background: rgba(0, 0, 0, 0.55);
    padding: 3px;
    line-height: 0;
}
.curso-mini-tag-locked i { width: 10px; height: 10px; }

.curso-mini-free { border-color: var(--success); }

/* Secao destacada de cursos gratuitos */
.catalog-free-section {
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
    border: 1px solid #86efac;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 18px;
}

.catalog-free-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.catalog-free-header h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #065f46;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.catalog-free-header h3 i { width: 18px; height: 18px; color: var(--success); }

.catalog-section-divider {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
    margin: 22px 0 14px;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.catalog-section-divider span {
    background: var(--bg);
    padding: 0 14px;
    position: relative;
    z-index: 1;
}

.catalog-section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
    z-index: 0;
}

/* === Lista compacta de cursos (categorias grandes) === */
.catalog-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 16px;
    margin-bottom: 10px;
}

.catalog-filter > i {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.catalog-filter input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--font);
    font-size: 0.92rem;
    color: var(--text);
    min-width: 0;
}

.catalog-filter-count {
    font-size: 0.78rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.cursos-lista {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}

.curso-li { border-bottom: 1px solid var(--border); }
.curso-li:last-child { border-bottom: none; }

/* Multi-coluna em telas medias/grandes — mobile fica 1 por linha (default acima).
   min-width:0 nos itens da grid eh CRITICO: sem isso a coluna nao encolhe e a
   ultima coluna some no overflow (grid items tem min-width:auto = tamanho do conteudo).*/
@media (min-width: 700px) {
    .cursos-lista {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .curso-li { min-width: 0; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); }
    .curso-li:last-child { border-bottom: 1px solid var(--border); }
    .curso-li:nth-child(2n) { border-right: none; }
}

@media (min-width: 1100px) {
    .cursos-lista { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .curso-li { border-right: 1px solid var(--border); }
    .curso-li:nth-child(2n) { border-right: 1px solid var(--border); }
    .curso-li:nth-child(3n) { border-right: none; }
}

@media (min-width: 1500px) {
    .cursos-lista { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .curso-li { border-right: 1px solid var(--border); }
    .curso-li:nth-child(2n),
    .curso-li:nth-child(3n) { border-right: 1px solid var(--border); }
    .curso-li:nth-child(4n) { border-right: none; }
}

.curso-li-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    color: var(--text);
    text-decoration: none;
    transition: background var(--transition);
}

.curso-li-link:hover { background: rgba(59, 130, 246, 0.05); }

.curso-li-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.curso-li-icon i { width: 16px; height: 16px; }

.curso-li-icon.free   { background: rgba(34, 197, 94, 0.15);  color: var(--success); }
.curso-li-icon.locked { background: rgba(0, 0, 0, 0.06);      color: var(--text-muted); }

.curso-li-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.curso-li-nome {
    font-size: 0.92rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.curso-li-horas {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.2;
}

.curso-li-badge {
    flex-shrink: 0;
    font-size: 0.68rem !important;
    padding: 2px 8px !important;
}

.curso-li-arrow {
    color: var(--text-muted);
    flex-shrink: 0;
    transition: all var(--transition);
}

.curso-li-arrow i { width: 14px; height: 14px; }

.curso-li-link:hover .curso-li-arrow {
    color: var(--primary);
    transform: translate(2px, -2px);
}

.curso-li-free .curso-li-link { background: rgba(34, 197, 94, 0.04); }
.curso-li-bloqueado .curso-li-link { color: var(--text-muted); }
.curso-li-bloqueado .curso-li-nome { opacity: 0.7; }

/* --- Form de escrever mensagem --- */
.msg-write-form {
    padding: 22px;
}

.msg-write-textarea {
    resize: vertical;
    font-family: var(--font);
    line-height: 1.5;
    min-height: 200px;
}

.msg-write-counter {
    text-align: right;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.msg-write-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    margin-top: 16px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 4px;
}

/* --- Top Header: barra de busca de curso --- */
.top-header-search {
    position: relative;
    flex: 1;
    max-width: 640px;
}

.top-header-search .search-icon-left {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.busca-curso-input {
    width: 100%;
    padding: 10px 40px 10px 42px;
    border: 1.5px solid var(--border);
    border-radius: 999px;
    font-size: 0.95rem;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    transition: all var(--transition);
}

.busca-curso-input::placeholder { color: var(--text-muted); }

.busca-curso-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.busca-curso-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border: none;
    background: var(--border);
    color: var(--text-muted);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.busca-curso-clear i { width: 14px; height: 14px; }
.busca-curso-clear:hover { background: var(--text-muted); color: #fff; }

.busca-curso-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 460px;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    z-index: 60;
    padding: 6px;
}

.busca-curso-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.busca-curso-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text);
    cursor: pointer;
    transition: background var(--transition);
}

.busca-curso-item:hover,
.busca-curso-item.active {
    background: rgba(59, 130, 246, 0.08);
}

.busca-curso-item i.bc-leading {
    width: 18px;
    height: 18px;
    color: var(--primary);
    flex-shrink: 0;
}

.busca-curso-item-nome {
    flex: 1;
    font-size: 0.92rem;
    line-height: 1.3;
}

.busca-curso-item-nome mark {
    background: rgba(59, 130, 246, 0.18);
    color: inherit;
    padding: 0 2px;
    border-radius: 3px;
}

.busca-curso-item-badge {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--success);
    background: rgba(34, 197, 94, 0.12);
    padding: 2px 8px;
    border-radius: 999px;
    flex-shrink: 0;
}

.busca-curso-item-badge.acessar {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.12);
}

.busca-curso-empty,
.busca-curso-loading {
    padding: 18px 14px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.busca-curso-loading i {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 6px;
    animation: spin 1s linear infinite;
}

/* --- Submenu horizontal (legado) --- */
.submenu {
    display: flex;
    gap: 4px;
}

.submenu-item {
    padding: 6px 16px;
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
}

.submenu-item:hover {
    background: var(--bg);
    color: var(--text);
}

.submenu-item.active {
    background: var(--primary);
    color: #fff;
}

/* --- Submenu Bar (faixa horizontal abaixo do header) --- */
.submenu-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 24px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}

/* --- Content Area --- */
.content-area {
    padding: 24px;
    flex: 1;
    min-width: 0;
    overflow-x: hidden;
}

/* --- Cards --- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 24px;
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 600;
}

/* --- Stats Grid --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon.blue   { background: rgba(59, 130, 246, 0.1); color: var(--primary); }
.stat-icon.green  { background: rgba(34, 197, 94, 0.1);  color: var(--success); }
.stat-icon.orange { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.stat-icon.red    { background: rgba(239, 68, 68, 0.1);  color: var(--danger);  }
.stat-icon.cyan   { background: rgba(6, 182, 212, 0.1);  color: var(--info);    }

.stat-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.stat-info p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 4px;
}

/* --- Tables --- */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    text-align: left;
    padding: 10px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
}

tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 0.93rem;
    color: #1f2937;
}

tbody tr:hover {
    background: rgba(59, 130, 246, 0.03);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: #16a34a;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 0.8rem;
}

/* Botoes de alto contraste pra usar em fundos coloridos (alertas) */
.btn-dark {
    background: #78350f;
    color: #fff;
    border: 1.5px solid #78350f;
}
.btn-dark:hover { background: #5a2807; border-color: #5a2807; }

.btn-light {
    background: #fff;
    color: #78350f;
    border: 1.5px solid #f59e0b;
}
.btn-light:hover { background: #fef3c7; }

.btn-lg {
    padding: 12px 28px;
    font-size: 1rem;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg-card);
    transition: border-color var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* --- Alerts --- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.alert-success { background: rgba(34, 197, 94, 0.1); color: #16a34a; border: 1px solid rgba(34, 197, 94, 0.2); }
.alert-danger  { background: rgba(239, 68, 68, 0.1); color: #dc2626; border: 1px solid rgba(239, 68, 68, 0.2); }
.alert-warning { background: rgba(245, 158, 11, 0.1); color: #d97706; border: 1px solid rgba(245, 158, 11, 0.2); }
.alert-info    { background: rgba(6, 182, 212, 0.1); color: #0891b2; border: 1px solid rgba(6, 182, 212, 0.2); }

/* --- Badges --- */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success { background: rgba(34, 197, 94, 0.15); color: #15803d; }
.badge-danger  { background: rgba(239, 68, 68, 0.15); color: #b91c1c; }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #b45309; }
.badge-info    { background: rgba(6, 182, 212, 0.15); color: #0e7490; }

/* Site badges */
.site-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 4px;
    vertical-align: middle;
    line-height: 1.4;
}

/* --- Sidebar Overlay (mobile) --- */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 90;
}

.sidebar-overlay.active {
    display: block;
}

/* --- Modal --- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 200;
    overflow-y: auto;
    padding: 4px;
}

.modal-overlay.active {
    display: flex;
    justify-content: center;
}

.modal-container {
    background: #edeef1;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 800px;
    margin: 4px auto;
    max-height: calc(100vh - 8px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.modal-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-header-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* --- Icon Buttons --- */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: var(--radius-sm);
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    padding: 0;
    font-size: 0;
}

.icon-btn i { width: 14px; height: 14px; }

.icon-btn:hover {
    background: var(--bg);
    color: var(--primary);
}

/* --- Toast Notification --- */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--text);
    color: #fff;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    z-index: 999;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.error {
    background: var(--danger);
}

/* --- Login Page (novo design moderno) --- */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    position: relative;
    overflow: hidden;
}

/* Pattern decorativo de fundo */
.auth-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(at 20% 30%, rgba(59, 130, 246, 0.15) 0, transparent 40%),
        radial-gradient(at 80% 70%, rgba(139, 92, 246, 0.12) 0, transparent 45%),
        radial-gradient(at 40% 90%, rgba(6, 182, 212, 0.10) 0, transparent 50%);
    pointer-events: none;
}

.auth-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 36px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 1;
    animation: authCardIn 0.4s ease;
}

@keyframes authCardIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: #fff;
    margin-bottom: 14px;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35);
}

.auth-logo-badge i, .auth-logo-badge svg {
    width: 30px;
    height: 30px;
}

.auth-logo h1 {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.auth-logo p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-site-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
    margin-top: 6px;
}

.auth-form .form-group {
    margin-bottom: 14px;
}

.auth-form label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.auth-form .form-control {
    padding: 12px 14px;
    font-size: 0.95rem;
    border-width: 1.5px;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap i.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.auth-input-wrap .form-control {
    padding-left: 42px;
}

.auth-input-wrap .toggle-senha {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    display: flex;
    border-radius: var(--radius-sm);
}

.auth-input-wrap .toggle-senha:hover {
    color: var(--primary);
    background: var(--bg);
}

.auth-input-wrap .toggle-senha i {
    width: 18px;
    height: 18px;
}

.btn-auth {
    width: 100%;
    padding: 13px;
    font-size: 0.98rem;
    font-weight: 600;
    justify-content: center;
    border-radius: 10px;
    margin-top: 4px;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
    font-size: 0.85rem;
    flex-wrap: wrap;
    gap: 8px;
}

.auth-links a {
    color: var(--primary);
    font-weight: 500;
    transition: color var(--transition);
}

.auth-links a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.auth-separator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 18px;
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-separator::before,
.auth-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.btn-otp {
    width: 100%;
    padding: 11px;
    background: var(--bg);
    color: var(--text);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition);
    font-family: var(--font);
}

.btn-otp:hover {
    background: #fff;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-otp i {
    width: 16px;
    height: 16px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.auth-footer strong {
    color: var(--text);
}

/* === Desambiguacao (multiplos cadastros) === */
.auth-disambig-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.auth-disambig-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--transition);
    text-align: left;
    font-family: var(--font);
    width: 100%;
}

.auth-disambig-item:hover {
    border-color: var(--primary);
    background: #fff;
}

.auth-disambig-badge {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.auth-disambig-info {
    flex: 1;
    min-width: 0;
}

.auth-disambig-nome {
    font-weight: 600;
    color: var(--text);
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-disambig-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* === Sugestao de outro site === */
.auth-sugestao {
    padding: 16px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 10px;
    margin-top: 16px;
    border: 1px solid #fcd34d;
}

.auth-sugestao-titulo {
    font-weight: 600;
    color: #92400e;
    font-size: 0.9rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.auth-sugestao-texto {
    font-size: 0.85rem;
    color: #78350f;
    line-height: 1.4;
    margin-bottom: 12px;
}

.auth-sugestao-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.auth-sugestao-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #fff;
    border: 1.5px solid #fcd34d;
    border-radius: 8px;
    color: #78350f;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
}

.auth-sugestao-btn:hover {
    background: #92400e;
    color: #fff;
    border-color: #92400e;
}

/* === OTP input (6 digitos separados) === */
.otp-input-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 16px 0;
}

.otp-digit {
    width: 44px;
    height: 54px;
    border: 2px solid var(--border);
    border-radius: 10px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text);
    background: var(--bg-card);
    transition: all var(--transition);
}

.otp-digit:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.otp-digit.filled {
    border-color: var(--primary);
}

.otp-contador {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 8px 0;
}

.otp-contador strong {
    color: var(--text);
    font-family: var(--font-mono);
}

/* === Responsive auth === */
@media (max-width: 480px) {
    .auth-card {
        padding: 28px 22px;
        border-radius: 14px;
    }
    .auth-logo h1 {
        font-size: 1.35rem;
    }
    .otp-digit {
        width: 38px;
        height: 46px;
        font-size: 1.2rem;
    }
}

/* --- Progress Bar (cursos) --- */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.4s ease;
}

.progress-bar-fill.green { background: var(--success); }
.progress-bar-fill.orange { background: var(--warning); }

/* --- Curso Card (específico sala virtual) --- */
.curso-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition);
}

.curso-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.curso-card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: var(--bg);
}

.curso-card-body {
    padding: 16px;
}

.curso-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.3;
}

.curso-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.curso-card-progress {
    margin-top: 8px;
}

.curso-card-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

/* Cursos Grid */
.cursos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* --- Abas --- */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
}

.tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
    cursor: pointer;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: var(--font);
}

.tab:hover {
    color: var(--text);
    background: rgba(59, 130, 246, 0.04);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.tab-count {
    background: var(--bg);
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tab.active .tab-count {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
}

/* --- Iframe Modal --- */
.iframe-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 24px;
}
.iframe-modal-overlay.active {
    display: flex;
}
.iframe-modal {
    background: #fff;
    border-radius: 12px;
    width: 640px;
    height: 560px;
    max-width: 95vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.iframe-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
.iframe-modal-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}
.iframe-modal-frame {
    flex: 1;
    width: 100%;
    border: none;
    border-radius: 0 0 12px 12px;
}

/* --- Spin Animation --- */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

/* --- Utility Classes --- */
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-primary { color: var(--primary); }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.hidden { display: none; }

/* ================================================
   Dashboard do Aluno (página inicial)
   ================================================ */

.dash-hero {
    border-radius: 16px;
    padding: 22px 26px;
    color: #fff;
    margin-bottom: 18px;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.dash-hero::after {
    content: '';
    position: absolute;
    right: -60px;
    top: -60px;
    width: 220px;
    height: 220px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

.dash-hero-top { position: relative; }

.dash-hero h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.dash-hero p {
    opacity: 0.92;
    font-size: 0.92rem;
}

/* Stats compactas embutidas no hero */
.dash-hero-stats {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.hero-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    transition: all var(--transition);
    backdrop-filter: blur(4px);
}

.hero-stat:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

.hero-stat i {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.9;
}

.hero-stat-num {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1;
    margin-right: 2px;
}

.hero-stat-label {
    font-size: 0.78rem;
    opacity: 0.92;
    line-height: 1.2;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

@media (max-width: 700px) {
    .dash-hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .hero-stat-label { font-size: 0.74rem; }
}

/* Banner de pagamento (não pago) — alta conversão, fundo lavanda visível */
.dash-pay-banner {
    position: relative;
    background:
        radial-gradient(at 100% 0%, rgba(168, 85, 247, 0.22) 0, transparent 55%),
        radial-gradient(at 0% 100%, rgba(59, 130, 246, 0.18) 0, transparent 50%),
        #ebe2fb;
    border-radius: 18px;
    padding: 26px;
    margin-bottom: 20px;
    border: 1px solid #d4c4f1;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12);
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.dash-pay-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 10px;
    box-shadow: 0 3px 8px rgba(245, 158, 11, 0.35);
}

.dash-pay-tag i { width: 13px; height: 13px; }

.dash-pay-headline {
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text);
    margin-bottom: 10px;
    letter-spacing: -0.4px;
}

.dash-pay-headline .hl {
    background: linear-gradient(120deg, var(--primary) 0%, #a855f7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.dash-pay-subhead {
    color: var(--text-muted);
    line-height: 1.55;
    font-size: 0.96rem;
}

.dash-pay-subhead strong { color: var(--text); }

.dash-pay-price {
    display: inline-block;
    color: var(--success) !important;
    font-size: 1.2rem;
    font-weight: 800;
    padding: 0 4px;
}

.dash-pay-perks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px 18px;
    list-style: none;
    margin-top: 14px;
    padding: 0;
}

.dash-pay-perks li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text);
}

.dash-pay-perks li > i {
    width: 22px;
    height: 22px;
    color: var(--success);
    flex-shrink: 0;
    background: rgba(34, 197, 94, 0.12);
    border-radius: 50%;
    padding: 4px;
    margin-top: 1px;
}

.dash-pay-perks li > span {
    flex: 1;
    min-width: 0;
}

.dash-pay-perks li strong { font-weight: 700; }

/* Bonus strip (Brinde + Rapido) — destaca beneficios extras */
.dash-pay-bonus {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.dash-pay-bonus-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    border-radius: 12px;
}

.dash-pay-bonus-item p {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.4;
    color: #78350f;
}

.dash-pay-bonus-item p strong { color: #78350f; font-weight: 700; }

.dash-pay-bonus-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    align-self: flex-start;
    background: #f59e0b;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    padding: 3px 9px;
    border-radius: 999px;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.4);
}

.dash-pay-bonus-tag i { width: 12px; height: 12px; }

/* Variante "rapido" em azul pra criar contraste */
.dash-pay-bonus-item:has(.dash-pay-bonus-tag.accent) {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border-color: var(--primary);
}

.dash-pay-bonus-item:has(.dash-pay-bonus-tag.accent) p,
.dash-pay-bonus-item:has(.dash-pay-bonus-tag.accent) p strong {
    color: #1e40af;
}

.dash-pay-bonus-tag.accent {
    background: var(--primary);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.4);
}

/* 3 botoes lado a lado em desktop, empilhados em mobile estreito. */
.dash-pay-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 6px;
}

@media (max-width: 720px) {
    .dash-pay-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dash-pay-options .dash-pay-option.boleto { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
    .dash-pay-options { grid-template-columns: 1fr; }
    .dash-pay-options .dash-pay-option.boleto { grid-column: auto; }
}

.dash-pay-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    transition: all var(--transition);
    text-decoration: none;
    font-family: var(--font);
    cursor: pointer;
}

.dash-pay-option:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
}

.dash-pay-option.featured {
    border-color: var(--success);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05), rgba(34, 197, 94, 0.02));
    box-shadow: 0 6px 14px rgba(34, 197, 94, 0.15);
}

.dash-pay-option.featured:hover {
    border-color: var(--success);
    box-shadow: 0 10px 20px rgba(34, 197, 94, 0.25);
}

.dash-pay-option-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.dash-pay-option-icon i { width: 22px; height: 22px; }

.dash-pay-option.pix .dash-pay-option-icon { background: #16a34a; }
.dash-pay-option.boleto .dash-pay-option-icon { background: #475569; }
.dash-pay-option.cartao .dash-pay-option-icon { background: #f59e0b; }

.dash-pay-option-info { flex: 1; min-width: 0; }
.dash-pay-option-info strong { display: block; font-size: 0.98rem; font-weight: 700; }
.dash-pay-option-info small { color: var(--text-muted); font-size: 0.8rem; }

.dash-pay-option-arrow {
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform var(--transition);
}

.dash-pay-option-arrow i { width: 18px; height: 18px; }

.dash-pay-option:hover .dash-pay-option-arrow {
    transform: translateX(3px);
    color: var(--primary);
}

.dash-pay-secondary {
    padding-top: 6px;
    border-top: 1px dashed #d4c4f1;
    margin-top: 4px;
}

.dash-pay-demo-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.7);
    border: 1.5px solid #d4c4f1;
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    transition: all var(--transition);
}

.dash-pay-demo-btn:hover {
    background: #fff;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(99, 102, 241, 0.12);
}

.dash-pay-demo-btn > i {
    width: 22px;
    height: 22px;
    color: var(--primary);
    flex-shrink: 0;
}

.dash-pay-demo-btn span {
    flex: 1;
    min-width: 0;
    font-size: 0.92rem;
    line-height: 1.35;
}

.dash-pay-demo-btn span strong {
    display: block;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.dash-pay-demo-btn .arrow {
    color: var(--text-muted);
    transition: transform var(--transition);
    width: 18px;
    height: 18px;
}

.dash-pay-demo-btn:hover .arrow {
    transform: translateX(3px);
    color: var(--primary);
}

/* ============================================================
   Depoimentos (prova social)
   ============================================================ */
.dash-depo {
    margin-bottom: 22px;
    padding: 22px 4px 4px;
}

.dash-depo-header { text-align: center; margin-bottom: 18px; }

.dash-depo-header h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.3px;
    margin-bottom: 4px;
}

.dash-depo-header p {
    color: var(--text-muted);
    font-size: 0.92rem;
}

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

.dash-depo-card {
    position: relative;
    text-align: left;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font);
    color: var(--text);
}

.dash-depo-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}

.dash-depo-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.dash-depo-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dash-depo-stars {
    color: #f59e0b;
    font-size: 0.95rem;
    letter-spacing: 1px;
    line-height: 1;
    margin-bottom: 8px;
}

.dash-depo-texto {
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--text);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dash-depo-meta strong {
    display: block;
    font-size: 0.92rem;
    color: var(--text);
    font-weight: 700;
}

.dash-depo-meta small {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.dash-depo-cert-flag {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
}

.dash-depo-cert-flag i { width: 12px; height: 12px; }

.dash-depo-trust {
    text-align: center;
    margin-top: 16px;
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.dash-depo-trust i { width: 14px; height: 14px; color: var(--success); }

/* Lightbox de depoimento */
.depo-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.78);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(4px);
}

.depo-lightbox[hidden] { display: none; }

.depo-lightbox-card {
    position: relative;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 26px;
    max-width: 480px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: depoIn 0.2s ease;
}

@keyframes depoIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.depo-lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg);
    color: var(--text-muted);
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.depo-lightbox-close:hover { background: var(--border); color: var(--text); }
.depo-lightbox-close i { width: 16px; height: 16px; }

.depo-full-photo,
.depo-full-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    margin: 0 auto 14px;
    object-fit: cover;
    display: block;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
}

.depo-full-avatar {
    color: #fff;
    font-size: 2.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.depo-full-stars {
    color: #f59e0b;
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.depo-full-texto {
    font-size: 1.02rem;
    line-height: 1.55;
    color: var(--text);
    font-style: italic;
    margin: 0 0 16px;
}

.depo-full-meta strong { display: block; font-weight: 700; color: var(--text); }
.depo-full-meta small { display: block; color: var(--text-muted); margin-top: 2px; font-size: 0.85rem; }

.depo-full-cert {
    display: block;
    margin-top: 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-muted);
    transition: all var(--transition);
}

.depo-full-cert:hover { border-color: var(--primary); color: var(--primary); }

.depo-full-cert img {
    width: 100%;
    height: auto;
    display: block;
}

.depo-full-cert span {
    display: block;
    padding: 8px;
    font-size: 0.82rem;
    background: var(--bg);
}

.dash-pay-qr {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 16px;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 12px;
    border: 1px dashed #d4c8ee;
}

.dash-pay-qr img,
.dash-pay-qr-canvas {
    width: 156px;
    height: 156px;
    background: #fff;
    border-radius: 8px;
    padding: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dash-pay-qr-canvas img,
.dash-pay-qr-canvas canvas {
    width: 100% !important;
    height: 100% !important;
}

.dash-pay-qr-info { flex: 1; min-width: 0; }
.dash-pay-qr-info h4 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.dash-pay-qr-info p { font-size: 0.86rem; color: var(--text-muted); margin-bottom: 10px; }

/* Em telas pequenas: oculta o QR (aluno nao escaneia o proprio celular)
   e mostra so o copia-cola. */
.dash-pay-qr-text-desktop { display: inline; }
.dash-pay-qr-text-mobile  { display: none; }

@media (max-width: 600px) {
    .dash-pay-qr img,
    .dash-pay-qr-canvas { display: none; }
    .dash-pay-qr { padding: 14px; }
    .dash-pay-qr-text-desktop { display: none; }
    .dash-pay-qr-text-mobile  { display: inline; }
}

.dash-pay-qr-copia {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px dashed var(--border);
    border-radius: 10px;
    background: var(--bg-card);
    font-family: var(--font);
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    text-align: left;
    line-height: 1.4;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 4px;
    align-items: center;
    transition: all var(--transition);
}

.dash-pay-qr-copia:hover {
    border-color: var(--primary);
    border-style: solid;
    background: var(--bg);
}

.dash-pay-qr-copia > i {
    grid-row: 1 / span 2;
    width: 18px;
    height: 18px;
    color: var(--primary);
    flex-shrink: 0;
}

.dash-pay-qr-copia-code {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--text);
    word-break: break-all;
    overflow: hidden;
}

.dash-pay-qr-copia-hint {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dash-pay-qr-copia-ok { display: none; color: var(--success); align-items: center; gap: 4px; }
.dash-pay-qr-copia-ok i { width: 14px; height: 14px; }

.dash-pay-qr-copia.copied .dash-pay-qr-copia-default { display: none; }
.dash-pay-qr-copia.copied .dash-pay-qr-copia-ok { display: inline-flex; }
.dash-pay-qr-copia.copied { border-color: var(--success); border-style: solid; background: rgba(34, 197, 94, 0.06); }

/* Banner de vale-matricula */
.dash-vale {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #fcd34d;
    border-radius: 14px;
    padding: 18px 22px;
    margin-bottom: 20px;
    color: #78350f;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.dash-vale-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #f59e0b;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-vale-icon i { width: 24px; height: 24px; }

.dash-vale-info { flex: 1; min-width: 240px; }
.dash-vale-titulo { font-weight: 700; font-size: 1rem; color: #78350f; margin-bottom: 4px; }
.dash-vale-texto { font-size: 0.88rem; color: #92400e; line-height: 1.45; }
.dash-vale-codigo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #fff;
    border: 1.5px solid #f59e0b;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.92rem;
    color: #92400e;
    cursor: pointer;
    margin-top: 4px;
}

.dash-vale-codigo i { width: 14px; height: 14px; }

/* Stat card com clique */
.stat-card.clickable {
    cursor: pointer;
    transition: all var(--transition);
}

.stat-card.clickable:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Grid 2 colunas (cursos + pedidos) */
.dash-cols {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 900px) {
    .dash-cols { grid-template-columns: 1fr; }
}

/* Lista de cursos em andamento */
.dash-curso-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 8px;
    background: var(--bg-card);
    transition: all var(--transition);
    text-decoration: none;
    color: var(--text);
}

.dash-curso-row:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.dash-curso-row-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-curso-row-icon i { width: 20px; height: 20px; }

.dash-curso-row-info { flex: 1; min-width: 0; }
.dash-curso-row-nome {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-curso-row-meta {
    display: flex;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.dash-curso-row-meta span { display: inline-flex; align-items: center; gap: 4px; }

.dash-curso-row-acao {
    background: var(--primary);
    color: #fff;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    flex-shrink: 0;
}

/* Card "Pedidos Adicionais" */
.dash-pedidos-lista {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dash-pedido-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: #fff;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.92rem;
    transition: all var(--transition);
    text-decoration: none;
}

.dash-pedido-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(139, 92, 246, 0.3);
}

.dash-pedido-btn i { width: 18px; height: 18px; }

/* Empty state amigável */
.dash-empty {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
}

.dash-empty i {
    width: 36px;
    height: 36px;
    color: var(--border);
    margin-bottom: 8px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }

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

    .main-content {
        margin-left: 0;
    }

    body.sidebar-collapsed .main-content {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .top-header {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 14px;
    }

    .top-header-search {
        order: 3;
        flex-basis: 100%;
        max-width: none;
    }

    .submenu {
        flex-wrap: wrap;
    }

    .content-area {
        padding: 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .cursos-grid {
        grid-template-columns: 1fr;
    }

    .modal-overlay { padding: 4px; }
    .modal-header-bar { flex-wrap: wrap; gap: 4px; }
}

/* ============================================================
   Curso — pagina de detalhe (/curso/{slug})
   ============================================================ */
.curso-header-card { padding: 0; overflow: hidden; }
.curso-header-row {
    display: flex;
    gap: 22px;
    align-items: stretch;
    padding: 22px 24px;
}
.curso-header-img {
    width: 180px;
    height: 180px;
    border-radius: 14px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f3f4f6;
}
.curso-header-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.curso-header-info h2 { margin: 0; font-size: 1.45rem; line-height: 1.25; }
.curso-header-meta {
    margin: 0;
    font-size: 0.92rem;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.curso-header-pitch {
    margin: 4px 0 8px 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}
.curso-header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
}

.curso-conteudo-card { margin-top: 14px; }
.curso-conteudo-lista {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 8px 18px;
}
.curso-conteudo-lista li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.92rem;
    color: var(--text);
    line-height: 1.4;
}
.curso-conteudo-lista li i {
    width: 16px; height: 16px; flex-shrink: 0;
    color: var(--success); margin-top: 2px;
}

.curso-info-card { margin-top: 14px; }
.curso-info-msg {
    margin: 0; display: flex; gap: 8px; align-items: flex-start;
    color: var(--text-muted); font-size: 0.9rem;
}
.curso-info-msg i { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }

.btn-light-danger {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.btn-light-danger:hover {
    background: #fecaca;
    color: #991b1b;
}

/* ============================================================
   Lista de certificados emitidos / cursos concluidos
   ============================================================ */
.cert-emitidos-lista {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}
@media (min-width: 900px) {
    .cert-emitidos-lista { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.cert-emitido-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}
.cert-emitido-header {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.cert-emitido-titulo {
    flex: 1;
    min-width: 0;
}
.cert-emitido-titulo strong {
    display: block;
    font-size: 1rem;
    line-height: 1.3;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    display: -webkit-box;
}
.cert-emitido-nome {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.cert-emitido-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
    background: #f8fafc;
    padding: 10px 12px;
    border-radius: 8px;
}
.cert-emitido-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.2;
}
.cert-emitido-info span {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.cert-emitido-info strong {
    font-size: 0.92rem;
    color: var(--text);
    font-weight: 600;
}
.cert-emitido-rodape {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
}
.cert-emitido-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.cert-emitido-tag {
    font-size: 0.72rem;
    color: var(--text-muted);
    background: #f8fafc;
    border-radius: 6px;
    padding: 3px 8px;
}
.cert-emitido-rodape .btn-sm i { width: 14px; height: 14px; }

/* ============================================================
   Cobranca de Certificados (/certificados/solicitar + /pagar)
   ============================================================ */

/* Lista de pendentes-pagaveis (em /certificados) */
.cert-pagaveis-card { border: 2px solid #fde68a; background: #fffbeb; }
.cert-pagaveis-card .card-title { color: #92400e; }
.cert-pagaveis-tip {
    margin: 0 0 14px 0;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    line-height: 1.45;
}
.cert-pagaveis-tip i { width: 16px; height: 16px; color: var(--warning); flex-shrink: 0; margin-top: 2px; }
.cert-pagaveis-tip strong { color: var(--text); }

.cert-pagaveis-lista { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.cert-pagavel-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--transition);
}
.cert-pagavel-item:hover { border-color: var(--primary); }
.cert-pagavel-item:has(.cert-pagavel-check:checked) {
    border-color: var(--primary);
    background: #eff6ff;
}
.cert-pagavel-check {
    width: 20px; height: 20px;
    flex-shrink: 0;
    accent-color: var(--primary);
}
.cert-pagavel-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: #fef3c7;
    color: #d97706;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.cert-pagavel-icon i { width: 18px; height: 18px; }
.cert-pagavel-info { flex: 1; min-width: 0; }
.cert-pagavel-info strong {
    display: block;
    font-size: 0.95rem;
    line-height: 1.3;
    margin-bottom: 4px;
}
.cert-pagavel-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.78rem;
    color: var(--text-muted);
}
.cert-pagavel-meta i { width: 12px; height: 12px; vertical-align: -1px; }
.cert-pagavel-tag {
    flex-shrink: 0;
    font-size: 0.72rem;
    color: var(--text-muted);
    background: #f8fafc;
    border-radius: 6px;
    padding: 3px 8px;
}

.cert-pagaveis-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
}
.cert-pagaveis-actions .btn-lg { padding: 12px 20px; font-size: 1rem; }
.cert-pagaveis-actions .btn:disabled { opacity: 0.5; cursor: not-allowed; }
@media (max-width: 600px) {
    .cert-pagaveis-actions { flex-direction: column; align-items: stretch; }
    .cert-pagaveis-actions .btn { width: 100%; justify-content: center; }
}

/* Pagina /certificados/solicitar */
.cert-solicitar-card { padding: 0; overflow: hidden; }
.cert-solicitar-titulo {
    margin: 0;
    padding: 22px 24px 16px 24px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, #f0fdf4, #dbeafe);
}
.cert-solicitar-titulo i { width: 26px; height: 26px; color: var(--success); }

.cert-solicitar-itens { padding: 16px 24px; display: flex; flex-direction: column; gap: 6px; }
.cert-solicitar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 10px;
    font-size: 0.92rem;
}
.cert-solicitar-item i { width: 18px; height: 18px; color: var(--success); flex-shrink: 0; }
.cert-solicitar-item strong { display: block; font-size: 0.95rem; }
.cert-solicitar-item small { color: var(--text-muted); font-size: 0.8rem; }

.cert-solicitar-subtitulo {
    margin: 8px 24px 12px 24px;
    font-size: 1rem;
    color: var(--text);
}
.cert-solicitar-form { padding: 0 24px 24px 24px; }

.cert-tipos { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.cert-tipo {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}
.cert-tipo:hover { border-color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow); }
.cert-tipo input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.cert-tipo-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    background: #eef2ff;
    color: var(--primary);
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.cert-tipo-impresso .cert-tipo-icon { background: #fef3c7; color: #d97706; }
.cert-tipo-icon i { width: 28px; height: 28px; }
.cert-tipo-info { flex: 1; min-width: 0; }
.cert-tipo-info strong {
    display: block;
    font-size: 1.05rem;
    line-height: 1.3;
    margin-bottom: 4px;
}
.cert-tipo-info p {
    margin: 0 0 8px 0;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--text-muted);
}
.cert-tipo-valor {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.cert-tipo-valor small { color: var(--text-muted); font-size: 0.78rem; }
.cert-tipo-valor strong {
    font-size: 1.4rem;
    color: var(--primary);
    font-weight: 700;
}
.cert-tipo-impresso .cert-tipo-valor strong { color: #d97706; }

.cert-tipo-check {
    flex-shrink: 0;
    color: var(--success);
    opacity: 0;
    transform: scale(0.6);
    transition: all var(--transition);
}
.cert-tipo-check i { width: 26px; height: 26px; }
.cert-tipo:has(input[type=radio]:checked) {
    border-color: var(--primary);
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
.cert-tipo:has(input[type=radio]:checked) .cert-tipo-check { opacity: 1; transform: scale(1); }
.cert-tipo-impresso:has(input[type=radio]:checked) {
    border-color: var(--warning);
    background: #fffbeb;
    box-shadow: 0 0 0 3px rgba(245,158,11,0.12);
}

.cert-solicitar-acoes {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}
@media (max-width: 600px) {
    .cert-solicitar-acoes { flex-direction: column-reverse; }
    .cert-solicitar-acoes .btn { width: 100%; justify-content: center; }
}

/* Pagina /certificados/pagar */
.cert-pagar-resumo { padding: 0; overflow: hidden; }
.cert-pagar-resumo h2 {
    margin: 0;
    padding: 20px 24px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
}
.cert-pagar-resumo h2 i { width: 22px; height: 22px; color: var(--success); }
.cert-pagar-itens { padding: 12px 24px; display: flex; flex-direction: column; gap: 8px; }
.cert-pagar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
}
.cert-pagar-item i { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; }
.cert-pagar-item-info { flex: 1; min-width: 0; }
.cert-pagar-item-info strong { display: block; font-size: 0.92rem; line-height: 1.3; }
.cert-pagar-item-info small { color: var(--text-muted); font-size: 0.78rem; }
.cert-pagar-item-valor {
    flex-shrink: 0;
    font-weight: 700;
    color: var(--text);
}

.cert-pagar-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 16px 24px;
    background: #f0fdf4;
    border-top: 2px solid #86efac;
    font-size: 1.05rem;
}
.cert-pagar-total strong { color: var(--success); font-size: 1.5rem; font-weight: 700; }

.cert-pagar-banner { margin-top: 14px; }
.cert-pagar-info {
    margin-top: 14px;
    padding: 14px 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    color: #1e3a8a;
}
.cert-pagar-info p { margin: 0; display: flex; gap: 8px; font-size: 0.88rem; line-height: 1.5; align-items: flex-start; }
.cert-pagar-info i { width: 16px; height: 16px; color: var(--primary); flex-shrink: 0; margin-top: 2px; }

/* ============================================================
   Avaliacao Online (/curso/avaliacao)
   ============================================================ */

/* Banner de resultado (aprovado/reprovado) na pagina /curso/{slug} */
.aval-resultado {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 22px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 14px;
    border: 2px solid transparent;
}
.aval-resultado-icon {
    width: 56px; height: 56px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.aval-resultado-icon i { width: 28px; height: 28px; }
.aval-resultado-info { flex: 1; min-width: 0; }
.aval-resultado-info h3 { margin: 0 0 6px 0; font-size: 1.25rem; line-height: 1.2; }
.aval-resultado-info p { margin: 0 0 14px 0; line-height: 1.5; }
.aval-resultado-acoes { display: flex; flex-wrap: wrap; gap: 8px; }

.aval-resultado-aprovado {
    background: #f0fdf4;
    border-color: #86efac;
    color: #14532d;
}
.aval-resultado-aprovado .aval-resultado-icon {
    background: var(--success);
    color: #fff;
}
.aval-resultado-aprovado h3 { color: #14532d; }
.aval-resultado-aprovado strong { color: #14532d; }

.aval-resultado-reprovado {
    background: #fef2f2;
    border-color: #fecaca;
    color: #7f1d1d;
}
.aval-resultado-reprovado .aval-resultado-icon {
    background: var(--danger);
    color: #fff;
}
.aval-resultado-reprovado h3 { color: #7f1d1d; }
.aval-resultado-reprovado strong { color: #7f1d1d; }

@media (max-width: 600px) {
    .aval-resultado { flex-direction: column; }
    .aval-resultado-acoes .btn { width: 100%; justify-content: center; }
}


/* Bloqueios (ja aprovado / pendente / sem avaliacao) */
.aval-bloqueio {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 8px 4px;
}
.aval-bloqueio-icon {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: #eef2ff;
    color: var(--primary);
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.aval-bloqueio-icon i { width: 28px; height: 28px; }
.aval-bloqueio h2 { margin: 0 0 6px 0; font-size: 1.25rem; }
.aval-bloqueio p { margin: 0 0 14px 0; color: var(--text-muted); line-height: 1.5; }
.aval-bloqueio-ok .aval-bloqueio-icon { background: #f0fdf4; color: var(--success); }
.aval-bloqueio-pendente .aval-bloqueio-icon { background: #fffbeb; color: var(--warning); }

/* Header da avaliacao */
.aval-header-card { padding: 0; overflow: hidden; }
.aval-header {
    display: flex;
    gap: 16px;
    padding: 22px 24px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    align-items: center;
}
.aval-header-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    background: rgba(255,255,255,0.22);
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.aval-header-icon i { width: 28px; height: 28px; }
.aval-header-info { flex: 1; min-width: 0; }
.aval-header-tag {
    display: inline-block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(255,255,255,0.22);
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 6px;
    font-weight: 600;
}
.aval-header-info h2 { margin: 0 0 6px 0; font-size: 1.4rem; color: #fff; line-height: 1.25; }
.aval-header-info p { margin: 0; font-size: 0.92rem; color: rgba(255,255,255,0.92); line-height: 1.5; }

.aval-instrucoes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    padding: 16px 20px;
}
.aval-instrucao-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.aval-instrucao-item i { width: 22px; height: 22px; color: var(--primary); flex-shrink: 0; }
.aval-instrucao-item strong { color: var(--text); display: block; }

/* Form e perguntas */
.aval-form { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }

.aval-pergunta-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 18px 20px;
    transition: border-color var(--transition);
}
.aval-pergunta-card.is-respondida {
    border-color: #86efac;
    background: #f8fffa;
}
.aval-pergunta-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}
.aval-pergunta-num {
    flex-shrink: 0;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.95rem;
}
.aval-pergunta-card.is-respondida .aval-pergunta-num { background: var(--success); }
.aval-pergunta-titulo {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.4;
    color: var(--text);
    font-weight: 600;
    flex: 1;
    min-width: 0;
    padding-top: 6px;
}

.aval-alternativas {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.aval-alternativa {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    background: #fff;
}
.aval-alternativa:hover {
    border-color: var(--primary);
    background: #f8fafc;
}
.aval-alternativa input[type=radio] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.aval-alt-letra {
    width: 28px; height: 28px;
    border: 2px solid var(--border);
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: all var(--transition);
    background: #fff;
}
.aval-alt-texto {
    flex: 1;
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.4;
    padding-top: 2px;
}
.aval-alt-check {
    margin-left: auto;
    color: var(--success);
    opacity: 0;
    transform: scale(0.6);
    transition: all var(--transition);
}
.aval-alt-check i { width: 22px; height: 22px; }

.aval-alternativa:has(input[type=radio]:checked) {
    border-color: var(--primary);
    background: #eff6ff;
}
.aval-alternativa:has(input[type=radio]:checked) .aval-alt-letra {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.aval-alternativa:has(input[type=radio]:checked) .aval-alt-check {
    opacity: 1;
    transform: scale(1);
}

/* Footer com contador + botao concluir */
.aval-footer {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 18px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    bottom: 12px;
}
.aval-footer-msg {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.92rem;
    flex: 1;
    min-width: 220px;
}
.aval-footer-msg i { width: 18px; height: 18px; color: var(--primary); }
.aval-footer-msg.is-completo { color: var(--success); }
.aval-footer-msg.is-completo i { color: var(--success); }
.aval-footer-msg strong { color: var(--text); }
.aval-footer-msg.is-completo strong { color: var(--success); }

@media (max-width: 600px) {
    .aval-pergunta-num { width: 30px; height: 30px; font-size: 0.85rem; }
    .aval-pergunta-titulo { font-size: 0.95rem; padding-top: 3px; }
    .aval-alt-letra { width: 24px; height: 24px; font-size: 0.78rem; }
    .aval-alt-texto { font-size: 0.9rem; }
    .aval-footer { flex-direction: column; align-items: stretch; }
    .aval-footer .btn { width: 100%; justify-content: center; }
}

/* Pagina de conteudo HTML (Moodle alltext) */
.curso-conteudo-html-card { padding: 0; overflow: hidden; }
.curso-conteudo-html-header {
    padding: 22px 26px 14px 26px;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
}
.curso-conteudo-html-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.curso-conteudo-html-breadcrumb i { width: 14px; height: 14px; }
.curso-conteudo-html-breadcrumb a { color: var(--primary); text-decoration: none; }
.curso-conteudo-html-breadcrumb a:hover { text-decoration: underline; }
.curso-conteudo-html-titulo { margin: 0; font-size: 1.5rem; line-height: 1.3; color: var(--text); }
.curso-conteudo-html-body {
    padding: 26px;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text);
}
.curso-conteudo-html-body h1,
.curso-conteudo-html-body h2,
.curso-conteudo-html-body h3 {
    margin: 1.4em 0 0.6em 0;
    line-height: 1.3;
}
.curso-conteudo-html-body h1 { font-size: 1.6rem; }
.curso-conteudo-html-body h2 { font-size: 1.35rem; }
.curso-conteudo-html-body h3 { font-size: 1.15rem; }
.curso-conteudo-html-body p  { margin: 0 0 1em 0; }
.curso-conteudo-html-body ul,
.curso-conteudo-html-body ol { padding-left: 1.4em; margin: 0 0 1em 0; }
.curso-conteudo-html-body li { margin-bottom: 0.4em; }
.curso-conteudo-html-body a  { color: var(--primary); text-decoration: underline; }
.curso-conteudo-html-body a:hover { color: var(--primary-hover); }
.curso-conteudo-html-body img,
.curso-conteudo-html-body video,
.curso-conteudo-html-body iframe {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
.curso-conteudo-html-body table {
    max-width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}
.curso-conteudo-html-body table td,
.curso-conteudo-html-body table th {
    border: 1px solid var(--border);
    padding: 8px 10px;
}
.curso-conteudo-html-body blockquote {
    border-left: 3px solid var(--primary);
    margin: 1em 0;
    padding: 0.4em 1em;
    color: var(--text-muted);
    background: #f8fafc;
}
.curso-conteudo-html-footer {
    padding: 18px 26px;
    border-top: 1px solid var(--border);
    background: #f8fafc;
}
@media (max-width: 700px) {
    .curso-conteudo-html-header { padding: 18px 18px 12px 18px; }
    .curso-conteudo-html-titulo { font-size: 1.25rem; }
    .curso-conteudo-html-body   { padding: 18px; font-size: 0.95rem; }
    .curso-conteudo-html-footer { padding: 14px 18px; }
}

/* Em Andamento — explicaçao + grid de cards */
.aulas-explica {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    margin-bottom: 16px;
}
.aulas-explica i { width: 22px; height: 22px; color: var(--primary); flex-shrink: 0; margin-top: 2px; }
.aulas-explica p {
    margin: 0;
    font-size: 0.92rem;
    color: #1e3a8a;
    line-height: 1.5;
}

.aulas-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}
@media (min-width: 700px) {
    .aulas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1300px) {
    .aulas-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.aula-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    min-width: 0;
}
.aula-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.aula-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
}
.aula-card-icon {
    width: 36px; height: 36px; flex-shrink: 0;
    border-radius: 10px;
    background: #eef2ff;
    color: var(--primary);
    display: inline-flex; align-items: center; justify-content: center;
}
.aula-card-icon i { width: 16px; height: 16px; }
.aula-card-titulo-wrap { flex: 1; min-width: 0; }
.aula-card-nome {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.aula-card-status {
    flex-shrink: 0;
    background: #dbeafe;
    color: #1e40af;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.aula-card-progress-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.aula-progress-bar {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}
.aula-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #10b981);
    border-radius: 999px;
    transition: width 0.3s ease;
}
.aula-progress-horas {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--success);
    flex-shrink: 0;
    min-width: 56px;
    text-align: right;
}

.aula-card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 0.82rem;
    color: var(--text-muted);
    border-top: 1px dashed var(--border);
    padding-top: 10px;
}
.aula-card-foot-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.aula-card-foot-item i { width: 14px; height: 14px; }
.aula-card-foot-item strong { color: var(--text); font-weight: 600; }
.aula-card-foot-item small { color: var(--text-muted); font-size: 0.78rem; }
.aula-card-foot-label { color: var(--text-muted); }
.aula-card-foot-item.is-ok { color: var(--success); }
.aula-card-foot-item.is-ok i,
.aula-card-foot-item.is-ok strong { color: var(--success); }

/* Card de status do curso (em andamento) */
.curso-status-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-top: 14px;
}
.curso-status-header {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #fff;
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.curso-status-icon {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.curso-status-icon i { width: 28px; height: 28px; }
.curso-status-img {
    width: 84px; height: 84px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    background: rgba(255,255,255,0.2);
}
.curso-status-info { flex: 1; min-width: 0; }
.curso-status-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}
.curso-status-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.22);
    color: #fff;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 600;
}
.curso-status-tag-meta {
    background: #fbbf24;
    color: #78350f;
    border: 1px solid #f59e0b;
}
.curso-status-titulo { margin: 0; font-size: 1.3rem; color: #fff; line-height: 1.2; }
.curso-status-sub { margin: 4px 0 0 0; font-size: 0.9rem; color: rgba(255, 255, 255, 0.92); line-height: 1.4; }

@media (max-width: 600px) {
    .curso-status-header { flex-wrap: wrap; gap: 12px; }
    .curso-status-img { width: 64px; height: 64px; }
    .curso-status-titulo { font-size: 1.1rem; }
}

.info-badges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    padding: 18px 20px;
}
.info-badge {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 12px;
    text-align: center;
}
.info-badge-icon { font-size: 1.5rem; line-height: 1; margin-bottom: 4px; }
.info-badge-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}
.info-badge-value { font-size: 1.15rem; font-weight: 700; color: var(--text); }
.info-badge-highlight {
    border: 2px solid var(--success);
    background: #f0fdf4;
}
.info-badge-highlight .info-badge-value { color: var(--success); }

/* CTA "definir meta" (sem meta ainda) */
.curso-meta-cta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 20px 20px 20px;
    padding: 16px;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 12px;
}
.curso-meta-cta-icon {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: #f59e0b;
    color: #fff;
    flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
}
.curso-meta-cta-icon i { width: 22px; height: 22px; }
.curso-meta-cta-info { flex: 1; min-width: 0; color: #92400e; }
.curso-meta-cta-info strong { display: block; font-size: 1rem; margin-bottom: 2px; color: #78350f; }
.curso-meta-cta-info p { margin: 0; font-size: 0.85rem; line-height: 1.4; color: #92400e; }
.curso-meta-cta .btn { flex-shrink: 0; }
@media (max-width: 700px) {
    .curso-meta-cta { flex-wrap: wrap; }
    .curso-meta-cta .btn { width: 100%; justify-content: center; }
}

/* View personalizada por meta */
.curso-meta-view { padding: 18px 22px 22px 22px; }
.curso-meta-resumo {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.curso-meta-resumo-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.curso-meta-resumo-valor {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    margin-right: auto;
}
.curso-meta-edit {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.82rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all var(--transition);
}
.curso-meta-edit:hover { border-color: var(--primary); color: var(--primary); }
.curso-meta-edit i { width: 12px; height: 12px; }

/* Grid 3 colunas: atual / meta / faltam */
.curso-meta-numeros-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}
.curso-meta-bloco {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
}
.curso-meta-bloco-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}
.curso-meta-bloco-valor {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}
.curso-meta-bloco-valor-atual { color: var(--primary); }
.curso-meta-bloco-valor-falta { color: var(--warning); }
.curso-meta-bloco-valor-ok    { color: var(--success); font-size: 1.25rem; }
@media (max-width: 480px) {
    .curso-meta-bloco-valor { font-size: 1.2rem; }
    .curso-meta-bloco-valor-ok { font-size: 1rem; }
}

.curso-meta-progresso {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}
.curso-meta-progresso-bar {
    flex: 1;
    height: 14px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}
.curso-meta-progresso-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #10b981);
    border-radius: 999px;
    transition: width 0.4s ease;
}
.curso-meta-view.is-ok .curso-meta-progresso-fill { background: var(--success); }
.curso-meta-progresso-pct {
    flex-shrink: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 50px;
    text-align: right;
}
.curso-meta-view.is-ok .curso-meta-progresso-pct { color: var(--success); }

/* Rodape "voce definiu Xh, alterar?" */
.curso-meta-rodape {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.curso-meta-rodape i { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; color: var(--text-muted); }
.curso-meta-rodape strong { color: var(--text); }
.curso-meta-rodape-btn {
    background: transparent;
    border: none;
    padding: 0;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    font-size: inherit;
    text-decoration: underline;
}
.curso-meta-rodape-btn:hover { color: var(--primary-hover); }

.curso-meta-msg {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 12px 14px;
    color: #1e3a8a;
    font-size: 0.9rem;
    line-height: 1.45;
}
.curso-meta-msg i { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: var(--primary); }
.curso-meta-msg-ok {
    background: #f0fdf4;
    border-color: #86efac;
    color: #14532d;
}
.curso-meta-msg-ok i { color: var(--success); }

/* Modal de meta */
.quick-modal-card-wide { max-width: 560px; }
.curso-meta-modal-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #86efac;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 10px;
}
.curso-meta-form { margin-top: 12px; }
.curso-meta-presets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}
.curso-meta-preset {
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 10px 6px;
    cursor: pointer;
    text-align: center;
    transition: all var(--transition);
    font-family: inherit;
    color: var(--text);
}
.curso-meta-preset:hover { border-color: var(--primary); background: #eff6ff; }
.curso-meta-preset.is-selected {
    border-color: var(--primary);
    background: #dbeafe;
    color: var(--primary-hover);
}
.curso-meta-preset-num { display: block; font-size: 1.3rem; font-weight: 700; line-height: 1; }
.curso-meta-preset-label { display: block; font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.curso-meta-preset.is-selected .curso-meta-preset-label { color: var(--primary-hover); }

.curso-meta-livre {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 0.9rem;
}
.curso-meta-livre label { font-weight: 500; cursor: pointer; }
.curso-meta-livre input[type="number"] {
    width: 100px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
}
.curso-meta-livre input[type="number"]:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.curso-meta-livre input[type="number"]:invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
}

.curso-meta-hint {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: -6px 0 14px 0;
    line-height: 1.4;
}

.curso-meta-acoes { flex-direction: column; align-items: stretch; gap: 8px; }
@media (min-width: 540px) {
    .curso-meta-acoes { flex-direction: row; justify-content: space-between; }
}

.curso-status-dica { padding: 0 20px 20px 20px; }
.curso-status-dica p {
    margin: 0;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.9rem;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    line-height: 1.45;
}
.curso-status-dica p i { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: #d97706; }

/* Lista de materiais (Moodle) */
.curso-materiais-card { margin-top: 14px; padding: 0; overflow: hidden; }
.curso-materiais-card .card-header {
    padding: 16px 20px;
    margin: 0;
    border-bottom: 1px solid var(--border);
}
.curso-materiais-lista {
    list-style: none;
    margin: 0;
    padding: 0;
}
.curso-material-item {
    border-bottom: 1px solid var(--border);
}
.curso-material-item:last-child { border-bottom: 0; }
.curso-material-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text);
    text-decoration: none;
    transition: background var(--transition);
}
.curso-material-link:hover {
    background: #f8fafc;
    color: var(--primary);
}
.curso-material-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #eef2ff;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.curso-material-icon i { width: 18px; height: 18px; }
.curso-material-nome {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.3;
    word-break: break-word;
}
.curso-material-acao {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    color: var(--text-muted);
    flex-shrink: 0;
    white-space: nowrap;
}
.curso-material-acao i { width: 14px; height: 14px; }
.curso-material-link:hover .curso-material-acao { color: var(--primary); }
.curso-material-item.is-indent .curso-material-icon {
    background: #f1f5f9;
    color: var(--text-muted);
}

.curso-acoes-finais {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 18px;
    padding: 0 4px;
}

/* Modal de confirmacao da avaliacao (5h gate) */
.aval-confirm-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 22px;
    color: #1e3a8a;
}
.aval-confirm-box h3 {
    color: #1e3a8a;
    font-size: 1.1rem;
    margin: 0 0 12px 0;
}
.aval-confirm-box p {
    color: #1e40af;
    line-height: 1.5;
    margin: 0 0 12px 0;
    font-size: 0.95rem;
}
.aval-confirm-dados {
    list-style: none;
    margin: 0 0 14px 0;
    padding: 0;
    font-size: 0.95rem;
    color: #1e40af;
    line-height: 1.7;
}
.aval-confirm-dados strong { color: #1e3a8a; }
.aval-confirm-extra {
    margin: 12px 0 12px 0 !important;
    font-size: 0.95rem !important;
}
.aval-confirm-min {
    margin: 0 0 16px 0 !important;
    font-size: 0.95rem !important;
}
.aval-confirm-btn {
    display: inline-flex;
    width: 100%;
    justify-content: center;
    margin-top: 6px;
    padding: 14px 18px;
    font-size: 1rem;
    background: #8b5cf6;
    border-color: #8b5cf6;
    color: #fff;
}
.aval-confirm-btn:hover {
    background: #7c3aed;
    border-color: #7c3aed;
    color: #fff;
}
.aval-confirm-btn[disabled] {
    background: #a78bfa;
    border-color: #a78bfa;
    color: #fff;
    cursor: not-allowed;
    opacity: 1;
}
.aval-confirm-suporte-txt {
    margin: 18px 0 8px 0 !important;
    font-size: 0.92rem !important;
}
.aval-confirm-btn-suporte {
    margin-bottom: 4px;
}
.aval-confirm-acoes {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}
.curso-acoes-finais .btn-lg {
    padding: 14px 22px;
    font-size: 1.02rem;
}
@media (min-width: 600px) {
    .curso-acoes-finais {
        flex-direction: row;
        justify-content: center;
    }
    .curso-acoes-finais .btn-lg { flex: 0 1 auto; }
}

@media (max-width: 700px) {
    .curso-header-row { flex-direction: column; padding: 18px; }
    .curso-header-img { width: 100%; height: 180px; }
    .curso-header-info h2 { font-size: 1.25rem; }
}

/* ============================================================
   MODULO AFILIADOS — /indique (Indique e Ganhe)
   ============================================================ */

.afil-page { display: flex; flex-direction: column; gap: 20px; }

/* HERO com gradient — gold/teal pra dar vibe de "dinheiro" */
.afil-hero {
    position: relative;
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 50%, #06b6d4 100%);
    color: #fff;
    border-radius: 16px;
    padding: 28px 28px 32px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.25);
}

.afil-hero-bg-deco {
    position: absolute;
    right: -30px;
    top: -30px;
    opacity: 0.10;
    pointer-events: none;
}
.afil-hero-bg-deco i {
    width: 220px;
    height: 220px;
    color: #fff;
}

.afil-hero-content {
    position: relative;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    align-items: center;
    z-index: 1;
}

.afil-hero-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}
.afil-hero-left h2 {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 8px;
}
.afil-hero-left h2 strong {
    background: linear-gradient(90deg, #fde047, #facc15);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.afil-hero-left h2 small {
    display: inline-block;
    font-size: 0.65em;
    font-weight: 500;
    opacity: 0.85;
    margin-left: 4px;
    vertical-align: middle;
}
.afil-hero-left p {
    font-size: 0.95rem;
    opacity: 0.92;
    line-height: 1.5;
    margin: 0;
}

/* Saldos do hero */
.afil-hero-saldos {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.afil-saldo {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.afil-saldo-label {
    font-size: 0.78rem;
    opacity: 0.88;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.afil-saldo-valor {
    font-size: 1.4rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.afil-saldo-disponivel { background: rgba(34, 197, 94, 0.25); border-color: rgba(74, 222, 128, 0.4); }
.afil-saldo-disponivel .afil-saldo-valor { color: #fef9c3; }
.afil-saldo-pendente .afil-saldo-valor { color: #fbcfe8; }
.afil-saldo-total .afil-saldo-valor { color: #ffffff; }

.afil-saldo-btn {
    width: 100%;
    margin-top: 8px;
    background: #fff !important;
    color: #047857 !important;
    border: none;
    font-weight: 700;
}
.afil-saldo-btn:hover { background: #ecfdf5 !important; }
.afil-saldo-btn i { width: 14px; height: 14px; }

@media (max-width: 800px) {
    .afil-hero-content { grid-template-columns: 1fr; gap: 18px; }
    .afil-hero-bg-deco i { width: 140px; height: 140px; }
}

/* Card do link */
.afil-card-link { padding: 20px 22px; }
.afil-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}
.afil-card-header h3 {
    font-size: 1.08rem;
    font-weight: 700;
    margin: 0;
}
.afil-link-personalizar {
    background: transparent;
    border: 1px dashed var(--primary);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.afil-link-personalizar:hover { background: rgba(59, 130, 246, 0.06); }
.afil-link-personalizar i { width: 14px; height: 14px; }

.afil-link-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.afil-link-url {
    flex: 1;
    min-width: 280px;
    background: #f3f4f6;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    word-break: break-all;
    overflow: hidden;
}
.afil-btn-copiar {
    flex-shrink: 0;
    white-space: nowrap;
}
.afil-btn-copiar i { width: 14px; height: 14px; }

.afil-link-share {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.afil-share-btn {
    flex: 1;
    min-width: 200px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition);
}
.afil-share-btn:hover { border-color: var(--primary); }
.afil-share-btn i { width: 16px; height: 16px; }
.afil-share-wpp {
    background: #25D366;
    color: #fff;
    border-color: #25D366;
}
.afil-share-wpp:hover { background: #1fb955; border-color: #1fb955; color: #fff; }

.afil-link-hint {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
    text-align: center;
}

/* Grid de stats */
.afil-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}
.afil-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all var(--transition);
}
.afil-stat-card:hover { box-shadow: var(--shadow); }
.afil-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.afil-stat-icon i { width: 22px; height: 22px; color: #fff; }
.afil-icon-azul    { background: #3b82f6; }
.afil-icon-verde   { background: #22c55e; }
.afil-icon-laranja { background: #f97316; }
.afil-icon-roxo    { background: #8b5cf6; }
.afil-stat-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.afil-stat-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
.afil-stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Cols (indicados + saques) */
.afil-cols {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 20px;
}
@media (max-width: 900px) { .afil-cols { grid-template-columns: 1fr; } }

.afil-empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-muted);
}
.afil-empty i { width: 40px; height: 40px; opacity: 0.4; margin-bottom: 12px; }
.afil-empty p { margin: 0; font-size: 0.9rem; }

/* Linhas de indicados */
.afil-indicados-lista { display: flex; flex-direction: column; gap: 6px; }
.afil-indicado-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    transition: background var(--transition);
}
.afil-indicado-row:hover { background: #f9fafb; }
.afil-indicado-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.afil-indicado-info { flex: 1; min-width: 0; }
.afil-indicado-nome {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.afil-indicado-meta {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.afil-indicado-valor {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}
.afil-indicado-valor strong {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.afil-status-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}
.afil-status-tag i { width: 12px; height: 12px; }
.afil-tag-aguard    { background: #f3f4f6; color: #6b7280; }
.afil-tag-pendente  { background: #fef3c7; color: #92400e; }
.afil-tag-liberada  { background: #d1fae5; color: #047857; }
.afil-tag-paga      { background: #dbeafe; color: #1e40af; }
.afil-tag-cancelada { background: #fee2e2; color: #991b1b; }

/* Linhas de saque */
.afil-saques-lista { display: flex; flex-direction: column; gap: 6px; }
.afil-saque-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 10px;
    border-left: 3px solid var(--border);
    background: #f9fafb;
}
.afil-saque-pago { border-left-color: #22c55e; }
.afil-saque-aprovado { border-left-color: #f59e0b; }
.afil-saque-solicitado { border-left-color: #6b7280; }
.afil-saque-recusado, .afil-saque-cancelado { border-left-color: #ef4444; }

.afil-saque-data {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.afil-saque-valores { display: flex; flex-direction: column; gap: 2px; }
.afil-saque-valores strong { font-size: 0.95rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.afil-saque-valores small { font-size: 0.72rem; color: var(--text-muted); }
.afil-saque-status {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    text-align: right;
    white-space: nowrap;
}
.afil-saque-status-pago        { background: #d1fae5; color: #047857; }
.afil-saque-status-aprovado    { background: #fef3c7; color: #92400e; }
.afil-saque-status-solicitado  { background: #f3f4f6; color: #4b5563; }
.afil-saque-status-recusado,
.afil-saque-status-cancelado   { background: #fee2e2; color: #991b1b; }

/* Modal de saque + personalizar (mesmo padrao do quick-modal) */
.afil-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
    padding: 16px;
}
.afil-modal[hidden] { display: none; }
.afil-modal-card {
    background: #fff;
    border-radius: 14px;
    padding: 28px 28px 24px;
    max-width: 440px;
    width: 100%;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.18s ease;
}
.afil-modal-card h3 { margin: 0 0 12px; font-size: 1.15rem; }
.afil-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.afil-modal-close:hover { background: var(--bg); color: var(--text); }
.afil-modal-resumo {
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 16px;
}
.afil-modal-resumo small { display: block; font-size: 0.76rem; color: var(--text-muted); margin-top: 2px; }
.afil-modal-liquido { color: #047857; font-size: 1.05rem; }
.afil-modal-acoes { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* Item de menu — Indique e Ganhe (sidebar) */
.nav-badge-money {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #78350f;
    font-weight: 800;
    font-size: 0.7rem;
    padding: 0 6px;
    border-radius: 999px;
    margin-left: 4px;
}
.nav-item-promo .nav-badge-money { animation: moneyPulse 2.4s ease-in-out infinite; }
@keyframes moneyPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
    50%      { transform: scale(1.08); box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.25); }
}

/* Badge de saldo na dashboard principal */
.dash-afil-badge {
    background: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
    color: #fff;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.18);
    text-decoration: none;
    transition: transform var(--transition), box-shadow var(--transition);
}
.dash-afil-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(124, 58, 237, 0.25);
    color: #fff;
}
.dash-afil-badge-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dash-afil-badge-icon i { width: 22px; height: 22px; color: #fef9c3; }
.dash-afil-badge-info { flex: 1; }
.dash-afil-badge-titulo { font-weight: 700; font-size: 1rem; }
.dash-afil-badge-sub { font-size: 0.82rem; opacity: 0.92; margin-top: 2px; }
.dash-afil-badge-arrow i { width: 22px; height: 22px; opacity: 0.85; }
/* Aliases ativos (codigos antigos do aluno que ainda funcionam) */
.afil-aliases {
    margin-top: 14px;
    padding: 12px 14px;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 10px;
}
.afil-aliases-titulo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #4b5563;
    margin-bottom: 10px;
}
.afil-aliases-titulo i { width: 14px; height: 14px; }
.afil-aliases-lista {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
.afil-alias-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
}
.afil-alias-item code {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--text);
    background: transparent;
    padding: 0;
}
.afil-alias-item span {
    color: var(--text-muted);
    font-size: 0.74rem;
}

/* Regras de troca dentro do modal personalizar */
.afil-modal-regras {
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.afil-regra {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.afil-regra i { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; margin-top: 2px; }
.afil-regra strong { display: block; font-size: 0.85rem; color: var(--text); margin-bottom: 2px; }
.afil-regra small { color: var(--text-muted); font-size: 0.78rem; }
.afil-regra-alerta {
    display: block;
    color: #b91c1c;
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 2px;
}

.dash-afil-valor {
    display: inline-block;
    background: rgba(34, 197, 94, 0.3);
    color: #d1fae5;
    padding: 1px 8px;
    border-radius: 6px;
    font-weight: 800;
    margin-left: 4px;
    border: 1px solid rgba(74, 222, 128, 0.5);
    font-variant-numeric: tabular-nums;
    font-size: 0.92em;
}

/* Hero stat: variante "ganhos indicando" — gradient verde dinheiro com icone branco */
.hero-stat-ganhos {
    background: linear-gradient(135deg, #059669 0%, #10b981 60%, #34d399 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    color: #fff !important;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
}
.hero-stat-ganhos::before {
    content: "";
    position: absolute;
    right: -20px; top: -20px;
    width: 90px; height: 90px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 70%);
    pointer-events: none;
}
.hero-stat-ganhos i {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.18);
    width: 32px; height: 32px;
    border-radius: 8px;
    padding: 6px;
    box-sizing: border-box;
}
.hero-stat-ganhos .hero-stat-num {
    color: #fff !important;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.hero-stat-ganhos .hero-stat-label {
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 600;
}
.hero-stat-ganhos:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(5, 150, 105, 0.4);
    border-color: rgba(255, 255, 255, 0.6);
}

/* ============================================================
   Carteira de Estudante (/carteira)
   ============================================================ */

/* Banner de status (carteira em aberto) */
.cart-status-card { padding: 0; overflow: hidden; }
.cart-status-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 22px;
}
.cart-status-icon {
    width: 56px; height: 56px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.cart-status-icon i { width: 28px; height: 28px; }
.cart-status-icon.badge-warning { background: #fef3c7; color: #92400e; }
.cart-status-icon.badge-info    { background: #dbeafe; color: #1e3a8a; }
.cart-status-icon.badge-success { background: #f0fdf4; color: var(--success); }
.cart-status-info { flex: 1; min-width: 0; }
.cart-status-info h2 { margin: 0 0 6px 0; font-size: 1.2rem; line-height: 1.25; }
.cart-status-info p  { margin: 0 0 12px 0; color: var(--text-muted); line-height: 1.5; font-size: 0.95rem; }

/* CTA pra solicitar/renovar */
.cart-cta-card { padding: 0; overflow: hidden; }
.cart-cta-row {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 24px;
}
.cart-cta-icon {
    width: 64px; height: 64px;
    background: var(--primary);
    color: #fff;
    border-radius: 16px;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.cart-cta-icon i { width: 32px; height: 32px; }
.cart-cta-info { flex: 1; min-width: 0; }
.cart-cta-info h2 { margin: 0 0 6px 0; font-size: 1.3rem; line-height: 1.2; }
.cart-cta-info p  { margin: 0 0 12px 0; color: var(--text-muted); line-height: 1.5; }
.cart-cta-valor {
    margin: 0 0 14px 0;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 6px 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.cart-cta-valor-label { color: var(--text-muted); font-size: 0.85rem; }
.cart-cta-valor strong { color: var(--success); font-size: 1.2rem; font-weight: 700; }
.cart-cta-valor small { color: var(--text-muted); font-size: 0.78rem; }

@media (max-width: 600px) {
    .cart-cta-row { flex-direction: column; align-items: stretch; gap: 12px; padding: 18px; }
    .cart-cta-icon { align-self: flex-start; }
    .cart-cta-info .btn { width: 100%; justify-content: center; }
}

/* Historico de carteiras */
.cart-historico { display: flex; flex-direction: column; gap: 0; }
.cart-historico-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.cart-historico-item:last-child { border-bottom: 0; }
.cart-historico-foto {
    width: 70px;
    height: 88px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    flex-shrink: 0;
    background: #f1f5f9;
}
.cart-historico-foto-vazia {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}
.cart-historico-foto-vazia i { width: 28px; height: 28px; }
.cart-historico-info { flex: 1; min-width: 0; }
.cart-historico-meta {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin-bottom: 4px;
    font-size: 0.82rem;
}
.cart-historico-meta .badge {
    display: inline-flex; align-items: center; gap: 4px;
}
.cart-historico-nome {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 4px;
}
.cart-historico-detalhes {
    display: flex; flex-wrap: wrap; gap: 12px;
    font-size: 0.82rem;
    color: var(--text-muted);
}
.cart-historico-detalhes span { display: inline-flex; align-items: center; gap: 4px; }
.cart-historico-detalhes i { width: 13px; height: 13px; }
.cart-historico-endereco {
    margin-top: 4px;
    font-size: 0.82rem;
    color: var(--text-muted);
    display: flex;
    align-items: flex-start;
    gap: 4px;
    line-height: 1.45;
}
.cart-historico-endereco i { width: 13px; height: 13px; flex-shrink: 0; margin-top: 2px; }
.cart-historico-info-extra {
    margin-top: 8px;
    padding: 8px 10px;
    background: #fef9c3;
    border-left: 3px solid #facc15;
    border-radius: 6px;
    font-size: 0.83rem;
    color: #713f12;
    line-height: 1.45;
}
.cart-historico-info-extra-info {
    background: #eff6ff;
    border-left-color: #3b82f6;
    color: #1e3a8a;
}
.cart-historico-acoes {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

/* Formulario de solicitacao */
.cart-form-card { padding: 24px; }
.cart-form-titulo {
    margin: 0 0 6px 0;
    font-size: 1.3rem;
    display: flex; align-items: center; gap: 10px;
}
.cart-form-titulo i { width: 24px; height: 24px; color: var(--primary); }
.cart-form-sub { margin: 0 0 20px 0; color: var(--text-muted); line-height: 1.5; }

.cart-fieldset {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 18px 18px 18px;
    margin: 0 0 16px 0;
}
.cart-fieldset legend {
    padding: 0 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cart-foto-anterior {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 12px;
}
.cart-foto-thumb {
    width: 70px;
    height: 88px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    flex-shrink: 0;
}
.cart-foto-reusar {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.92rem;
    line-height: 1.4;
}
.cart-foto-reusar input { width: 18px; height: 18px; cursor: pointer; }

.cart-foto-upload { margin: 0; }
.cart-foto-uploader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 28px 16px;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}
.cart-foto-uploader:hover {
    background: #eef2ff;
    border-color: var(--primary);
}
.cart-foto-uploader i { width: 32px; height: 32px; color: var(--primary); }
.cart-foto-uploader strong { font-size: 0.95rem; color: var(--text); }
.cart-foto-uploader small { color: var(--text-muted); font-size: 0.8rem; }
.cart-foto-upload input[type=file] { display: none; }
.cart-foto-upload-disabled .cart-foto-uploader {
    opacity: 0.5;
    pointer-events: none;
}
.cart-foto-preview {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #f0fdf4;
    border-radius: 8px;
}
.cart-foto-preview img {
    width: 70px; height: 88px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #86efac;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px 12px;
}
.form-grid .form-group { margin: 0; grid-column: span 6; }
.form-grid .form-group-cep    { grid-column: span 2; }
.form-grid .form-group-rua    { grid-column: span 4; }
.form-grid .form-group-num    { grid-column: span 2; }
.form-grid .form-group-cidade { grid-column: span 4; }
.form-grid .form-group-uf     { grid-column: span 2; }
@media (min-width: 700px) {
    .cart-fieldset:nth-of-type(2) .form-grid .form-group:first-child { grid-column: span 4; } /* nome */
    .cart-fieldset:nth-of-type(2) .form-grid .form-group:last-child  { grid-column: span 2; } /* nasc */
}
@media (max-width: 600px) {
    .form-grid { grid-template-columns: repeat(2, 1fr); }
    .form-grid .form-group,
    .form-grid .form-group-rua,
    .form-grid .form-group-cidade { grid-column: span 2; }
    .form-grid .form-group-cep,
    .form-grid .form-group-num,
    .form-grid .form-group-uf { grid-column: span 1; }
}

.cart-form-resumo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: #f0fdf4;
    border: 2px solid #86efac;
    border-radius: 10px;
}
.cart-form-resumo > div { display: flex; align-items: baseline; gap: 6px; }
.cart-form-resumo span  { color: var(--text-muted); }
.cart-form-resumo strong { color: var(--success); font-size: 1.4rem; font-weight: 700; }
.cart-form-resumo small  { color: var(--text-muted); font-size: 0.78rem; }

@media (max-width: 600px) {
    .cart-form-resumo { flex-direction: column; align-items: stretch; }
    .cart-form-resumo .btn { width: 100%; justify-content: center; }
}

/* Opcoes na CTA da 1a solicitacao (brinde vs pago) */
.cart-opcoes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}
.cart-opcao {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 2px solid var(--border);
    background: #fff;
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
}
.cart-opcao:hover {
    border-color: var(--primary);
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}
.cart-opcao-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.cart-opcao-icon i { width: 24px; height: 24px; }
.cart-opcao-brinde .cart-opcao-icon { background: #f0fdf4; color: var(--success); }
.cart-opcao-pago   .cart-opcao-icon { background: #eff6ff; color: var(--primary); }

.cart-opcao-info { flex: 1; min-width: 0; }
.cart-opcao-info strong {
    display: block;
    font-size: 1rem;
    line-height: 1.2;
    margin-bottom: 2px;
}
.cart-opcao-preco {
    display: inline-block;
    font-weight: 700;
    font-size: 0.95rem;
    margin: 2px 0 4px;
}
.cart-opcao-brinde .cart-opcao-preco { color: var(--success); }
.cart-opcao-pago   .cart-opcao-preco { color: var(--primary); }
.cart-opcao-preco small { font-weight: 400; color: var(--text-muted); font-size: 0.78rem; }
.cart-opcao-info small {
    display: block;
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.4;
}
.cart-opcao-seta {
    width: 20px; height: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
}
.cart-opcao:hover .cart-opcao-seta { color: var(--primary); }

@media (max-width: 600px) {
    .cart-opcao { padding: 12px; gap: 10px; }
    .cart-opcao-icon { width: 40px; height: 40px; }
    .cart-opcao-icon i { width: 20px; height: 20px; }
}

/* Tabs brinde / pago em /carteira/solicitar */
.cart-modo-switch {
    display: flex;
    gap: 6px;
    padding: 4px;
    background: #f1f5f9;
    border-radius: 10px;
    margin: 0 0 18px 0;
    flex-wrap: wrap;
}
.cart-modo-tab {
    flex: 1;
    min-width: 160px;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.cart-modo-tab small { font-weight: 400; color: inherit; opacity: 0.85; }
.cart-modo-tab:hover { background: rgba(255,255,255,0.6); color: var(--text); }
.cart-modo-tab.active {
    background: #fff;
    color: var(--primary);
    font-weight: 600;
    box-shadow: var(--shadow);
}

.cart-btn-preco {
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.22);
    font-size: 0.82rem;
    font-weight: 600;
}

