/* Estilos opcionais do Estúdio; sem data-tema, valem os arquivos originais. */
html[data-visual="estudio"][data-tema="nitido"],
html[data-visual="estudio"][data-tema="papel"]{
  --font-body:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
  --font-display:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
}

/* Nítido */
html[data-visual="estudio"][data-tema="nitido"][data-mode="claro"],
html[data-visual="estudio"][data-tema="nitido"][data-mode="auto"]{
  --bg:#eceef2; --card:#ffffff; --soft:#f5f6f8; --field:#ffffff; --chip:#e7eaee; --track:#e1e5ea;
  --ink:#0e1217; --ink-2:#38414c; --ink-3:#5a6573; --inverse:#0e1217; --on-inverse:#fff;
  --line:#dbdfe5; --line-2:#c2c8d0; --nav-bg:#ffffff; --nav-hover:rgba(14,18,23,.05);
  --rail:#0e1217; --rail-ink:#97a1ad; --rail-on:#ffffff; --rail-hover:rgba(255,255,255,.08); --rail-active:rgba(255,255,255,.14);
  --shadow:0 1px 2px rgba(14,18,23,.06),0 1px 4px rgba(14,18,23,.04);
  --shadow-pop:0 16px 44px rgba(14,18,23,.18);
  --accent-soft:color-mix(in srgb,var(--accent) 10%,var(--card));
  --accent-line:color-mix(in srgb,var(--accent) 40%,var(--card));
  --theme-col:#e3e6eb;
}
html[data-visual="estudio"][data-tema="nitido"][data-mode="escuro"]{
  --bg:#0a0c0f; --card:#161a1f; --soft:#1d2127; --field:#12151a; --chip:#252a31; --track:#252a31;
  --ink:#f2f4f7; --ink-2:#c8cfd8; --ink-3:#9ba4b0; --inverse:#f2f4f7; --on-inverse:#0e1217;
  --line:#2a3039; --line-2:#3c444f; --nav-bg:#101317; --nav-hover:rgba(255,255,255,.06);
  --rail:#060708; --rail-ink:#8a94a0; --rail-on:#ffffff; --rail-hover:rgba(255,255,255,.08); --rail-active:rgba(255,255,255,.14);
  --shadow:0 1px 2px rgba(0,0,0,.6); --shadow-pop:0 18px 50px rgba(0,0,0,.7);
  --accent-soft:color-mix(in srgb,var(--accent) 18%,var(--card));
  --accent-line:color-mix(in srgb,var(--accent) 55%,var(--card));
  --theme-col:#111418;
}
@media (prefers-color-scheme:dark){
  html[data-visual="estudio"][data-tema="nitido"][data-mode="auto"]{
    --bg:#0a0c0f; --card:#161a1f; --soft:#1d2127; --field:#12151a; --chip:#252a31; --track:#252a31;
    --ink:#f2f4f7; --ink-2:#c8cfd8; --ink-3:#9ba4b0; --inverse:#f2f4f7; --on-inverse:#0e1217;
    --line:#2a3039; --line-2:#3c444f; --nav-bg:#101317; --nav-hover:rgba(255,255,255,.06);
    --rail:#060708; --rail-ink:#8a94a0; --rail-on:#ffffff; --rail-hover:rgba(255,255,255,.08); --rail-active:rgba(255,255,255,.14);
    --shadow:0 1px 2px rgba(0,0,0,.6); --shadow-pop:0 18px 50px rgba(0,0,0,.7);
    --accent-soft:color-mix(in srgb,var(--accent) 18%,var(--card));
    --accent-line:color-mix(in srgb,var(--accent) 55%,var(--card));
    --theme-col:#111418;
  }
}
html[data-visual="estudio"][data-tema="nitido"] .kcol{background:var(--theme-col)}
html[data-visual="estudio"][data-tema="nitido"] .kcard{background:var(--card);border-color:var(--line)}
html[data-visual="estudio"][data-tema="nitido"] .st-panel{border-right-color:var(--line)}

