*{box-sizing:border-box}body{margin:0;background:#f5f7fb;color:#1d2433;font-family:Arial,Helvetica,sans-serif;line-height:1.45}.container{max-width:1180px;margin:0 auto;padding:20px}.topbar{background:#101115;color:#fff;box-shadow:0 2px 12px rgba(0,0,0,.18)}.topbar-inner{display:flex;align-items:center;justify-content:space-between;gap:16px}.brand{color:#fff;text-decoration:none;font-weight:700;font-size:20px}.nav{display:flex;gap:10px;flex-wrap:wrap}.nav a{color:#dfe6f3;text-decoration:none;padding:8px 10px;border-radius:8px}.nav a:hover{background:rgba(255,255,255,.1)}h1,h2,h3{margin-top:0;color:#121826}.muted{color:#657084}.small{font-size:14px}.footer{color:#6b7280;font-size:14px;padding:20px 0}.auth-wrap,.install-wrap{min-height:calc(100vh - 70px);display:flex;align-items:center;justify-content:center;padding:24px}.auth-card,.panel,.hero-card,.tool-card{background:#fff;border:1px solid #e4e8f0;border-radius:18px;box-shadow:0 10px 30px rgba(15,23,42,.06)}.auth-card{width:100%;max-width:420px;padding:28px}.auth-card.wide{max-width:760px}.panel{padding:24px;margin:0 0 20px}.narrow{max-width:720px}.hero-card{padding:26px;margin:0 0 24px;display:flex;align-items:center;justify-content:space-between;gap:20px}.grid{display:grid;gap:20px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.tool-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:18px}.tool-card{padding:20px;display:flex;gap:16px;min-height:210px}.tool-card.locked{opacity:.86}.tool-icon{flex:0 0 54px;width:54px;height:54px;border-radius:16px;background:#111827;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700}.tool-body p{color:#657084}label{display:block;font-weight:700;margin:0 0 14px}input,select,textarea{width:100%;padding:12px 13px;border:1px solid #cfd7e6;border-radius:10px;background:#fff;color:#111827;font:inherit;margin-top:6px}textarea{resize:vertical}.btn{display:inline-block;border:0;background:#2563eb;color:#fff;text-decoration:none;border-radius:10px;padding:11px 16px;font-weight:700;cursor:pointer}.btn:hover{background:#1d4ed8}.btn.ghost{background:#eef2ff;color:#1e40af}.btn.ghost:hover{background:#dbeafe}.btn.small{padding:7px 10px;font-size:13px}.alert{padding:12px 14px;border-radius:12px;margin:0 0 16px}.alert-success{background:#ecfdf5;color:#065f46;border:1px solid #a7f3d0}.alert-error{background:#fef2f2;color:#991b1b;border:1px solid #fecaca}.badge{display:inline-block;border-radius:999px;padding:5px 10px;font-size:13px;font-weight:700}.badge.success{background:#dcfce7;color:#166534}.muted-badge{background:#eef2f7;color:#475569}.tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 22px}.tabs a{padding:10px 13px;background:#fff;border:1px solid #dce3ee;border-radius:10px;text-decoration:none;color:#334155}.tabs a.active{background:#111827;color:#fff;border-color:#111827}.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:16px;margin-bottom:20px}.stat{background:#fff;border:1px solid #e4e8f0;border-radius:16px;padding:20px}.stat strong{font-size:30px;display:block}.stat span{color:#64748b}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:end}.form-grid label{margin:0}.wide-field{grid-column:1/-1}.search-row{display:flex;gap:10px;align-items:center;margin-bottom:16px}.search-row input{margin:0}.table-wrap{width:100%;overflow-x:auto}table{width:100%;border-collapse:collapse}th,td{text-align:left;border-bottom:1px solid #e6ebf3;padding:12px;vertical-align:top}th{font-size:13px;text-transform:uppercase;color:#64748b;background:#f8fafc}.top-gap{margin-top:14px}pre{background:#0f172a;color:#e2e8f0;border-radius:12px;padding:14px;overflow:auto}.clean-list{list-style:none;padding:0;margin:0}.clean-list li{padding:8px 0;border-bottom:1px solid #e5e7eb}@media(max-width:760px){.topbar-inner,.hero-card{align-items:flex-start;flex-direction:column}.grid.two,.form-grid{grid-template-columns:1fr}.search-row{flex-direction:column;align-items:stretch}.container{padding:16px}.tool-card{flex-direction:column}.auth-wrap,.install-wrap{align-items:flex-start}.wide-field{grid-column:auto}}
.module-tabs{margin-top:-6px;margin-bottom:22px}.panel ol{margin-top:0}.panel ol li{margin-bottom:8px}.status-note{background:#f8fafc;border:1px dashed #cbd5e1;border-radius:14px;padding:14px;color:#475569}
.inline-form{display:inline-block;margin:6px 0 0}.btn.danger{background:#dc2626}.btn.danger:hover{background:#b91c1c}.checkbox-inline{width:auto;margin-right:8px}.stacked-mini-form label{margin-bottom:8px}.public-container{max-width:980px}.public-card{background:#fff;border:1px solid #e4e8f0;border-radius:22px;box-shadow:0 10px 30px rgba(15,23,42,.08);padding:28px;margin:28px auto;max-width:760px}.wide-public-card{max-width:1080px}.public-auth-grid{align-items:start}.portal-logo{max-width:220px;max-height:80px;object-fit:contain}.small-logo{max-width:180px;max-height:60px}.public-hero{box-shadow:none;margin:0 0 20px}.resource-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:18px}.resource-card{background:#fff;border:1px solid #e4e8f0;border-radius:18px;padding:22px;box-shadow:0 8px 24px rgba(15,23,42,.05)}hr{border:0;border-top:1px solid #e5e7eb;margin:20px 0}@media(max-width:760px){.public-card{padding:20px;margin:16px auto}.inline-form{display:block}.btn.small{margin-top:4px}}
.member-card-list{display:grid;gap:14px}
.public-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.category-section{margin:0 0 26px}.category-heading{margin:0 0 12px}.category-heading h2{margin-bottom:4px}.category-section .resource-card h3{margin-top:0}@media(max-width:760px){.public-actions{justify-content:flex-start}}

.resource-viewer-card{max-width:1180px;padding:18px}.viewer-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px}.viewer-toolbar h1{margin-bottom:6px}.viewer-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.viewer-notice{margin:0 0 12px}.iframe-wrap{height:calc(100vh - 260px);min-height:520px;border:1px solid #dbe3ef;border-radius:18px;overflow:hidden;background:#fff}.resource-iframe{display:block;width:100%;height:100%;border:0;background:#fff}@media(max-width:760px){.viewer-toolbar{flex-direction:column}.viewer-actions{justify-content:flex-start}.iframe-wrap{height:70vh;min-height:420px}}
.video-viewer-wrap{position:relative;width:100%;background:#000;border-radius:18px;overflow:hidden;border:1px solid #dbe3ef;aspect-ratio:16/9}.video-viewer-wrap .resource-iframe,.video-viewer-wrap .resource-video{display:block;width:100%;height:100%;border:0;background:#000}.resource-video{object-fit:contain}@media(max-width:760px){.video-viewer-wrap{border-radius:14px}}
.download-viewer-card{max-width:640px;margin:28px auto;text-align:center;background:#f8fafc;border:1px solid #dbe3ef;border-radius:20px;padding:34px}.download-icon{width:70px;height:70px;margin:0 auto 14px;border-radius:50%;background:var(--portal-accent,#2563eb);color:#fff;display:flex;align-items:center;justify-content:center;font-size:36px;font-weight:700}.large-btn{font-size:16px;padding:14px 20px}.lesson-content{max-width:860px;margin:10px auto;padding:26px;background:#fff;border:1px solid #e4e8f0;border-radius:18px;line-height:1.7}.lesson-content h1,.lesson-content h2,.lesson-content h3,.lesson-content h4{margin-top:1.1em}.lesson-content h1:first-child,.lesson-content h2:first-child,.lesson-content h3:first-child{margin-top:0}.lesson-content img{max-width:100%;height:auto;border-radius:12px}.lesson-content blockquote{border-left:4px solid var(--portal-accent,#2563eb);margin:18px 0;padding:8px 16px;background:#f8fafc;color:#475569}.lesson-content code{background:#eef2f7;border-radius:6px;padding:2px 5px}.lesson-content pre code{background:transparent;padding:0}.resource-type-fields{margin-bottom:10px}@media(max-width:760px){.lesson-content{padding:18px}.download-viewer-card{padding:24px}}

/* Member Portal Builder rich lesson editor */
.mpb-rich-editor{border:1px solid #cfd7e6;border-radius:14px;background:#fff;margin-top:6px;overflow:hidden}.mpb-editor-toolbar{display:flex;gap:7px;flex-wrap:wrap;align-items:center;padding:10px;background:#f8fafc;border-bottom:1px solid #e5e7eb}.mpb-editor-btn,.mpb-toolbar-select,.mpb-color-tool{border:1px solid #cfd7e6;background:#fff;color:#111827;border-radius:8px;padding:7px 9px;font:inherit;font-size:13px;font-weight:700;line-height:1.2}.mpb-editor-btn{cursor:pointer}.mpb-editor-btn:hover{background:#eef2ff}.mpb-toolbar-select{width:auto;margin:0}.mpb-color-tool{display:inline-flex;gap:6px;align-items:center;margin:0}.mpb-color-tool input{width:34px;height:26px;padding:0;border:0;margin:0;background:transparent}.mpb-editor-surface{height:430px;max-height:60vh;overflow-y:auto;padding:16px;outline:none;background:#fff;color:#111827;line-height:1.6;scrollbar-gutter:stable}.mpb-editor-surface:empty:before{content:'Add your written lesson, instructions, module text, links, images, or simple HTML here.';color:#94a3b8}.mpb-editor-surface img{max-width:100%;height:auto;border-radius:10px}.mpb-editor-surface blockquote{border-left:4px solid #2563eb;margin:16px 0;padding:8px 14px;background:#f8fafc;color:#475569}.mpb-editor-html-source{display:none;border:0;border-radius:0;margin:0;height:430px;max-height:60vh;overflow-y:auto;resize:vertical;font-family:Consolas,Monaco,monospace;font-size:14px}.mpb-editor-hidden{display:none}.html-toggle{background:#111827;color:#fff}.html-toggle:hover{background:#1f2937}@media(max-width:760px){.mpb-editor-toolbar{align-items:stretch}.mpb-editor-btn,.mpb-toolbar-select,.mpb-color-tool{flex:1 1 auto}.mpb-editor-surface,.mpb-editor-html-source{height:320px;max-height:55vh}}

/* Member Portal Builder course layout and resource action buttons */
.resource-action-buttons{display:flex;gap:10px;flex-wrap:wrap;margin:20px 0 0;padding-top:16px;border-top:1px solid #e5e7eb}.resource-action-btn{background:var(--portal-accent,#2563eb);color:#fff}.course-dashboard-layout{display:grid;grid-template-columns:300px minmax(800px,1fr);gap:20px;align-items:start;overflow-x:auto}.wide-public-card{max-width:1280px}.course-sidebar{background:#f8fafc;border:1px solid #dbe3ef;border-radius:18px;padding:16px;position:sticky;top:18px;max-height:calc(100vh - 40px);overflow-y:auto}.course-sidebar h2{font-size:18px;margin-bottom:12px}.course-accordion-section{border:1px solid #e2e8f0;border-radius:14px;overflow:hidden;background:#fff;margin-bottom:10px}.course-accordion-toggle{width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px;border:0;background:#fff;color:#111827;padding:12px 13px;font-weight:800;text-align:left;cursor:pointer}.course-accordion-toggle[aria-expanded="true"]{background:#eef2ff}.course-accordion-panel{padding:8px;border-top:1px solid #e2e8f0}.course-resource-nav{width:100%;display:block;border:0;background:transparent;color:#1f2937;text-align:left;border-radius:10px;padding:10px 11px;margin:0 0 5px;cursor:pointer}.course-resource-nav:hover{background:#f1f5f9}.course-resource-nav.active{background:var(--portal-accent,#2563eb);color:#fff}.course-resource-nav span{display:block;font-weight:800}.course-resource-nav small{display:block;opacity:.78;margin-top:2px}.course-viewer-pane{min-width:800px;background:#fff;border:1px solid #dbe3ef;border-radius:18px;padding:20px}.course-resource-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}.course-resource-header h2{margin-bottom:6px}.course-resource-panel .iframe-wrap,.course-iframe-wrap{height:68vh;min-height:460px}.course-lesson-content{max-width:none;margin:0}.course-download-card{margin:18px auto}.course-frame-notice{margin-bottom:12px}@media(max-width:900px){.course-dashboard-layout{grid-template-columns:1fr;overflow-x:visible}.course-viewer-pane{min-width:0}.course-sidebar{position:static;max-height:none}.course-resource-header{flex-direction:column}.course-resource-panel .iframe-wrap,.course-iframe-wrap{height:62vh;min-height:360px}}

/* Course layout page-width fix: give the 800px viewer room without internal side scrolling */
.portal-public .public-container{max-width:1380px}
.portal-public .wide-public-card{max-width:1320px;width:100%}
.course-dashboard-layout{overflow-x:visible}
@media(max-width:1180px){.course-dashboard-layout{grid-template-columns:1fr;overflow-x:visible}.course-viewer-pane{min-width:0}.course-sidebar{position:static;max-height:none}.course-resource-header{flex-direction:column}.course-resource-panel .iframe-wrap,.course-iframe-wrap{height:62vh;min-height:360px}}

/* Profit Tool Hub / Member Portal Builder branding */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.brand-with-logo{display:inline-flex;align-items:center;gap:10px}.brand-logo{display:block;width:auto;height:46px;max-width:280px;object-fit:contain}.public-brand-logo{display:block;width:auto;height:42px;max-width:240px;object-fit:contain}.tool-icon-image{background:#fff;border:1px solid #dbe3ef;box-shadow:0 6px 18px rgba(15,23,42,.06);overflow:hidden}.tool-icon-image img{display:block;width:44px;height:44px;object-fit:contain}.module-hero-logo{display:block;width:100%;max-width:430px;height:auto;margin:0 0 14px}.tool-hero-card h1{margin-bottom:6px}.auth-card-logo{display:block;width:100%;max-width:260px;height:auto;margin:0 0 18px}@media(max-width:760px){.brand-logo{height:38px;max-width:230px}.public-brand-logo{height:36px;max-width:210px}.module-hero-logo{max-width:320px}}

/* Member Portal Builder hub card cleanup v2 */
.tool-card-member-portal-builder{flex-direction:column;align-items:flex-start}.tool-card-member-portal-builder .tool-body h3{display:none!important}.tool-card-logo-wrap{width:100%;margin:0 0 4px}.tool-card-logo{display:block;width:100%;max-width:300px;height:auto;object-fit:contain}.tool-card-member-portal-builder .tool-body{width:100%}

/* Admin plan editor usability */
.section-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin:0 0 18px}.btn.secondary{background:#eef2f7;color:#334155}.btn.secondary:hover{background:#e2e8f0}.badge.danger{background:#fee2e2;color:#991b1b}.limit-builder{background:#f8fafc;border:1px solid #dbe3ef;border-radius:16px;padding:18px}.limit-builder h3{margin-bottom:6px}.limit-builder-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,360px);gap:18px;align-items:center;padding:14px 0;border-top:1px solid #e2e8f0}.limit-builder-row:first-of-type{border-top:0}.limit-builder-row p{margin:4px 0 0}.limit-builder-controls{display:flex;align-items:end;gap:12px}.compact-label{flex:1;margin:0}.checkbox-inline{display:inline-flex;align-items:center;gap:6px;font-weight:700;margin:0;white-space:nowrap}.checkbox-inline input{width:auto;margin:0}.limit-summary{display:grid;gap:4px}.limit-summary span{display:block}@media(max-width:760px){.section-header{flex-direction:column}.limit-builder-row{grid-template-columns:1fr}.limit-builder-controls{align-items:stretch;flex-direction:column}.checkbox-inline{padding:8px 0}}
/* Member Portal Builder YouTube poster overlay */
.mpb-youtube-poster{position:absolute;inset:0;width:100%;height:100%;display:block;border:0;padding:0;margin:0;background:#000;cursor:pointer;overflow:hidden}.mpb-youtube-poster-img{display:block;width:100%;height:100%;object-fit:cover;background:#000}.mpb-youtube-poster:focus{outline:3px solid var(--portal-accent,#2563eb);outline-offset:-3px}.mpb-youtube-poster::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.06),rgba(0,0,0,.34));pointer-events:none}.mpb-youtube-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:78px;height:54px;border-radius:16px;background:rgba(0,0,0,.72);color:#fff;display:flex;align-items:center;justify-content:center;font-size:31px;line-height:1;text-indent:4px;box-shadow:0 12px 30px rgba(0,0,0,.28);z-index:2}.mpb-youtube-poster:hover .mpb-youtube-play{background:var(--portal-accent,#2563eb)}.mpb-sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:760px){.mpb-youtube-play{width:64px;height:46px;border-radius:14px;font-size:25px}}
