/* PRISMA é uma camada visual reversível: preserva os controles de acesso e as ações. */
html[data-theme="prisma"] {
  color-scheme: light;
  --bg:#eaf1f8; --surface:rgba(255,255,255,.80); --surface-2:#f5f9fc;
  --text:#142c43; --muted:#536e83; --line:rgba(75,112,143,.19);
  --line-bright:rgba(0,126,132,.38); --green:#007d75; --green-dim:#00685f;
  --amber:#956000; --orange:#956000; --red:#b6314d;
  --display:'Inter',-apple-system,sans-serif;
  --prisma-glass:linear-gradient(145deg,rgba(255,255,255,.94),rgba(248,252,255,.67));
  --prisma-shadow:0 10px 30px -19px rgba(35,73,113,.35),0 1px 0 rgba(255,255,255,.92) inset;
  --rail-w:72px; --sidebar-w:246px;
}
html[data-theme="prisma"] body {
  background:radial-gradient(ellipse at 94% 4%,#e0e6ff 0,transparent 40%),
    radial-gradient(ellipse at 12% 28%,#d5f2f0 0,transparent 44%),
    linear-gradient(140deg,#f0f5fa,#e9f0f8 55%,#eef0fa);
  background-attachment:fixed; color:var(--text);
}
html[data-theme="prisma"] ::selection { background:#b9e7e1; color:#102b42; }
html[data-theme="prisma"] :is(button,a,input,select,textarea):focus-visible { outline:3px solid #218a9a; outline-offset:3px; }
html[data-theme="prisma"] :is(button,input,select,textarea) { touch-action:manipulation; }
html[data-theme="prisma"] :is(.bxt::before,.bxt::after) { content:none; }
html[data-theme="prisma"] .logo { font-weight:800; letter-spacing:-.055em; color:#19354c; }
html[data-theme="prisma"] .logo .x { color:var(--green); }
html[data-theme="prisma"] .btn {
  min-height:44px; border-radius:13px; border-color:#078e80;
  background:linear-gradient(150deg,#0c998b,#007a74); color:#fff;
  box-shadow:0 5px 14px -6px rgba(0,116,113,.46),0 1px 0 rgba(255,255,255,.32) inset;
  font-weight:600; letter-spacing:-.015em;
}
html[data-theme="prisma"] .btn:hover { box-shadow:0 8px 19px -7px rgba(0,103,108,.48); }
html[data-theme="prisma"] .btn--ghost {
  background:linear-gradient(145deg,rgba(255,255,255,.94),rgba(234,243,249,.8));
  border-color:var(--line); color:var(--text); box-shadow:0 1px 0 white inset;
}
html[data-theme="prisma"] .btn--ghost:hover { background:#fff; border-color:var(--line-bright); }
html[data-theme="prisma"] .btn:disabled { opacity:.5; box-shadow:none; }
html[data-theme="prisma"] :is(input,select,textarea) {
  border-radius:12px; background:rgba(255,255,255,.83); border-color:#bfd0dd;
  box-shadow:0 1px 3px rgba(38,64,91,.035) inset; color:var(--text);
}
html[data-theme="prisma"] :is(input,select,textarea):focus { background:#fff; border-color:#329c99; }
html[data-theme="prisma"] :is(input,textarea)::placeholder { color:#60798c; opacity:1; }
html[data-theme="prisma"] input:is([type="checkbox"],[type="radio"]) { accent-color:var(--green); }
html[data-theme="prisma"] label { letter-spacing:.07em; font-weight:500; }
html[data-theme="prisma"] .role-pill { border-radius:12px; min-height:44px; }
html[data-theme="prisma"] .role-pill.is-active { background:#e2f4ef; box-shadow:none; }

/* O fundo luminoso não modifica a exibição condicional dos formulários. */
html[data-theme="prisma"] #screen-login { padding:48px 22px; min-height:100svh; }
html[data-theme="prisma"] #login-canvas-wrap { opacity:.055; mix-blend-mode:multiply; }
html[data-theme="prisma"] #screen-login::before {
  content:""; position:absolute; width:min(75vw,700px); aspect-ratio:1; border-radius:50%;
  border:1px solid rgba(255,255,255,.75); box-shadow:0 0 0 60px rgba(255,255,255,.12),0 0 0 120px rgba(255,255,255,.08);
  top:12%; right:-25%; pointer-events:none;
}
html[data-theme="prisma"] #screen-login .lockup { margin-bottom:25px; }
html[data-theme="prisma"] #screen-login .lockup .logo { font-size:38px; }
html[data-theme="prisma"] #screen-login .lockup p { letter-spacing:.14em; font-size:10px; }
html[data-theme="prisma"] #screen-login form {
  max-width:390px; padding:28px; background:var(--prisma-glass);
  border:1px solid rgba(255,255,255,.95); border-radius:25px;
  box-shadow:0 24px 70px -33px rgba(50,84,115,.38),0 1px 0 white inset;
  -webkit-backdrop-filter:blur(20px); backdrop-filter:blur(20px);
}
html[data-theme="prisma"] .proto-note { border-radius:12px; border-color:var(--line); background:rgba(255,255,255,.45); }
html[data-theme="prisma"] .pulse-dot { box-shadow:0 0 0 3px rgba(0,125,117,.11); }
html[data-theme="prisma"] .status-line { margin-top:24px; color:#527084; }

/* O vidro mantém a profundidade sem prejudicar a leitura do ecossistema. */
html[data-theme="prisma"] #sidebar {
  background:linear-gradient(175deg,rgba(252,254,255,.82),rgba(233,243,250,.76));
  border-right:1px solid rgba(255,255,255,.95); box-shadow:8px 0 30px -27px #3f6387;
  -webkit-backdrop-filter:blur(20px); backdrop-filter:blur(20px);
}
html[data-theme="prisma"] .sb-logo { margin-bottom:11px; }
html[data-theme="prisma"] .sb-logo .logo { font-size:24px; }
html[data-theme="prisma"] .sb-status { color:#4a697a; letter-spacing:.12em; }
html[data-theme="prisma"] .lang-switch { background:rgba(220,232,241,.65); border-radius:9px; padding:3px; gap:2px; }
html[data-theme="prisma"] .lang-switch button { background:transparent; border-color:transparent; border-radius:6px; }
html[data-theme="prisma"] .lang-switch button.is-active { background:#fff; color:var(--green); border-color:#d2e2e8; box-shadow:0 2px 5px #45647c12; }
html[data-theme="prisma"] .sb-nav { gap:8px; }
html[data-theme="prisma"] .sb-indicator {
  height:48px; border:1px solid rgba(255,255,255,.95); border-left:2px solid #169c94; border-radius:14px;
  background:linear-gradient(105deg,#d5eee9e6,#ffffff90); box-shadow:0 6px 13px -9px #448a94;
}
html[data-theme="prisma"] .sb-item { height:48px; min-height:48px; padding:0 10px; border-radius:14px; color:#526d80; }
html[data-theme="prisma"] .sb-item:hover { color:#183b50; }
html[data-theme="prisma"] .sb-item.is-active { color:#006b65; }
html[data-theme="prisma"] .sb-item__slot {
  width:32px; height:32px; border-radius:10px; color:#4d8396; border-color:rgba(255,255,255,.9);
  background:linear-gradient(145deg,#ffffff,#e8f1fa); box-shadow:0 4px 8px -5px #3e6880,0 1px 0 white inset;
}
html[data-theme="prisma"] .sb-item.is-active .sb-item__slot { background:linear-gradient(140deg,#f4fffc,#b3ddd8); border-color:#eefdf9; box-shadow:0 4px 9px -6px #156a69; }
html[data-theme="prisma"] .sb-item.is-active svg :is(path,line,circle) { stroke:#00756c; }
html[data-theme="prisma"] .sb-user { border-top-color:var(--line); }
html[data-theme="prisma"] .avatar { background:linear-gradient(145deg,#e5fbf5,#acdacf); color:#155d59; border:1px solid white; border-radius:11px; box-shadow:0 4px 10px -7px #36665d; }
html[data-theme="prisma"] .sb-logout { border-radius:12px; border-color:#dfbbc6; background:#fbf2f5a6; }
html[data-theme="prisma"] .sb-logout:hover { background:#fae7ed; }
html[data-theme="prisma"] #main-area { perspective:none; }
html[data-theme="prisma"] .view { transform-style:flat; }
html[data-theme="prisma"] .view-inner { max-width:920px; }
html[data-theme="prisma"] .view-header { padding-top:calc(29px + var(--safe-top)); padding-bottom:23px; }
html[data-theme="prisma"] .view-header__eyebrow { color:#457487; font-size:10px; letter-spacing:.18em; margin-bottom:7px; }
html[data-theme="prisma"] .view-header__title { font-size:27px; line-height:1.18; text-transform:none; font-weight:700; letter-spacing:-.045em; }
html[data-theme="prisma"] .icon-btn { width:42px; height:42px; border-radius:13px; color:#315c75; box-shadow:var(--prisma-shadow); }
html[data-theme="prisma"] .tab-content { padding-bottom:56px; }
html[data-theme="prisma"] .section-label { letter-spacing:.12em; margin-top:29px; color:#4c7185; }

html[data-theme="prisma"] :is(.card,.lesson-row,.product-card,.request-card,.post,.news-item,.stat-box,.alert-card,.component-card,.assert-panel,.hero-panel) {
  background:var(--prisma-glass); border:1px solid rgba(255,255,255,.95); border-radius:19px;
  box-shadow:var(--prisma-shadow); color:var(--text);
}
html[data-theme="prisma"] :is(.card,.lesson-row,.product-card,.request-card,.post,.news-item,.alert-card):hover { border-color:#acd5d6; }
html[data-theme="prisma"] .hero-panel { padding:25px; margin-bottom:16px; background:linear-gradient(125deg,#ffffffdb,#e8f8f5b8 57%,#e4e9ff8c); }
html[data-theme="prisma"] .greeting { font-size:26px; font-weight:700; line-height:1.2; text-transform:none; letter-spacing:-.04em; }
html[data-theme="prisma"] .sub { font-size:13px; line-height:1.55; }
html[data-theme="prisma"] :is(.ring-fg,.assert-ring-wrap svg) { filter:none; }
html[data-theme="prisma"] .ring-label span { font-size:9px; }
html[data-theme="prisma"] .lesson-list { gap:11px; }
html[data-theme="prisma"] .lesson-row { min-height:79px; padding:15px; border-left:3px solid transparent; }
html[data-theme="prisma"] .lesson-row.is-done { background:linear-gradient(115deg,#e9f7f1,#ffffffd6); border-left-color:var(--green); }
html[data-theme="prisma"] .lesson-num { width:37px; height:40px; border-radius:11px; background:linear-gradient(155deg,#fff,#e4edf6); color:#48728a; border-color:#fff; box-shadow:0 4px 8px -5px #547f98; }
html[data-theme="prisma"] .lesson-row.is-done .lesson-num { background:#d1ebe4; color:#006b60; border-color:#f4fffc; }
html[data-theme="prisma"] .lesson-body h4 { font-size:14px; letter-spacing:-.015em; }
html[data-theme="prisma"] .lesson-body p { line-height:1.45; margin-top:4px; }
html[data-theme="prisma"] .tool-card { border-radius:19px; border-color:#a8d6d2; background:linear-gradient(135deg,#e5f7f0d9,#fbfefddb); box-shadow:var(--prisma-shadow); }
html[data-theme="prisma"] :is(.tool-card__icon,.new-signal-banner__icon) { border-radius:12px; background:linear-gradient(145deg,#e3fff2,#8ed2c5); box-shadow:0 4px 11px -7px #00817a,0 1px 0 white inset; }
html[data-theme="prisma"] .product-card { padding:21px; }
html[data-theme="prisma"] .product-card h4 { font-size:17px; letter-spacing:-.025em; }
html[data-theme="prisma"] .badge-owned { border-radius:10px; background:#e1f4ec; border-color:#8acbb7; }
html[data-theme="prisma"] .video-frame { border:1px solid #b4cdd9; border-radius:18px; background:#0c1a29; color:#edf5fb; box-shadow:0 15px 26px -20px #1b3b57; }
html[data-theme="prisma"] .video-frame__badge { color:#ffd68e; background:#3e321dcc; }
html[data-theme="prisma"] .play-circle { background:#cbf4e9; border-color:#8dd4c1; color:#006b60; }
html[data-theme="prisma"] .lesson-title { font-size:25px; font-weight:700; text-transform:none; letter-spacing:-.035em; line-height:1.24; }
html[data-theme="prisma"] .lesson-desc { line-height:1.65; }
html[data-theme="prisma"] :is(.risk-banner,.announce-item) { border-radius:16px; background:#fff6dfb3; border-color:#dbc68f; }
html[data-theme="prisma"] .stat-box { min-width:0; padding:19px; }
html[data-theme="prisma"] .stat-box b { font-size:22px; letter-spacing:-.055em; overflow-wrap:anywhere; }
html[data-theme="prisma"] .stat-box span { display:block; margin-top:6px; font-size:10px; }
html[data-theme="prisma"] .sales-row { gap:12px; align-items:flex-start; }
html[data-theme="prisma"] .sales-row > span { min-width:0; overflow-wrap:anywhere; }
html[data-theme="prisma"] .sales-row b { flex-shrink:0; }
html[data-theme="prisma"] .commission-row { padding:15px 0; }
html[data-theme="prisma"] .msg--bot { border-radius:17px 17px 17px 5px; background:#ffffffe6; box-shadow:var(--prisma-shadow); }
html[data-theme="prisma"] .msg--user { color:#fff; background:#087e78; border-radius:17px 17px 5px 17px; }
html[data-theme="prisma"] .chat-input-bar { background:#f2f7fbd9; -webkit-backdrop-filter:blur(15px); backdrop-filter:blur(15px); }
html[data-theme="prisma"] .send-btn { border-radius:13px; background:linear-gradient(140deg,#b2ede0,#7bd1c2); }
html[data-theme="prisma"] .calc-table-wrap { border-radius:16px; background:rgba(255,255,255,.6); }
html[data-theme="prisma"] thead th { background:#dcebf1; color:#1b6d71; }
html[data-theme="prisma"] tbody tr:nth-child(even) { background:rgba(198,222,235,.20); }

/* As cores financeiras mantêm o significado e ganham contraste no fundo claro. */
html[data-theme="prisma"] :is(.alert-subtab,.hist-pagination button) { border-radius:12px; min-height:44px; border-color:var(--line); }
html[data-theme="prisma"] .alert-subtab { background:#ffffffa8; }
html[data-theme="prisma"] :is(.alert-subtab,.hist-pagination button).is-active { color:#006f68; background:#dcefe9; border-color:#94c9bf; }
html[data-theme="prisma"] .alert-card { padding:19px; }
html[data-theme="prisma"] .alert-card:hover { transform:translateY(-2px); box-shadow:0 13px 25px -18px #447c88; }
html[data-theme="prisma"] .alert-card::before { background-image:linear-gradient(115deg,transparent 42%,rgba(169,209,233,.15) 50%,transparent 58%); }
html[data-theme="prisma"] :is(.alert-card__grid b,.alert-dir,.assert-ring-label b,.assert-panel__row b,.new-signal-banner__text b) { text-shadow:none; }
html[data-theme="prisma"] .alert-card__tf { background:#e8eff6; border:0; border-radius:6px; }
html[data-theme="prisma"] :is(.alert-dir--compra,.hist-result--hit,.bias-chip.bullish) { background:#ddf1e9; color:#006c54; border-color:#a0cfbc; }
html[data-theme="prisma"] :is(.alert-dir--venda,.hist-result--miss,.bias-chip.bearish) { background:#fde7ec; color:#ad2d48; border-color:#e7b3bf; }
html[data-theme="prisma"] .hist-result--pending { background:#e5edf4; color:#506778; border-color:#c0cfdb; }
html[data-theme="prisma"] .bias-chip.neutral { background:#fbefcc; color:#8b5900; border-color:#dfc789; }
html[data-theme="prisma"] .assert-panel { border-color:#c4e2e0; background:linear-gradient(140deg,#faffffed,#e5f3f2b0); }
html[data-theme="prisma"] .assert-panel::before { opacity:.25; }
html[data-theme="prisma"] .assert-ring-fg { stroke:#139c8e; }
html[data-theme="prisma"] .assert-panel__admin-badge { color:#7f5800; background:#fff3cf; border-color:#e1c986; }
html[data-theme="prisma"] .new-signal-banner { border-radius:18px; background:linear-gradient(120deg,#d9f2e8,#f5faff); border-color:#97cfbf; box-shadow:var(--prisma-shadow); }
html[data-theme="prisma"] :is(.phantom-toggle__label,.phantom-coin-chip span) { border-radius:12px; background:#ffffffbd; border-color:#bfced9; }
html[data-theme="prisma"] :is(.phantom-toggle__input:checked + .phantom-toggle__label,.phantom-coin-chip input:checked + span) { background:#deefe9; color:#00695f; border-color:#88bfb3; box-shadow:0 1px 0 #fff inset; }
html[data-theme="prisma"] .phantom-toggle__input:checked + .phantom-toggle__label::before { box-shadow:none; }
html[data-theme="prisma"] .sentimento-suggestions { border-radius:14px; background:#f8fcff; box-shadow:0 14px 32px -18px #3d6178; }
html[data-theme="prisma"] .component-card { border-radius:15px; }
html[data-theme="prisma"] .professor-foto-3d { box-shadow:0 16px 26px -18px #496174,0 0 0 3px white,0 0 0 5px #b3d6d5; }
html[data-theme="prisma"] .admin-section { margin-top:18px; }
html[data-theme="prisma"] .admin-section__toggle {
  min-height:49px; padding:12px 24px; color:#2d546d; font-family:var(--body);
  font-size:13px; font-weight:600; letter-spacing:-.01em; text-transform:none;
}
html[data-theme="prisma"] .admin-section.is-open > .admin-section__toggle { color:#00756d; }
html[data-theme="prisma"] .admin-section__body { padding-top:10px; }
html[data-theme="prisma"] #admin-videos-list > .field { padding-top:8px; }
html[data-theme="prisma"] :is(.admin-bunny-pick,.admin-bunny-upload) { min-height:46px; }
html[data-theme="prisma"] details summary { min-height:38px; padding:9px 2px; }
html[data-theme="prisma"] .toast { max-width:calc(100vw - 36px); border-radius:15px; background:#faffff; border-color:#8ccbc5; box-shadow:0 12px 40px -15px #294d70; }
html[data-theme="prisma"] :is(dialog,[role="dialog"]) { color:var(--text); background:#f6fbff; border:1px solid #d4e3eb; border-radius:24px; box-shadow:0 28px 85px -25px #254a6b70; }
html[data-theme="prisma"] dialog::backdrop { background:#1c3a5266; -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px); }

/* Só os neutros legados são substituídos; vermelhos, alertas e vídeos são preservados. */
html[data-theme="prisma"] [style*="background:#0E1B13"] { background:#f9fcff!important; border:1px solid #dae6ee; }
html[data-theme="prisma"] [style*="background:var(--green); color:#04170D"] { color:#fff!important; }
html[data-theme="prisma"] :is(#hist-goto-input,#hist-busca-input) { border-color:#b5cbd8!important; background:#ffffffa8!important; }

@media (min-width:860px) {
  html[data-theme="prisma"] #sidebar { padding:calc(29px + var(--safe-top)) 18px 18px; }
  html[data-theme="prisma"] .sb-logo { justify-content:flex-start; padding-left:12px; }
  html[data-theme="prisma"] .sb-status { padding-left:13px; margin-bottom:23px; }
  html[data-theme="prisma"] .lang-switch { margin:0 9px 22px; }
  html[data-theme="prisma"] .sb-item { gap:12px; }
  html[data-theme="prisma"] .sb-item span.sb-item__label { font-size:12px; letter-spacing:-.015em; }
  html[data-theme="prisma"] .view-inner { padding:12px 20px 0; }
  html[data-theme="prisma"] #view-admin .view-inner { max-width:960px; }
  html[data-theme="prisma"] .hero-panel { padding:30px; }
  html[data-theme="prisma"] .greeting { font-size:30px; }
}
@media (max-width:859px) {
  html[data-theme="prisma"] { --rail-w:64px; }
  html[data-theme="prisma"] #sidebar { padding-top:calc(19px + var(--safe-top)); }
  html[data-theme="prisma"] .sb-nav { padding:0 7px; }
  html[data-theme="prisma"] .sb-indicator { left:7px; right:7px; }
  html[data-theme="prisma"] .sb-item { padding:0 6px; }
  html[data-theme="prisma"] .lang-switch { margin:0 5px 19px; padding:2px; }
  html[data-theme="prisma"] .lang-switch button { font-size:8px; padding:6px 1px; }
  html[data-theme="prisma"] .sb-user { margin:8px 5px 0; padding:12px 0 4px; }
  html[data-theme="prisma"] .sb-logout { margin:8px 5px 2px; width:calc(100% - 10px); min-height:44px; }
  html[data-theme="prisma"] :is(input,select,textarea) { font-size:16px!important; }
  html[data-theme="prisma"] .view-header { padding:calc(22px + var(--safe-top)) 16px 20px; }
  html[data-theme="prisma"] .view-header__title { font-size:23px; }
  html[data-theme="prisma"] :is(.lesson-list,.stat-grid,.components-grid,.pad,.alert-subtabs,.composer,.chat-scroll,.chat-input-bar,.admin-section__toggle) { padding-left:16px; padding-right:16px; }
  html[data-theme="prisma"] :is(.hero-panel,.product-card,.request-card,.tool-card,.alert-card,.assert-panel,.new-signal-banner,.post,.news-item,.announce-item,.orb-hero,.sentimento-symbol-search,.section-label) { margin-left:16px; margin-right:16px; }
  html[data-theme="prisma"] :is(.hero-panel,.assert-panel) { padding:18px; gap:12px; }
  html[data-theme="prisma"] .greeting { font-size:22px; }
  html[data-theme="prisma"] .stat-box { padding:15px 12px; }
  html[data-theme="prisma"] .stat-box b { font-size:18px; }
  html[data-theme="prisma"] .alert-card { padding:16px 13px; }
  html[data-theme="prisma"] .alert-card__grid { grid-template-columns:repeat(2,minmax(0,1fr)); row-gap:13px; }
  html[data-theme="prisma"] .alert-card__grid b { font-size:13px; }
  html[data-theme="prisma"] .alert-card__time { font-size:9px; }
  html[data-theme="prisma"] .assert-ring-wrap { width:80px; height:80px; }
  html[data-theme="prisma"] .assert-ring-wrap svg { width:80px; height:80px; }
  html[data-theme="prisma"] .assert-ring-label b { font-size:17px; }
  html[data-theme="prisma"] .sentimento-hero-info { min-width:0; flex-basis:100%; }
  html[data-theme="prisma"] .phantom-coin-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  html[data-theme="prisma"] :is(#view-lesson,#view-calc,#view-pagamento) .content { padding-left:16px; padding-right:16px; }
}
@media (max-width:380px) {
  html[data-theme="prisma"] .view-header__title { font-size:21px; }
  html[data-theme="prisma"] .row2 { grid-template-columns:1fr; }
  html[data-theme="prisma"] .hero-panel { flex-wrap:wrap; }
  html[data-theme="prisma"] .calc-summary { grid-template-columns:1fr; }
}
@media (prefers-reduced-motion:reduce) {
  html[data-theme="prisma"] *,html[data-theme="prisma"] *::before,html[data-theme="prisma"] *::after {
    animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; scroll-behavior:auto!important;
  }
}