/* Marcante */
html[data-visual="estudio"][data-tema="marcante"]{
  --font-body:Manrope,system-ui,-apple-system,"Segoe UI",sans-serif;
  --font-display:Manrope,system-ui,-apple-system,"Segoe UI",sans-serif;
}
html[data-visual="estudio"][data-tema="marcante"][data-mode="claro"],
html[data-visual="estudio"][data-tema="marcante"][data-mode="auto"]{
  --bg:#e7e8eb; --card:#ffffff; --soft:#f3f4f6; --field:#ffffff; --chip:#e4e6ea; --track:#dcdfe4;
  --ink:#0b0d10; --ink-2:#2f363f; --ink-3:#535b66; --inverse:#0b0d10; --on-inverse:#fff;
  --line:#d3d7dd; --line-2:#b5bcc6; --nav-bg:#15181d; --nav-hover:rgba(255,255,255,.07);
  --rail:#0b0d10; --rail-ink:#9aa3ae; --rail-on:#ffffff; --rail-hover:rgba(255,255,255,.08); --rail-active:rgba(255,255,255,.14);
  --shadow:0 1px 2px rgba(11,13,16,.08),0 3px 10px rgba(11,13,16,.07);
  --shadow-pop:0 18px 50px rgba(11,13,16,.22);
  --accent-soft:color-mix(in srgb,var(--accent) 10%,var(--card));
  --accent-line:color-mix(in srgb,var(--accent) 40%,var(--card));
  --theme-col:#e0e2e6;
}
html[data-visual="estudio"][data-tema="marcante"][data-mode="escuro"]{
  --bg:#07080a; --card:#15181c; --soft:#1c2025; --field:#111418; --chip:#24282e; --track:#24282e;
  --ink:#ffffff; --ink-2:#d3d8de; --ink-3:#a5acb5; --inverse:#ffffff; --on-inverse:#0b0d10;
  --line:#2e333a; --line-2:#424852; --nav-bg:#0e1013; --nav-hover:rgba(255,255,255,.07);
  --rail:#000000; --rail-ink:#9aa3ae; --rail-on:#ffffff; --rail-hover:rgba(255,255,255,.08); --rail-active:rgba(255,255,255,.14);
  --shadow:0 2px 8px rgba(0,0,0,.6); --shadow-pop:0 18px 50px rgba(0,0,0,.75);
  --accent-ink:color-mix(in oklch,var(--accent) 70%,#fff);
  --accent-soft:color-mix(in srgb,var(--accent) 18%,var(--card));
  --accent-line:color-mix(in srgb,var(--accent) 55%,var(--card));
  --theme-col:#101216;
}
@media (prefers-color-scheme:dark){
  html[data-visual="estudio"][data-tema="marcante"][data-mode="auto"]{
    --bg:#07080a; --card:#15181c; --soft:#1c2025; --field:#111418; --chip:#24282e; --track:#24282e;
    --ink:#ffffff; --ink-2:#d3d8de; --ink-3:#a5acb5; --inverse:#ffffff; --on-inverse:#0b0d10;
    --line:#2e333a; --line-2:#424852; --nav-bg:#0e1013; --nav-hover:rgba(255,255,255,.07);
    --rail:#000000; --rail-ink:#9aa3ae; --rail-on:#ffffff; --rail-hover:rgba(255,255,255,.08); --rail-active:rgba(255,255,255,.14);
    --shadow:0 2px 8px rgba(0,0,0,.6); --shadow-pop:0 18px 50px rgba(0,0,0,.75);
    --accent-ink:color-mix(in oklch,var(--accent) 70%,#fff);
    --accent-soft:color-mix(in srgb,var(--accent) 18%,var(--card));
    --accent-line:color-mix(in srgb,var(--accent) 55%,var(--card));
    --theme-col:#101216;
  }
}
html[data-visual="estudio"][data-tema="marcante"] .st-panel{border-right-color:#343a43}
html[data-visual="estudio"][data-tema="marcante"] .st-panel .st-logo,
html[data-visual="estudio"][data-tema="marcante"] .st-panel .st-top,
html[data-visual="estudio"][data-tema="marcante"] .st-panel .agone{color:#e9ecf0}
html[data-visual="estudio"][data-tema="marcante"] .st-panel .st-g,
html[data-visual="estudio"][data-tema="marcante"] .st-panel .st-fold{color:#9aa3ae}
html[data-visual="estudio"][data-tema="marcante"] .st-panel button[data-page],
html[data-visual="estudio"][data-tema="marcante"] .st-panel button[data-open]{color:#e9ecf0}
html[data-visual="estudio"][data-tema="marcante"] .st-panel button svg{color:#9aa3ae}
html[data-visual="estudio"][data-tema="marcante"] .st-panel button:hover{background:rgba(255,255,255,.07);color:#fff}
html[data-visual="estudio"][data-tema="marcante"] .st-panel button[aria-current="page"]{background:rgba(255,255,255,.10);color:#fff;box-shadow:inset 3px 0 0 var(--accent)}
html[data-visual="estudio"][data-tema="marcante"] .st-panel button[aria-current="page"] svg{color:var(--accent)}
html[data-visual="estudio"][data-tema="marcante"] .st-panel .agsel{background:#20252b;border-color:#424852;color:#e9ecf0}
html[data-visual="estudio"][data-tema="marcante"] .kcol{background:var(--theme-col)}
html[data-visual="estudio"][data-tema="marcante"] .kcol header{border-top:3px solid var(--stage-color,var(--accent));padding-top:8px}
html[data-visual="estudio"][data-tema="marcante"] .kcard{border:1.5px solid var(--line);border-radius:12px}
html[data-visual="estudio"][data-tema="marcante"] .head h1,
html[data-visual="estudio"][data-tema="marcante"] .kname,
html[data-visual="estudio"][data-tema="marcante"] .kcol header b,
html[data-visual="estudio"][data-tema="marcante"] .card h2{font-weight:800}
html[data-visual="estudio"][data-tema="marcante"] .btn.accent{background:var(--accent);color:var(--on-accent,#fff)}

/* Papel */
html[data-visual="estudio"][data-tema="papel"][data-mode="claro"],
html[data-visual="estudio"][data-tema="papel"][data-mode="auto"]{
  --bg:#ffffff; --card:#ffffff; --soft:#f4f5f7; --field:#ffffff; --chip:#eceef1; --track:#e4e7eb;
  --ink:#000000; --ink-2:#2b3036; --ink-3:#4f565e; --inverse:#000000; --on-inverse:#fff;
  --line:#d5d9df; --line-2:#aeb5be; --nav-bg:#f7f8fa; --nav-hover:rgba(0,0,0,.05);
  --rail:#111317; --rail-ink:#aeb7c2; --rail-on:#ffffff; --rail-hover:rgba(255,255,255,.08); --rail-active:rgba(255,255,255,.14);
  --shadow:none; --shadow-pop:0 12px 36px rgba(0,0,0,.16);
  --accent-soft:color-mix(in srgb,var(--accent) 10%,var(--card));
  --accent-line:color-mix(in srgb,var(--accent) 40%,var(--card));
  --theme-col:#f1f3f5;
}
html[data-visual="estudio"][data-tema="papel"][data-mode="escuro"]{
  --bg:#0b0b0c; --card:#111113; --soft:#18181b; --field:#0f0f11; --chip:#222226; --track:#222226;
  --ink:#fafafa; --ink-2:#d6d6da; --ink-3:#a6a6ad; --inverse:#fafafa; --on-inverse:#0b0b0c;
  --line:#2c2c31; --line-2:#45454c; --nav-bg:#0f0f11; --nav-hover:rgba(255,255,255,.06);
  --rail:#000000; --rail-ink:#a6a6ad; --rail-on:#ffffff; --rail-hover:rgba(255,255,255,.08); --rail-active:rgba(255,255,255,.14);
  --shadow:none; --shadow-pop:0 12px 36px rgba(0,0,0,.7);
  --accent-soft:color-mix(in srgb,var(--accent) 18%,var(--card));
  --accent-line:color-mix(in srgb,var(--accent) 55%,var(--card));
  --theme-col:#161619;
}
@media (prefers-color-scheme:dark){
  html[data-visual="estudio"][data-tema="papel"][data-mode="auto"]{
    --bg:#0b0b0c; --card:#111113; --soft:#18181b; --field:#0f0f11; --chip:#222226; --track:#222226;
    --ink:#fafafa; --ink-2:#d6d6da; --ink-3:#a6a6ad; --inverse:#fafafa; --on-inverse:#0b0b0c;
    --line:#2c2c31; --line-2:#45454c; --nav-bg:#0f0f11; --nav-hover:rgba(255,255,255,.06);
    --rail:#000000; --rail-ink:#a6a6ad; --rail-on:#ffffff; --rail-hover:rgba(255,255,255,.08); --rail-active:rgba(255,255,255,.14);
    --shadow:none; --shadow-pop:0 12px 36px rgba(0,0,0,.7);
    --accent-soft:color-mix(in srgb,var(--accent) 18%,var(--card));
    --accent-line:color-mix(in srgb,var(--accent) 55%,var(--card));
    --theme-col:#161619;
  }
}
html[data-visual="estudio"][data-tema="papel"] .kcol{background:var(--theme-col);border-color:var(--line-2)}
html[data-visual="estudio"][data-tema="papel"] .card,
html[data-visual="estudio"][data-tema="papel"] .kcard,
html[data-visual="estudio"][data-tema="papel"] .drawer,
html[data-visual="estudio"][data-tema="papel"] .ch-b,
html[data-visual="estudio"][data-tema="papel"] .ch-dock,
html[data-visual="estudio"][data-tema="papel"] .pj-card,
html[data-visual="estudio"][data-tema="papel"] .pj-rows{border:1px solid var(--line-2);box-shadow:none}
html[data-visual="estudio"][data-tema="papel"] input,
html[data-visual="estudio"][data-tema="papel"] select,
html[data-visual="estudio"][data-tema="papel"] textarea{border-color:var(--line-2)}
html[data-visual="estudio"][data-tema="papel"] .st-panel button[aria-current="page"]{box-shadow:inset 0 0 0 1px var(--line-2)}
html[data-visual="estudio"][data-tema="papel"] .stat.hl,
html[data-visual="estudio"][data-tema="papel"] .fn.note,
html[data-visual="estudio"][data-tema="papel"] .w-sticky{box-shadow:none}

/* Superfícies e selos com cores fixas nas telas do painel. */
html[data-visual="estudio"][data-tema="nitido"] .rp-prev iframe,
html[data-visual="estudio"][data-tema="marcante"] .rp-prev iframe,
html[data-visual="estudio"][data-tema="papel"] .rp-prev iframe{background:var(--soft)}
html[data-visual="estudio"][data-tema="nitido"] .pj-appr.pendente,
html[data-visual="estudio"][data-tema="marcante"] .pj-appr.pendente,
html[data-visual="estudio"][data-tema="papel"] .pj-appr.pendente{background:color-mix(in srgb,#b77908 18%,var(--card));color:color-mix(in oklch,#b77908 58%,var(--ink))}
html[data-visual="estudio"][data-tema="nitido"] .rp-pending,
html[data-visual="estudio"][data-tema="marcante"] .rp-pending,
html[data-visual="estudio"][data-tema="papel"] .rp-pending{color:color-mix(in oklch,#b77908 58%,var(--ink))}
html[data-visual="estudio"][data-tema="nitido"] .rp-send small,
html[data-visual="estudio"][data-tema="marcante"] .rp-send small,
html[data-visual="estudio"][data-tema="papel"] .rp-send small{color:var(--bad)}
html[data-visual="estudio"][data-tema="nitido"] .ctag,
html[data-visual="estudio"][data-tema="marcante"] .ctag,
html[data-visual="estudio"][data-tema="papel"] .ctag{background:color-mix(in srgb,var(--c) 16%,var(--card));color:var(--ink-2)}
html[data-visual="estudio"][data-tema="nitido"] .kdays.warn,
html[data-visual="estudio"][data-tema="marcante"] .kdays.warn,
html[data-visual="estudio"][data-tema="papel"] .kdays.warn{color:var(--ink-2)}

/* No escuro, fundos claros fixos viram superfícies escuras. */
html[data-visual="estudio"][data-tema="nitido"][data-mode="escuro"] .kcontact,
html[data-visual="estudio"][data-tema="marcante"][data-mode="escuro"] .kcontact,
html[data-visual="estudio"][data-tema="papel"][data-mode="escuro"] .kcontact{background:var(--chip);color:var(--ink-2)}
html[data-visual="estudio"][data-tema="nitido"][data-mode="escuro"] .ch-notechip,
html[data-visual="estudio"][data-tema="marcante"][data-mode="escuro"] .ch-notechip,
html[data-visual="estudio"][data-tema="papel"][data-mode="escuro"] .ch-notechip{background:#3a2a14;border-color:#7a5524;color:#f6d6a8}
html[data-visual="estudio"][data-tema="nitido"][data-mode="escuro"] .ch-comp.noting textarea.in,
html[data-visual="estudio"][data-tema="marcante"][data-mode="escuro"] .ch-comp.noting textarea.in,
html[data-visual="estudio"][data-tema="papel"][data-mode="escuro"] .ch-comp.noting textarea.in{background:#2a2016;border-color:#7a5524}
html[data-visual="estudio"][data-tema="nitido"][data-mode="escuro"] .ch-tools .icon[aria-pressed="true"],
html[data-visual="estudio"][data-tema="marcante"][data-mode="escuro"] .ch-tools .icon[aria-pressed="true"],
html[data-visual="estudio"][data-tema="papel"][data-mode="escuro"] .ch-tools .icon[aria-pressed="true"]{background:#3a2a14;color:#f6d6a8}
@media (prefers-color-scheme:dark){
  html[data-visual="estudio"][data-tema="nitido"][data-mode="auto"] .kcontact,
  html[data-visual="estudio"][data-tema="marcante"][data-mode="auto"] .kcontact,
  html[data-visual="estudio"][data-tema="papel"][data-mode="auto"] .kcontact{background:var(--chip);color:var(--ink-2)}
  html[data-visual="estudio"][data-tema="nitido"][data-mode="auto"] .ch-notechip,
  html[data-visual="estudio"][data-tema="marcante"][data-mode="auto"] .ch-notechip,
  html[data-visual="estudio"][data-tema="papel"][data-mode="auto"] .ch-notechip{background:#3a2a14;border-color:#7a5524;color:#f6d6a8}
  html[data-visual="estudio"][data-tema="nitido"][data-mode="auto"] .ch-comp.noting textarea.in,
  html[data-visual="estudio"][data-tema="marcante"][data-mode="auto"] .ch-comp.noting textarea.in,
  html[data-visual="estudio"][data-tema="papel"][data-mode="auto"] .ch-comp.noting textarea.in{background:#2a2016;border-color:#7a5524}
  html[data-visual="estudio"][data-tema="nitido"][data-mode="auto"] .ch-tools .icon[aria-pressed="true"],
  html[data-visual="estudio"][data-tema="marcante"][data-mode="auto"] .ch-tools .icon[aria-pressed="true"],
  html[data-visual="estudio"][data-tema="papel"][data-mode="auto"] .ch-tools .icon[aria-pressed="true"]{background:#3a2a14;color:#f6d6a8}
}

/* Clássico: os tons do visual Clássico (admin.css) dentro do Estúdio; fontes e desenho do Estúdio continuam. */
html[data-visual="estudio"][data-tema="classico"][data-mode="claro"],
html[data-visual="estudio"][data-tema="classico"][data-mode="auto"]{
  --bg:#eeede9; --card:#fff; --soft:#f6f5f2; --field:#fff; --chip:#ecebe6; --track:#e6e4de;
  --ink:#1a1411; --ink-2:#4d4540; --ink-3:#736961; --inverse:#1a1411; --on-inverse:#fff;
  --line:#e7e3dd; --line-2:#cfc9c1; --nav-bg:#e3e1db; --nav-hover:rgba(26,20,17,.06);
  --rail:#1a1411; --rail-ink:#a89d94; --rail-on:#f6f1ec; --rail-hover:rgba(255,255,255,.07); --rail-active:rgba(255,255,255,.11);
  --shadow:0 1px 2px rgba(26,20,17,.04),0 8px 24px rgba(26,20,17,.05);
  --shadow-pop:0 16px 40px rgba(26,20,17,.14);
}
html[data-visual="estudio"][data-tema="classico"][data-mode="escuro"]{
  --bg:#121010; --card:#1c1917; --soft:#252120; --field:#211d1b; --chip:#2c2725; --track:#2c2725;
  --ink:#f5f0eb; --ink-2:#cfc6be; --ink-3:#a1958c; --inverse:#f5f0eb; --on-inverse:#1a1411;
  --line:#322d2a; --line-2:#4a423d; --nav-bg:#181514; --nav-hover:rgba(255,255,255,.06);
  --rail:#0c0a09; --rail-ink:#8f857c; --rail-on:#f6f1ec; --rail-hover:rgba(255,255,255,.07); --rail-active:rgba(255,255,255,.11);
  --shadow:0 1px 2px rgba(0,0,0,.4); --shadow-pop:0 16px 40px rgba(0,0,0,.55);
}
@media (prefers-color-scheme:dark){
  html[data-visual="estudio"][data-tema="classico"][data-mode="auto"]{
    --bg:#121010; --card:#1c1917; --soft:#252120; --field:#211d1b; --chip:#2c2725; --track:#2c2725;
    --ink:#f5f0eb; --ink-2:#cfc6be; --ink-3:#a1958c; --inverse:#f5f0eb; --on-inverse:#1a1411;
    --line:#322d2a; --line-2:#4a423d; --nav-bg:#181514; --nav-hover:rgba(255,255,255,.06);
    --rail:#0c0a09; --rail-ink:#8f857c; --rail-on:#f6f1ec; --rail-hover:rgba(255,255,255,.07); --rail-active:rgba(255,255,255,.11);
    --shadow:0 1px 2px rgba(0,0,0,.4); --shadow-pop:0 16px 40px rgba(0,0,0,.55);
  }
}
