/* Adaptação do tema suave do AVA aos componentes existentes da loja. */
@media screen {
  html { background: #f8f6f2; }
  body.loja-soft-theme {
    --page: var(--rd-paper); --page-soft: #f1edf8;
    --sidebar: #fffdf9; --sidebar-2: #f1ebf8;
    --panel: var(--rd-surface); --panel-strong: var(--rd-lavender);
    --field: #fcfafe; --field-light: #fffdfb;
    --line: var(--rd-line); --line-soft: #e8dfef;
    --ink: var(--rd-ink); --muted: var(--rd-muted);
    --green: var(--rd-primary); --green-dark: #6d55a8;
    --green-bright: #9b86cd; --accent: #bca8dd;
    --danger: #a34d69; --warning: #966c2d;
    --shadow: #8e7da31b; --shadow-soft: #7566870e;
    color: var(--rd-ink); font-family: var(--rd-font); line-height: 1.6;
  }
  .loja-soft-theme :is(h1,h2,h3,h4,.page-title) { color: #493b5a; letter-spacing: -.025em; line-height: 1.2; }
  .loja-soft-theme :is(label,legend) { color: #6e597b; font-weight: 650; }
  .loja-soft-theme a { color: #6d55a8; text-underline-offset: 3px; }
  .loja-soft-theme :is(p,.muted-inline,.section-heading span) { color: var(--rd-muted); }
  .loja-soft-theme .wrap { width: min(1440px,94%); min-height: 100vh; padding: 20px 0 56px; margin-inline: auto; }
  .loja-soft-theme .topbar {
    position: sticky; inset: auto; top: 12px; width: 100%; min-height: 86px;
    display: flex; flex-direction: row; align-items: center; gap: 22px;
    padding: 12px 22px; margin-bottom: 28px;
    background: #fffdf9f2; border: 1px solid #e8e2ed; border-radius: 24px;
    box-shadow: 0 7px 25px #74658a09; backdrop-filter: blur(18px);
  }
  .loja-soft-theme .brand {
    flex: 0 0 auto; display: flex; align-items: center; gap: 12px;
    min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0;
    background: transparent; box-shadow: none; text-align: left;
  }
  .loja-soft-theme .brand img { width: 64px; height: 64px; max-height: 64px; }
  .loja-soft-theme .brand span { max-width: 125px; margin: 0; color: #88719e; font-size: 12px; font-weight: 600; }
  .loja-soft-theme .nav { display: flex; flex: 1; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
  .loja-soft-theme .nav a { flex: 0 0 auto; min-height: 42px; padding: 9px 12px; color: #63576e; border: 1px solid transparent; background: transparent; box-shadow: none; font-size: 13px; font-weight: 650; }
  .loja-soft-theme .nav a:hover { border-color: #e3d8ee; background: #f1ebf8; color: #6d55a8; }
  .loja-soft-theme .nav a::before { color: #7962a6; background-color: currentColor; }
  .loja-soft-theme .nav-icon { color: #7962a6; }
  .loja-soft-theme .nav-icon { background: #eee6f8; }
  .loja-soft-theme .nav a:hover::before { background-color: #7962a6; }
  .loja-soft-theme :is(.hero,.catalog-hero) {
    margin-bottom: 24px; padding: clamp(26px,4vw,48px);
    border: 1px solid #fffc; border-radius: 32px;
    background: radial-gradient(ellipse at 84% 12%,#eee5fc9c,transparent 52%),linear-gradient(125deg,#fffefc,#f8f3fc);
    box-shadow: inset 0 1px 2px #fff,0 22px 55px #8e7da315;
  }
  .loja-soft-theme .hero h1 { max-width: 1020px; font-size: clamp(30px,3.6vw,48px); }
  .loja-soft-theme .hero p { max-width: 900px; margin-top: 8px; }
  .loja-soft-theme .hero::after { top: 20px; right: 20px; padding: 6px 12px; background: #eee6f8; color: #7b619e; font-size: 11px; }
  .loja-soft-theme.admin-page .hero { padding-right: 100px; }
  .loja-soft-theme :is(.card,.metric-card) { min-width: 0; background: var(--rd-surface); border-color: #e7dfee; border-radius: var(--rd-radius); box-shadow: var(--rd-shadow); }
  .loja-soft-theme .card-body { padding: 24px; gap: 16px; }
  .loja-soft-theme .card-body :is(h2,h3) { margin: 0; font-size: 21px; line-height: 1.35; }
  .loja-soft-theme .course-card { display: flex; flex-direction: column; }
  .loja-soft-theme .course-card .card-body { flex: 1; grid-template-rows: auto auto 1fr auto auto; }
  .loja-soft-theme .course-card:hover { box-shadow: 0 20px 38px #8f7da51b; }
  .loja-soft-theme :is(.card-body h2,.card-body h3,.category-panel h2,.category-panel h3,.price,.metric-card strong,.bank-card h3,.study-item strong,.bar-row b,.chart-labels strong,.print-cover h2,.print-training h2,.print-question h3,.support-material-block h2,.support-material-item strong) { color: #594468; }
  .loja-soft-theme .course-meta span { background: #f4eef9; border-color: #e6dcf0; color: #7a628f; font-weight: 600; font-size: 11px; }
  .loja-soft-theme .grid { gap: 22px; }
  .loja-soft-theme :is(.button,button) { color: #6a528f; background: #f2ecf8; border: 1px solid #e0d5ec; border-radius: 15px; box-shadow: inset 0 1px #fff,0 4px 0 #e7dff0; font-weight: 650; transition: background .18s,box-shadow .18s; }
  .loja-soft-theme :is(.button,button):hover { color: #5b427e; background: #eae0f5; }
  .loja-soft-theme :is(.button.primary,button.primary,.nav a.primary) { color: #fff; background: linear-gradient(135deg,var(--rd-button-start),var(--rd-button-end)); border-color: #7157a920; box-shadow: inset 0 1px #ffffff38,0 4px 0 #ddd2ed,0 9px 18px #8872ae14; }
  .loja-soft-theme :is(.button.primary,button.primary,.nav a.primary):hover { color: #fff; background: linear-gradient(135deg,var(--rd-button-hover-start),var(--rd-button-hover-end)); }
  .loja-soft-theme .nav a.primary::before { background-color: #fff; }
  .loja-soft-theme :is(button.danger,.button.danger) { color: #974460; background: #fae7eb; border-color: #e7cbd6; box-shadow: inset 0 1px #fff,0 4px 0 #f0d9e3; }
  .loja-soft-theme :is(button.danger,.button.danger):hover { background: #f3d9e3; }
  .loja-soft-theme :is(button,.button):disabled { background: #ece8ef; color: #817887; box-shadow: none; cursor: not-allowed; }
  .loja-soft-theme :is(input:not([type=checkbox]):not([type=radio]),textarea,select) { background: #fcfafef2; border: 1px solid #ded6e8; color: #443950; border-radius: 13px; box-shadow: inset 0 2px 4px #7f6d9305; }
  .loja-soft-theme :is(input,textarea,select):focus { border-color: #ab95d1; background: #fffafd; box-shadow: 0 0 0 3px #c6b5e63d; }
  .loja-soft-theme :is(input[type=checkbox],input[type=radio],input[type=range]) { accent-color: #856bbd; }
  .loja-soft-theme :is(input,textarea)::placeholder { color: #857b90; }
  .loja-soft-theme .filter-chip { width: auto; background: #f6f0fa; border-color: #e4d9ee; color: #765b94; box-shadow: none; font-size: 13px; font-weight: 650; }
  .loja-soft-theme :is(.filter-chip.active,.filter-chip:hover) { color: #fff; background: linear-gradient(135deg,#947cc8,#7d63b1); border-color: #9279bb; }
  .loja-soft-theme :is(.table-wrap,.qr-panel) { border: 1px solid #e4dcea; border-radius: 17px; background: #fffdfd; }
  .loja-soft-theme .qr-panel { box-shadow: var(--rd-shadow); }
  .loja-soft-theme table { background: #fffdfd; color: #534360; }
  .loja-soft-theme :is(th,td) { border-color: #eee6f2; }
  .loja-soft-theme th { background: #f0eaf8; color: #69517d; border-bottom-color: #e3d8ee; }
  .loja-soft-theme td { color: #594861; border-bottom-color: #eee6f2; }
  .loja-soft-theme tbody tr:hover { background: #faf5fd; }
  .loja-soft-theme :is(.status,.notice) { border-color: #e4d8ee; background: #f4edf9; color: #755e8e; font-weight: 600; }
  .loja-soft-theme :is(.status.ok,.trend-up) { background: #eaf3eb; border-color: #d0e4d3; color: #47745d; }
  .loja-soft-theme :is(.notice.error,.trend-down) { background: #fae7eb; border-color: #e7cbd6; color: #974460; }
  .loja-soft-theme :is(.trend-down span,.trend-down strong) { color: #974460; }
  .loja-soft-theme .trend-steady { border-color: #eadcbb; background: #fcf4e2; }
  .loja-soft-theme :is(.trend-steady span,.trend-steady strong) { color: #866224; }
  .loja-soft-theme .metric-card { background: #eee8f8; border-color: #fff9; }
  .loja-soft-theme .metric-card:nth-child(3n+2) { background: #f7e7ec; }
  .loja-soft-theme .metric-card:nth-child(3n) { background: #faf0d9; }
  .loja-soft-theme .metric-card span { color: #7b6b84; font-weight: 600; }
  .loja-soft-theme :is(.edit-cover,.course-lessons-editor,.lesson-edit-card,.support-materials,.support-material-item,.quiz-question,.quiz-option,.quiz-comment,.study-item,.bank-card,.check-row,.line-chart-wrap,.chart-labels span,.print-filter,.print-cover,.print-training,.print-question,.print-comment) { background: #fbf7fd; border-color: #e4d8ee; box-shadow: none; }
  .loja-soft-theme :is(.support-material-item:hover,.study-item.priority) { background: #f1e9f9; border-color: #cbb9e3; }
  .loja-soft-theme :is(.material-icon,.quiz-option span,.bar-track) { color: #795eaa; background: #eee6f8; border-color: #e1d5ee; }
  .loja-soft-theme :is(.quiz-question.correct,.quiz-option.is-correct,.print-options li.correct) { background: #eaf3eb; border-color: #c4dfca; }
  .loja-soft-theme :is(.quiz-question.wrong,.quiz-option.is-wrong,.print-options li.wrong) { background: #fae7eb; border-color: #e6c0d0; }
  .loja-soft-theme .print-question.correct { border-color: #c4dfca; }
  .loja-soft-theme .print-question.wrong { border-color: #e6c0d0; }
  .loja-soft-theme .bar-track span { background: linear-gradient(90deg,#b09ad8,#8e70ba); }
  .loja-soft-theme :is(.chart-line,.chart-point) { stroke: #9577bd; }
  .loja-soft-theme .chart-grid { stroke: #e7deef; }
  .loja-soft-theme .chart-axis { stroke: #b9a8ca; }
  .loja-soft-theme .chart-point { fill: #fffdfb; }
  .loja-soft-theme .lesson-nav { background: #fffdfbf2; border-color: #e1d5ed; box-shadow: var(--rd-shadow); }
  .loja-soft-theme .reader img { box-shadow: var(--rd-shadow); }
  .loja-soft-theme .ai-output { background: #fbf7fd; border-color: #e4d8ee; }
  .loja-soft-theme .ai-loading { background: #51415e66; }
  .loja-soft-theme .ai-loading-card { background: linear-gradient(145deg,#fffdfb,#f1e9f9); border-color: #dfd1ed; box-shadow: 0 24px 80px #75668730; }
  .loja-soft-theme .ai-loading-bar { background: #eae0f5; }
  .loja-soft-theme .ai-loading-bar span { background: linear-gradient(90deg,#947cc8,#c4a5d8,#ebbed2); }
  .loja-soft-theme .drag-handle { background: #795eaae6; border-color: #fff8; color: #fff; box-shadow: var(--rd-shadow); }
  .loja-soft-theme .sortable-course.is-dragging { box-shadow: 0 18px 42px #8f7da52e; }
  body.loja-soft-theme.auth-page { padding: 28px 0; color: var(--rd-ink); background: radial-gradient(ellipse at 12% 10%,#e6daf799,transparent 40%),radial-gradient(ellipse at 88% 60%,#f9e0e580,transparent 40%),#f8f6f2; }
  body.loja-soft-theme.auth-page::before { display: none; }
  body.loja-soft-theme.auth-page .wrap { width: min(500px,92%); min-height: auto; padding: 0; }
  body.loja-soft-theme.auth-page .card { background: #fffdfb; border: 1px solid #e7ddee; border-radius: 29px; box-shadow: inset 0 1px 2px #fff,0 20px 60px #8c759d16; }
  body.loja-soft-theme.auth-page .card-body { padding: 32px; }
  body.loja-soft-theme.auth-page .page-title { color: #4b3c59; }
  body.loja-soft-theme.auth-page :is(p,label) { color: #807087; }
  body.loja-soft-theme.auth-page a { color: #7656a6; }
  body.loja-soft-theme.auth-page .auth-logo span { color: #88719e; font-weight: 600; }
  body.loja-soft-theme.auth-page .auth-logo img { filter: drop-shadow(0 6px 12px #aa90b01a); }
  body.loja-soft-theme.auth-page button.primary { background: linear-gradient(135deg,var(--rd-button-start),var(--rd-button-end)); border-color: #7157a920; box-shadow: inset 0 1px #ffffff38,0 4px 0 #ddd2ed,0 9px 18px #8872ae14; color: #fff; }
  body.loja-soft-theme.auth-page button.primary:hover { background: linear-gradient(135deg,var(--rd-button-hover-start),var(--rd-button-hover-end)); }
  body.loja-soft-theme.auth-page .notice { background: #f4edf9; color: #755e8e; }
  body.loja-soft-theme.auth-page .notice.error { color: #974460; background: #fae7eb; }
  @media(min-width:981px) { .loja-soft-theme .metrics-grid { grid-template-columns: repeat(4,minmax(0,1fr)); } }
  @media(min-width:641px) and (max-width:1100px) { .loja-soft-theme .grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
  @media(max-width:980px) {
    .loja-soft-theme .topbar { flex-wrap: wrap; gap: 10px; padding: 12px 16px; }
    .loja-soft-theme .nav { justify-content: flex-start; }
    .loja-soft-theme .metrics-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  }
  @media(max-width:640px) {
    .loja-soft-theme .wrap { width: 94%; padding-top: 10px; }
    .loja-soft-theme .topbar { top: 6px; margin-bottom: 20px; border-radius: 20px; }
    .loja-soft-theme .brand img { width: 48px; height: 48px; max-height: 48px; }
    .loja-soft-theme .brand span { max-width: none; }
    .loja-soft-theme .nav { width: 100%; flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: 5px; scrollbar-width: thin; scrollbar-color: #c9bae5 transparent; }
    .loja-soft-theme .nav a { white-space: nowrap; gap: 6px; padding: 8px; font-size: 12px; }
    .loja-soft-theme .nav a::before { width: 20px; height: 20px; flex-basis: 20px; }
    .loja-soft-theme .hero { padding: 26px 22px; border-radius: 27px; }
    .loja-soft-theme.admin-page .hero { padding-top: 56px; padding-right: 22px; }
    .loja-soft-theme .grid { grid-template-columns: minmax(0,1fr); }
    .loja-soft-theme .card-body { padding: 20px; }
    .loja-soft-theme .metrics-grid { gap: 12px; }
    .loja-soft-theme .metric-card { padding: 18px 12px; }
    .loja-soft-theme .filter-row { gap: 8px; }
    .loja-soft-theme .filter-chip { font-size: 12px; padding: 8px 12px; }
    body.loja-soft-theme.auth-page .card-body { padding: 26px 22px; }
  }
  @media(prefers-reduced-motion:reduce) {
    .loja-soft-theme :is(.course-card,.sortable-course,.nav a,.button,button) { transition: none; }
    .loja-soft-theme .course-card:hover { transform: none; }
    .loja-soft-theme .ai-loading-bar span { animation: none; }
  }
}
