/* =====================================================================
   CorbanPro — tema dos painéis (assinante, admin e parceiro)  v2
   ===================================================================== */
:root {
    --cp-primary: #5b4cf0;
    --cp-primary-600: #4a3bd8;
    --cp-primary-2: #8b5cf6;
    --cp-primary-50: #f0eeff;
    --cp-primary-100: #e3dfff;
    --cp-accent: #10b981;
    --cp-bg: #f3f4fa;
    --cp-surface: #ffffff;
    --cp-border: #e9ebf3;
    --cp-border-2: #dfe3ee;
    --cp-text: #0d1330;
    --cp-text-2: #3b4263;
    --cp-muted: #6b7290;
    --cp-sidebar: #0e1124;
    --cp-sidebar-2: #161a35;
    --cp-radius: 20px;
    --cp-radius-sm: 12px;
    --cp-shadow: 0 1px 2px rgba(13, 19, 48, .04), 0 12px 32px -14px rgba(13, 19, 48, .14);
    --cp-shadow-lg: 0 30px 70px -24px rgba(13, 19, 48, .28);
    --cp-grad: linear-gradient(135deg, #6d5efc 0%, #8b5cf6 55%, #a855f7 100%);
    --cp-sidebar-w: 268px;
    --bs-primary: #5b4cf0;
    --bs-primary-rgb: 91, 76, 240;
    --bs-link-color: #5b4cf0;
    --bs-link-color-rgb: 91, 76, 240;
    --bs-link-hover-color: #4a3bd8;
    --bs-body-font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    --bs-body-color: #0d1330;
    --bs-border-color: #e9ebf3;
}
/* Tema do admin MagoWeb: verde-azulado */
body.tema-admin {
    --cp-primary: #0ea5a4; --cp-primary-600: #0b8b8a; --cp-primary-2: #10b981;
    --cp-primary-50: #e6fbf8; --cp-primary-100: #ccf5ef;
    --cp-grad: linear-gradient(135deg, #0ea5a4 0%, #10b981 60%, #34d399 100%);
    --cp-sidebar: #07161a; --cp-sidebar-2: #0b2227;
    --bs-primary: #0ea5a4; --bs-primary-rgb: 14, 165, 164; --bs-link-color: #0b8b8a; --bs-link-color-rgb: 11, 139, 138;
}

html { -webkit-font-smoothing: antialiased; }
body { background: var(--cp-bg); font-family: var(--bs-body-font-family); color: var(--cp-text); font-size: .9rem; letter-spacing: -.005em; }
body.app::before { content: ''; position: fixed; inset: 0 0 auto 0; height: 340px; z-index: -1; pointer-events: none;
    background: radial-gradient(60% 120% at 85% -10%, rgba(139, 92, 246, .13), transparent 60%), radial-gradient(50% 100% at 30% -20%, rgba(91, 76, 240, .10), transparent 60%); }
body.tema-admin.app::before { background: radial-gradient(60% 120% at 85% -10%, rgba(16, 185, 129, .13), transparent 60%), radial-gradient(50% 100% at 30% -20%, rgba(14, 165, 164, .10), transparent 60%); }
a { text-decoration: none; }
.text-muted { color: var(--cp-muted) !important; }
.text-primary { color: var(--cp-primary) !important; }
.fw-medium { font-weight: 500; }
::selection { background: var(--cp-primary-100); }

/* ---------- botões ---------- */
.btn { border-radius: 12px; font-weight: 600; padding: .55rem 1.05rem; font-size: .875rem; transition: all .18s ease; }
.btn-sm { border-radius: 10px; padding: .32rem .75rem; font-size: .8rem; }
.btn-lg { border-radius: 14px; padding: .75rem 1.3rem; font-size: .95rem; }
.btn-primary { background: var(--cp-grad); border: 0; color: #fff; box-shadow: 0 8px 20px -8px rgba(var(--bs-primary-rgb), .7), inset 0 1px 0 rgba(255,255,255,.18); }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { background: var(--cp-grad) !important; filter: brightness(1.07); transform: translateY(-1px); color: #fff; }
.btn-primary:disabled { opacity: .6; transform: none; }
.btn-success { background: linear-gradient(135deg, #10b981, #059669); border: 0; box-shadow: 0 8px 20px -8px rgba(16, 185, 129, .7); }
.btn-success:hover { filter: brightness(1.06); }
.btn-light { background: #fff; border: 1px solid var(--cp-border-2); color: var(--cp-text-2); }
.btn-light:hover { background: #f8f9fd; border-color: #cfd5e4; color: var(--cp-text); }
.btn-soft { background: var(--cp-primary-50); color: var(--cp-primary); border: 0; }
.btn-soft:hover { background: var(--cp-primary-100); color: var(--cp-primary-600); }
.btn-icon { width: 40px; height: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: #fff; border: 1px solid var(--cp-border); color: var(--cp-text-2); }
.btn-icon:hover { color: var(--cp-primary); border-color: var(--cp-primary-100); }
.btn-acao { width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: var(--cp-muted); background: transparent; border: 0; transition: all .15s; }
.btn-acao:hover { background: var(--cp-primary-50); color: var(--cp-primary); }
.btn-acao.text-danger:hover { background: #fff1f2; color: #e11d48 !important; }
.btn-acao.text-success:hover { background: #ecfdf5; }

/* ---------- layout ---------- */
.app-shell { display: flex; min-height: 100vh; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { padding: 8px 32px 28px; flex: 1; }
.app-footer { padding: 18px 32px 24px; color: var(--cp-muted); font-size: .78rem; }

/* ---------- sidebar flutuante ---------- */
.sidebar { width: var(--cp-sidebar-w); flex-shrink: 0; color: #c3c8de; display: flex; flex-direction: column;
    background: radial-gradient(120% 60% at 0% 0%, rgba(124, 108, 255, .22), transparent 60%), linear-gradient(180deg, var(--cp-sidebar) 0%, var(--cp-sidebar-2) 100%); }
body.tema-admin .sidebar { background: radial-gradient(120% 60% at 0% 0%, rgba(16, 185, 129, .22), transparent 60%), linear-gradient(180deg, var(--cp-sidebar) 0%, var(--cp-sidebar-2) 100%); }
@media (min-width: 992px) {
    .sidebar { position: sticky; top: 12px; height: calc(100vh - 24px); margin: 12px 0 12px 12px; border-radius: 24px; overflow: hidden; box-shadow: var(--cp-shadow-lg); transition: width .22s ease; }
    .sidebar-scroll { overflow-y: auto; flex: 1; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent; }
}
@media (max-width: 991.98px) { .sidebar.offcanvas-lg { --bs-offcanvas-width: 288px; } .sidebar-scroll { overflow-y: auto; flex: 1; } }
.sidebar-brand { display: flex; align-items: center; justify-content: space-between; padding: 22px 20px 12px; }
.brand { display: flex; align-items: center; gap: 11px; color: #fff; font-weight: 800; font-size: 1.12rem; letter-spacing: -.03em; white-space: nowrap; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; color: #fff; font-size: 1.05rem;
    background: var(--cp-grad); box-shadow: 0 8px 22px -6px rgba(var(--bs-primary-rgb), .8), inset 0 1px 0 rgba(255,255,255,.25); }
.brand small { display: block; font-size: .64rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #8d93b0; margin-top: -2px; }
.sidebar-empresa { margin: 6px 14px 6px; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); display: flex; align-items: center; gap: 10px; }
.sidebar-empresa .emp-ini { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: rgba(255,255,255,.1); color: #fff; font-weight: 700; flex-shrink: 0; }
.sidebar-empresa strong { display: block; color: #fff; font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plano-tag { display: inline-flex; align-items: center; gap: 4px; font-size: .68rem; padding: 1px 8px; border-radius: 20px; background: rgba(52, 211, 153, .14); color: #6ee7b7; font-weight: 700; }
.sidebar-nav { padding: 4px 12px 12px; }
.nav-group { color: #6f7593; font-size: .64rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; padding: 16px 12px 6px; white-space: nowrap; }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; color: #aeb4cc; padding: 9px 12px; border-radius: 12px; font-weight: 500; font-size: .86rem; margin-bottom: 2px; transition: all .15s; white-space: nowrap; }
.nav-item i { font-size: 1.06rem; width: 22px; text-align: center; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { color: #fff; background: linear-gradient(90deg, rgba(var(--bs-primary-rgb), .9), rgba(var(--bs-primary-rgb), .55)); box-shadow: 0 10px 24px -10px rgba(var(--bs-primary-rgb), .9); }
.nav-item.active::before { content: ''; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: #fff; }
.nav-badge { margin-left: auto; font-size: .66rem; font-weight: 700; padding: 1px 7px; border-radius: 20px; background: rgba(255,255,255,.12); color: #fff; }
.sidebar-footer { padding: 12px; }
.upgrade-card { border-radius: 16px; padding: 14px; color: #fff; background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), .55), rgba(139, 92, 246, .35)); border: 1px solid rgba(255,255,255,.12); margin-bottom: 8px; }
.upgrade-card small { color: #dfe2f5; }
.upgrade-card .progress { background: rgba(255,255,255,.18); height: 6px; }
.upgrade-card .progress-bar { background: #fff; }

/* sidebar recolhida (desktop) */
@media (min-width: 992px) {
    body.sidebar-mini { --cp-sidebar-w: 84px; }
    body.sidebar-mini .sidebar .brand > span:not(.brand-mark), body.sidebar-mini .sidebar-empresa > div,
    body.sidebar-mini .nav-item span, body.sidebar-mini .nav-group, body.sidebar-mini .upgrade-card, body.sidebar-mini .nav-badge { display: none !important; }
    body.sidebar-mini .sidebar-brand { justify-content: center; padding-left: 0; padding-right: 0; }
    body.sidebar-mini .sidebar-empresa { justify-content: center; padding: 8px; margin: 6px 14px; }
    body.sidebar-mini .nav-item { justify-content: center; padding: 11px 0; }
    body.sidebar-mini .nav-group { height: 10px; }
}

/* ---------- topbar ---------- */
.topbar { display: flex; align-items: center; gap: 12px; padding: 22px 32px 18px; position: sticky; top: 0; z-index: 1020; transition: background .2s; }
.topbar.rolou { background: rgba(243, 244, 250, .82); backdrop-filter: saturate(160%) blur(14px); box-shadow: 0 1px 0 var(--cp-border); padding-top: 14px; padding-bottom: 14px; }
.topbar-title h1 { font-size: 1.45rem; font-weight: 800; margin: 0; letter-spacing: -.035em; }
.topbar-title p { margin: 2px 0 0; color: var(--cp-muted); font-size: .84rem; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.busca-global { position: relative; width: 280px; }
.busca-global i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--cp-muted); }
.busca-global input { padding-left: 40px; border-radius: 14px; background: #fff; border-color: var(--cp-border); height: 42px; }
.busca-global kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: #f1f2f8; color: var(--cp-muted); font-size: .68rem; border-radius: 6px; padding: 2px 6px; box-shadow: none; }
.user-chip { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--cp-border); border-radius: 16px; padding: 4px 12px 4px 4px; height: 42px; }
.user-chip strong { display: block; font-size: .82rem; line-height: 1.1; }
.user-chip small { display: block; color: var(--cp-muted); font-size: .7rem; }
.avatar { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--cp-grad); color: #fff; font-weight: 700; font-size: .82rem; flex-shrink: 0; }
.avatar-lg { width: 60px; height: 60px; font-size: 1.4rem; border-radius: 18px; }
.dropdown-menu { border: 1px solid var(--cp-border); border-radius: 16px; padding: 6px; box-shadow: var(--cp-shadow-lg); }
.dropdown-item { border-radius: 10px; padding: 8px 12px; font-size: .86rem; font-weight: 500; }
.dropdown-item:active { background: var(--cp-primary); }

.trial-bar { display: flex; align-items: center; gap: 12px; margin: 0 32px 6px; padding: 12px 14px 12px 16px; border-radius: 16px; color: #fff; font-weight: 600; font-size: .86rem; position: relative; overflow: hidden; }
.trial-bar::after { content: ''; position: absolute; right: -40px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.1); }
.trial-bar > * { position: relative; z-index: 1; }
.trial-bar .trial-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.18); }
.trial-teste { background: var(--cp-grad); box-shadow: 0 12px 26px -14px rgba(var(--bs-primary-rgb), .9); }
.trial-atrasada, .trial-ativa { background: linear-gradient(135deg, #f59e0b, #f97316); box-shadow: 0 12px 26px -14px rgba(249, 115, 22, .9); }

/* ---------- cards ---------- */
.card { border: 1px solid var(--cp-border); border-radius: var(--cp-radius); box-shadow: var(--cp-shadow); background: var(--cp-surface); }
.card-header { background: transparent; border-bottom: 1px solid var(--cp-border); padding: 16px 22px; display: flex; align-items: center; gap: 12px; }
.card-header:first-child { border-radius: var(--cp-radius) var(--cp-radius) 0 0; }
.card-header h5, .card-header .card-title { margin: 0; font-size: .98rem; font-weight: 700; letter-spacing: -.02em; }
.card-body { padding: 22px; }
.card-footer { background: #fafbfe; border-top: 1px solid var(--cp-border); padding: 14px 22px; }
.card-footer:last-child { border-radius: 0 0 var(--cp-radius) var(--cp-radius); }

/* KPIs */
.kpi { padding: 20px; display: flex; flex-direction: column; gap: 14px; height: 100%; position: relative; overflow: hidden; }
.kpi::after { content: ''; position: absolute; right: -36px; top: -36px; width: 120px; height: 120px; border-radius: 50%; background: var(--cp-primary-50); opacity: .55; }
.kpi > * { position: relative; z-index: 1; }
.kpi-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.2rem; flex-shrink: 0; }
.kpi small { color: var(--cp-muted); font-weight: 600; display: block; font-size: .78rem; }
.kpi strong { display: block; font-size: 1.55rem; font-weight: 800; letter-spacing: -.04em; margin-top: 2px; white-space: nowrap; }
.kpi .kpi-foot { font-size: .76rem; color: var(--cp-muted); margin-top: 4px; }
.kpi-icon.bg-soft-primary { background: linear-gradient(135deg, #7c6dff, #5b4cf0); color: #fff; box-shadow: 0 10px 20px -10px rgba(91, 76, 240, .9); }
.kpi-icon.bg-soft-success { background: linear-gradient(135deg, #34d399, #059669); color: #fff; box-shadow: 0 10px 20px -10px rgba(5, 150, 105, .9); }
.kpi-icon.bg-soft-warning { background: linear-gradient(135deg, #fbbf24, #f97316); color: #fff; box-shadow: 0 10px 20px -10px rgba(249, 115, 22, .9); }
.kpi-icon.bg-soft-danger { background: linear-gradient(135deg, #fb7185, #e11d48); color: #fff; box-shadow: 0 10px 20px -10px rgba(225, 29, 72, .9); }
.kpi-icon.bg-soft-info { background: linear-gradient(135deg, #38bdf8, #0284c7); color: #fff; box-shadow: 0 10px 20px -10px rgba(2, 132, 199, .9); }
.kpi-icon.bg-soft-violet { background: linear-gradient(135deg, #c084fc, #7c3aed); color: #fff; box-shadow: 0 10px 20px -10px rgba(124, 58, 237, .9); }
.bg-soft-primary { background: var(--cp-primary-50); color: var(--cp-primary); }
.bg-soft-success { background: #ecfdf5; color: #047857; }
.bg-soft-warning { background: #fff7ed; color: #c2410c; }
.bg-soft-danger { background: #fff1f2; color: #be123c; }
.bg-soft-info { background: #f0f9ff; color: #0369a1; }
.bg-soft-violet { background: #f5f3ff; color: #6d28d9; }
.bg-grad-sky { background: linear-gradient(135deg, #38bdf8, #2563eb) !important; color: #fff !important; }
.bg-grad-green { background: linear-gradient(135deg, #4ade80, #059669) !important; color: #fff !important; }
.bg-grad-violet { background: linear-gradient(135deg, #c084fc, #6d28d9) !important; color: #fff !important; }

/* ---------- badges ---------- */
.badge { font-weight: 700; padding: .4em .72em; border-radius: 30px; font-size: .7rem; letter-spacing: .01em; }
[class*="badge-soft-"] { display: inline-flex; align-items: center; gap: 6px; }
[class*="badge-soft-"]::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge-soft-primary { background: var(--cp-primary-50); color: var(--cp-primary-600); }
.badge-soft-success { background: #dcfce7; color: #15803d; }
.badge-soft-warning { background: #ffedd5; color: #c2410c; }
.badge-soft-danger { background: #ffe4e6; color: #be123c; }
.badge-soft-info { background: #e0f2fe; color: #0369a1; }
.badge-soft-secondary { background: #eef0f6; color: #555c7a; }
.badge-soft-violet { background: #ede9fe; color: #6d28d9; }

/* ---------- tabelas ---------- */
.table-card { margin: 0; --bs-table-bg: transparent; }
.table-card thead th { background: #f8f9fd; color: var(--cp-muted); font-weight: 700; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid var(--cp-border); padding: 12px 18px; white-space: nowrap; }
.table-card tbody td { padding: 14px 18px; vertical-align: middle; border-color: #f1f2f8; color: var(--cp-text-2); }
.table-card tbody tr { transition: background .12s; }
.table-card tbody tr:hover { background: #fafaff; }
.table-card tbody tr:last-child td { border-bottom: 0; }
.table-card tfoot td { padding: 14px 18px; font-weight: 800; background: #f8f9fd; color: var(--cp-text); border-top: 1px solid var(--cp-border); }
.td-acoes { white-space: nowrap; text-align: right; width: 1%; }
.cell-title { font-weight: 700; color: var(--cp-text); }
a.cell-title:hover { color: var(--cp-primary); }
.cell-sub { color: var(--cp-muted); font-size: .77rem; margin-top: 1px; }
.pagination { gap: 4px; }
.page-link { border-radius: 10px !important; border: 1px solid var(--cp-border); color: var(--cp-text-2); font-weight: 600; min-width: 34px; text-align: center; }
.page-item.active .page-link { background: var(--cp-grad); border-color: transparent; }

/* ---------- filtros / toolbar ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--cp-border); }
.search-box { position: relative; min-width: 240px; flex: 1; max-width: 380px; }
.search-box i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--cp-muted); }
.search-box input { padding-left: 40px; }

/* ---------- formulários ---------- */
.form-control, .form-select { border-radius: 12px; border-color: var(--cp-border-2); padding: .6rem .85rem; font-size: .88rem; background-color: #fbfbfe; color: var(--cp-text); }
.form-control:hover, .form-select:hover { border-color: #cdd3e3; }
.form-control-sm, .form-select-sm { border-radius: 10px; padding: .36rem .7rem; font-size: .8rem; }
.form-control-lg { border-radius: 14px; padding: .75rem 1rem; font-size: .95rem; }
.form-control:focus, .form-select:focus { border-color: var(--cp-primary); background-color: #fff; box-shadow: 0 0 0 4px rgba(var(--bs-primary-rgb), .12); }
.input-group-text { border-radius: 12px; border-color: var(--cp-border-2); background: #f3f4fa; color: var(--cp-muted); font-weight: 600; font-size: .85rem; }
.form-label { font-weight: 600; font-size: .8rem; color: var(--cp-text-2); margin-bottom: .4rem; }
.form-text { color: var(--cp-muted); font-size: .76rem; }
.form-check-input { border-color: #c9cfdf; }
.form-check-input:checked { background-color: var(--cp-primary); border-color: var(--cp-primary); }
.form-check-input:focus { box-shadow: 0 0 0 4px rgba(var(--bs-primary-rgb), .14); }
.form-switch .form-check-input { width: 2.4em; height: 1.3em; margin-top: .1em; }
.form-section { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--cp-primary); font-weight: 800; margin: 10px 0 6px; display: flex; align-items: center; gap: 10px; }
.form-section::after { content: ''; flex: 1; height: 1px; background: var(--cp-border); }
.modal-backdrop.show { opacity: .35; }
.modal-content { border: 0; border-radius: 24px; box-shadow: 0 40px 90px -20px rgba(13, 19, 48, .45); }
.modal-header { border-bottom: 1px solid var(--cp-border); padding: 20px 24px; }
.modal-title { font-weight: 800; letter-spacing: -.02em; }
.modal-body { padding: 24px; }
.modal-footer { border-top: 1px solid var(--cp-border); padding: 14px 24px; background: #fafbfe; border-radius: 0 0 24px 24px; }
.nav-tabs-modern { border-bottom: 1px solid var(--cp-border); gap: 2px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.nav-tabs-modern .nav-link { border: 0; color: var(--cp-muted); font-weight: 600; padding: 14px 14px; border-bottom: 2px solid transparent; white-space: nowrap; font-size: .86rem; }
.nav-tabs-modern .nav-link:hover { color: var(--cp-text); }
.nav-tabs-modern .nav-link.active { color: var(--cp-primary); border-bottom-color: var(--cp-primary); background: transparent; }
.alert { border-radius: 16px; border: 0; font-size: .86rem; }
.alert-light { background: #fff; border: 1px solid var(--cp-border) !important; }
.alert-warning { background: #fff7ed; color: #9a3412; }
.alert-success { background: #ecfdf5; color: #065f46; }
.alert-danger { background: #fff1f2; color: #9f1239; }
.alert-info { background: #f0f9ff; color: #075985; }
.toast { border-radius: 14px; }
code { color: var(--cp-primary-600); }

/* ---------- diversos ---------- */
.empty-state { text-align: center; padding: 56px 20px; color: var(--cp-muted); }
.empty-state > i, .empty-ico { width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; margin: 0 auto 16px; font-size: 2rem;
    background: var(--cp-primary-50); color: var(--cp-primary); box-shadow: inset 0 0 0 8px #fff, 0 0 0 1px var(--cp-primary-100); }
.empty-state h3, .empty-state h5 { color: var(--cp-text); font-weight: 800; letter-spacing: -.02em; }
.progress { height: 8px; border-radius: 8px; background: #eceef6; }
.progress-bar { background: var(--cp-grad); border-radius: 8px; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--cp-border); }
.list-row:last-child { border-bottom: 0; }
.rank { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: .8rem; font-weight: 800; background: #f1f2f8; color: #555c7a; flex-shrink: 0; }
.rank-1 { background: linear-gradient(135deg, #fde68a, #f59e0b); color: #fff; } .rank-2 { background: linear-gradient(135deg, #e2e8f0, #94a3b8); color: #fff; } .rank-3 { background: linear-gradient(135deg, #fed7aa, #ea580c); color: #fff; }
.info-list dt { color: var(--cp-muted); font-weight: 600; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; }
.info-list dd { font-weight: 600; margin-bottom: 14px; color: var(--cp-text); }
.pix-box { text-align: center; }
.pix-box img { width: 240px; height: 240px; border-radius: 20px; border: 1px solid var(--cp-border); padding: 12px; background: #fff; box-shadow: var(--cp-shadow); }
.copy-field { display: flex; gap: 8px; }
.copy-field input { font-family: ui-monospace, monospace; font-size: .76rem; }
.step-dot { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--cp-primary-50); color: var(--cp-primary); font-weight: 800; font-size: .78rem; flex-shrink: 0; }
.tree ul { list-style: none; padding-left: 28px; margin: 0; border-left: 2px dashed #dfe3ee; margin-left: 18px; }
.tree > ul { border-left: 0; padding-left: 0; margin-left: 0; }
.tree li { padding: 6px 0; position: relative; }
.tree li::before { content: ''; position: absolute; left: -28px; top: 26px; width: 22px; border-top: 2px dashed #dfe3ee; }
.tree > ul > li::before { display: none; }
.tree-node { display: inline-flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--cp-border); border-radius: 16px; padding: 10px 16px; box-shadow: var(--cp-shadow); transition: all .15s; }
.tree-node:hover { border-color: var(--cp-primary-100); transform: translateY(-1px); }
.boas-vindas { border-radius: 24px; padding: 24px; color: #fff; background: var(--cp-grad); position: relative; overflow: hidden; }
.boas-vindas::after { content: ''; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.1); }
.boas-vindas a.passo { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.12); color: #fff; font-weight: 600; font-size: .84rem; height: 100%; position: relative; z-index: 1; }
.boas-vindas a.passo:hover { background: rgba(255,255,255,.2); }
.boas-vindas a.passo.ok { opacity: .62; text-decoration: line-through; }
.boas-vindas .num { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: #fff; color: var(--cp-primary); font-weight: 800; font-size: .75rem; flex-shrink: 0; }
.boas-vindas .progress { background: rgba(255,255,255,.22); } .boas-vindas .progress-bar { background: #fff; }

/* configurações */
.settings-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; color: var(--cp-text-2); font-weight: 600; font-size: .87rem; }
.settings-link:hover { background: #f6f7fc; color: var(--cp-text); }
.settings-link.active { background: var(--cp-primary-50); color: var(--cp-primary-600); }
.settings-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #f1f2f8; color: var(--cp-text-2); font-size: 1.05rem; flex-shrink: 0; }
.settings-link.active .settings-ico { background: var(--cp-grad); color: #fff; }

@media (max-width: 991.98px) {
    .content { padding: 4px 16px 20px; }
    .topbar { padding: 14px 16px; }
    .trial-bar { margin: 0 16px 6px; flex-wrap: wrap; }
    .kpi strong { font-size: 1.25rem; }
    .app-footer { padding: 16px; }
}

/* ---------- telas de autenticação ---------- */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: #fff; }
.auth-side { margin: 14px; border-radius: 28px; color: #fff; padding: 44px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
    background: radial-gradient(70% 60% at 0% 0%, rgba(124, 108, 255, .65), transparent 60%), radial-gradient(60% 60% at 100% 100%, rgba(16, 185, 129, .4), transparent 60%), #0b0f22; }
.auth-side::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 40px 40px; mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%); pointer-events: none; }
.auth-side > * { position: relative; z-index: 1; }
.auth-side h2 { font-size: 2.35rem; font-weight: 800; letter-spacing: -.04em; line-height: 1.12; }
.auth-side p { color: #c9cde3; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-box { width: 100%; max-width: 430px; }
.auth-box h1 { font-size: 1.85rem; font-weight: 800; letter-spacing: -.04em; }
.auth-feature { display: flex; gap: 14px; margin-bottom: 18px; padding: 14px; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(6px); }
.auth-feature i { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.12); flex-shrink: 0; font-size: 1.1rem; }
@media (max-width: 991.98px) { .auth-page { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ---------- portal do parceiro ---------- */
body.portal { background: var(--cp-bg); padding-bottom: 90px; }
.portal-top { position: sticky; top: 0; z-index: 1030; background: rgba(255,255,255,.85); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--cp-border); }
.portal-top .brand { color: var(--cp-text); }
.portal-top .nav-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px; color: var(--cp-text-2); font-weight: 600; font-size: .86rem; }
.portal-top .nav-pill:hover { background: #f4f5fb; color: var(--cp-text); }
.portal-top .nav-pill.active { background: var(--cp-primary-50); color: var(--cp-primary-600); }
.portal-hero { background: var(--cp-grad); color: #fff; border-radius: 26px; padding: 28px; position: relative; overflow: hidden; box-shadow: 0 24px 50px -24px rgba(var(--bs-primary-rgb), .9); }
.portal-hero::before { content: ''; position: absolute; right: -50px; top: -70px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,.12); }
.portal-hero::after { content: ''; position: absolute; right: 120px; bottom: -90px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.08); }
.portal-hero > * { position: relative; z-index: 1; }
.bottom-nav { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 1040; display: flex; justify-content: space-around; padding: 8px; border-radius: 22px;
    background: rgba(14, 17, 36, .92); backdrop-filter: blur(14px); box-shadow: 0 20px 40px -12px rgba(13, 19, 48, .55); }
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border-radius: 14px; color: #8d93b0; font-size: .66rem; font-weight: 600; }
.bottom-nav a i { font-size: 1.2rem; }
.bottom-nav a.active { color: #fff; background: rgba(var(--bs-primary-rgb), .55); }
@media (min-width: 768px) { .bottom-nav { display: none; } body.portal { padding-bottom: 0; } }
.form-switch .form-check-label { margin-left: .35rem; }

/* tabelas viram cartões no celular (portal do parceiro) */
@media (max-width: 575.98px) {
    .table-stack thead { display: none; }
    .table-stack tbody tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 14px 16px; border-bottom: 1px solid #f1f2f8; }
    .table-stack tbody td { border: 0 !important; padding: 0 !important; flex: 1 1 100%; }
    .table-stack tbody td.text-end { flex: 1 1 auto; text-align: left !important; font-size: 1rem; }
    .table-stack tbody td:last-child { flex: 0 0 auto; margin-left: auto; }
    .table-stack tbody td.text-nowrap:first-child { font-size: .74rem; color: var(--cp-muted); }
}

/* ---------- central de ajuda ---------- */
.ajuda-hero { border-radius: 26px; padding: 32px; color: #fff; background: var(--cp-grad); position: relative; overflow: hidden; box-shadow: 0 24px 50px -24px rgba(var(--bs-primary-rgb), .9); }
.ajuda-hero::before { content: ''; position: absolute; right: -80px; top: -100px; width: 320px; height: 320px; border-radius: 50%; background: rgba(255,255,255,.1); }
.ajuda-hero > * { position: relative; z-index: 1; }
.ajuda-busca { position: relative; max-width: 560px; }
.ajuda-busca i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--cp-muted); font-size: 1.1rem; }
.ajuda-busca input { padding-left: 50px; border: 0; background: #fff; box-shadow: 0 12px 30px -12px rgba(13, 19, 48, .45); }
.ajuda-progresso { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18); border-radius: 20px; padding: 20px; backdrop-filter: blur(6px); }
.ajuda-progresso .progress { background: rgba(255,255,255,.22); } .ajuda-progresso .progress-bar { background: #fff; }
.modulo-card { transition: transform .18s, box-shadow .18s; }
.modulo-card:hover { transform: translateY(-3px); box-shadow: var(--cp-shadow-lg); }
.aula-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; color: var(--cp-text-2); font-weight: 600; font-size: .86rem; }
.aula-item:hover { background: var(--cp-primary-50); color: var(--cp-primary-600); }
.aula-item .aula-ico { color: var(--cp-primary); font-size: 1.05rem; }
.aula-item.feita { color: var(--cp-muted); } .aula-item.feita .aula-ico { color: #10b981; }
.ajuda-faq .accordion-item { border: 1px solid var(--cp-border); border-radius: 16px !important; margin-bottom: 10px; overflow: hidden; }
.ajuda-faq .accordion-button { font-weight: 700; font-size: .9rem; padding: 16px 20px; }
.ajuda-faq .accordion-button:not(.collapsed) { background: var(--cp-primary-50); color: var(--cp-primary-600); box-shadow: none; }
.ajuda-faq .accordion-body { color: var(--cp-text-2); font-size: .88rem; }
.ajuda-indice { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow-y: auto; }
.indice-modulo { display: flex; align-items: center; gap: 8px; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--cp-muted); padding: 12px 10px 4px; }
.indice-modulo span { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; background: #f1f2f8; font-size: .66rem; }
.indice-aula { display: flex; gap: 8px; padding: 7px 10px; border-radius: 10px; color: var(--cp-text-2); font-size: .82rem; font-weight: 500; line-height: 1.3; }
.indice-aula i { color: #c4c9da; margin-top: 1px; }
.indice-aula:hover { background: #f6f7fc; color: var(--cp-text); }
.indice-aula.active { background: var(--cp-primary-50); color: var(--cp-primary-600); font-weight: 700; }
.indice-aula.active i { color: var(--cp-primary); }
.indice-aula.feita i { color: #10b981; }
.passos { position: relative; }
.passo-item { display: flex; gap: 18px; position: relative; padding-bottom: 22px; }
.passo-item:not(:last-child)::before { content: ''; position: absolute; left: 21px; top: 50px; bottom: 0; width: 2px; background: repeating-linear-gradient(to bottom, var(--cp-primary-100) 0 6px, transparent 6px 12px); }
.passo-num { width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0; display: grid; place-items: center; font-weight: 800; font-size: 1.05rem; color: #fff; background: var(--cp-grad); box-shadow: 0 10px 20px -10px rgba(var(--bs-primary-rgb), .9); }
.passo-card { flex: 1; min-width: 0; }
.passo-texto { color: var(--cp-text-2); line-height: 1.7; font-size: .92rem; }
.passo-texto b { color: var(--cp-text); }
.passo-img { display: block; position: relative; margin-top: 16px; border-radius: 16px; overflow: hidden; border: 1px solid var(--cp-border); box-shadow: 0 16px 40px -20px rgba(13, 19, 48, .35); }
.passo-img img { width: 100%; display: block; transition: transform .3s; }
.passo-img:hover img { transform: scale(1.015); }
.zoom-hint { position: absolute; right: 12px; bottom: 12px; background: rgba(13, 19, 48, .75); color: #fff; font-size: .75rem; font-weight: 600; padding: 6px 10px; border-radius: 10px; opacity: 0; transition: opacity .2s; }
.passo-img:hover .zoom-hint { opacity: 1; }
.passo-dica { display: flex; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: #fffbeb; color: #92400e; font-size: .86rem; }
.passo-dica i { color: #f59e0b; font-size: 1.1rem; }
.navega-aula { color: var(--cp-text); transition: all .15s; min-width: 240px; }
.navega-aula:hover { border-color: var(--cp-primary-100); transform: translateY(-2px); color: var(--cp-primary-600); }
#modalZoom .modal-dialog { max-width: min(1200px, 94vw); }
@media (max-width: 575.98px) { .passo-item { gap: 10px; } .passo-num { width: 34px; height: 34px; border-radius: 11px; font-size: .9rem; } .passo-item:not(:last-child)::before { left: 16px; top: 40px; } .ajuda-hero { padding: 22px; } }
