/* Kx Otimização — cartões independentes no mesmo cromo carmesim do aplicativo. */
.optimization {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 18px 22px 14px;
}

.opt-head {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding: 2px 4px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.opt-head h1 { margin: 4px 0 2px; font-family: var(--display); font-size: 27px; line-height: 1.05; letter-spacing: -.7px; }
.opt-head p { max-width: 650px; margin: 7px 0 0; color: #858591; font-size: 12px; line-height: 1.5; }
.opt-summary { display: flex; align-items: stretch; gap: 8px; }
.opt-counter {
  min-width: 130px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 37, 64, .22);
  background: linear-gradient(180deg, rgba(255, 37, 64, .1), rgba(255, 37, 64, .035));
}
.opt-counter small { display: block; color: #858591; font-family: var(--mono); font-size: 8px; letter-spacing: 1px; }
.opt-counter strong { display: block; margin-top: 2px; font-family: var(--display); font-size: 15px; letter-spacing: .7px; }
.opt-counter strong span { color: var(--red-soft); }
.opt-head .gbtn { min-height: 42px; padding: 0 12px; }
.opt-head .gbtn svg { width: 15px; height: 15px; }

.opt-toolbar {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  padding: 12px 4px;
}
.opt-search {
  position: relative;
  flex: 1 1 260px;
  max-width: 340px;
  height: 34px;
  border: 1px solid var(--hair-2);
  background: rgba(6, 6, 9, .7);
}
.opt-search svg { position: absolute; left: 11px; top: 8px; width: 15px; height: 15px; color: #666672; pointer-events: none; }
.opt-search input { width: 100%; height: 100%; padding: 0 12px 0 34px; border: 0; outline: 0; background: transparent; color: #eeeef3; font-size: 11px; user-select: text; -webkit-user-select: text; }
.opt-search input::placeholder { color: #5e5e69; }
.opt-filters, .opt-tier-filters { display: flex; align-items: center; gap: 5px; min-width: 0; }
.opt-tier-filters { padding-left: 9px; border-left: 1px solid rgba(255, 255, 255, .08); }
.opt-filter, .opt-tier {
  height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .025);
  color: #777784;
  font-family: var(--display);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .9px;
  white-space: nowrap;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.opt-filter:hover, .opt-tier:hover { color: #d5d5dc; border-color: rgba(255, 255, 255, .16); }
.opt-filter.active, .opt-tier.active { color: #fff; border-color: rgba(255, 37, 64, .38); background: rgba(255, 37, 64, .12); }
.opt-tier[data-tier="ESPECIALISTA"].active { color: #ffd38c; border-color: rgba(255, 176, 32, .42); background: rgba(255, 176, 32, .1); }

.opt-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: max-content;
  align-items: start;
  align-content: start;
  gap: 12px;
  padding: 1px 5px 14px 4px;
  scrollbar-width: thin;
  scrollbar-color: #48121c transparent;
}
.opt-empty { grid-column: 1 / -1; display: grid; place-items: center; min-height: 220px; color: #666672; font-family: var(--display); font-size: 11px; letter-spacing: 1px; }

.opt-card {
  --opt-accent: 255, 37, 64;
  position: relative;
  isolation: isolate;
  align-self: start;
  min-width: 0;
  width: 100%;
  height: max-content;
  min-height: 218px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
  background:
    radial-gradient(circle at 100% 0, rgba(var(--opt-accent), .07), transparent 145px),
    linear-gradient(145deg, rgba(19, 19, 26, .985), rgba(9, 9, 14, .99));
  box-shadow: 0 14px 28px rgba(0, 0, 0, .2), inset 0 1px rgba(255, 255, 255, .028);
  animation: opt-rise .38s cubic-bezier(.2, .8, .2, 1) both;
  animation-delay: calc(var(--opt-order, 0) * 24ms);
  transition: border-color .22s ease, transform .22s ease, box-shadow .22s ease;
}
.opt-card:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .16); box-shadow: 0 19px 34px rgba(0, 0, 0, .28), inset 0 1px rgba(255, 255, 255, .04); }
.opt-card.enabled { border-color: rgba(var(--opt-accent), .34); box-shadow: 0 14px 30px rgba(0, 0, 0, .25), inset 3px 0 rgba(var(--opt-accent), .86); }
.opt-card[data-state="changed"] { --opt-accent: 255, 176, 32; }
.opt-card.unavailable { filter: saturate(.55); opacity: .62; }
.opt-card-maximum { border-color: rgba(255, 37, 64, .34); background: radial-gradient(ellipse at 100% 0, rgba(255, 37, 64, .17), transparent 80%), linear-gradient(145deg, #1c1018, #0b0b10); }
.opt-card-maximum .opt-level { color: var(--red-soft); }
.opt-card-busy::after { content: ""; position: absolute; inset: 0; z-index: 5; background: rgba(5, 5, 8, .55); backdrop-filter: blur(2px); }
.opt-card-busy::before { content: ""; position: absolute; z-index: 6; left: calc(50% - 11px); top: calc(50% - 11px); width: 20px; height: 20px; border: 2px solid rgba(255, 255, 255, .2); border-top-color: var(--red); border-radius: 50%; animation: spin .7s linear infinite; }

.opt-card-main { position: relative; flex: 1 0 auto; min-height: 166px; padding: 17px 17px 14px; }
.opt-card-main::before { content: ""; position: absolute; left: 17px; top: 0; width: 54px; height: 1px; background: linear-gradient(90deg, rgba(var(--opt-accent), .9), transparent); opacity: .55; }
.opt-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.opt-category { display: inline-flex; align-items: center; min-width: 0; height: 23px; padding: 0 9px; border: 1px solid rgba(255, 255, 255, .11); background: linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .035)); color: #c5c5cf; font-family: var(--display); font-size: 7.8px; font-weight: 700; letter-spacing: .85px; box-shadow: inset 0 1px rgba(255, 255, 255, .035); }
.opt-level { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; color: #747480; font-family: var(--mono); font-size: 7.2px; letter-spacing: .9px; }
.opt-level::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; box-shadow: 0 0 7px currentColor; opacity: .8; }
.opt-card[data-tier="INTERMEDIÁRIO"] .opt-level { color: #ff6d7f; }
.opt-card[data-tier="ESPECIALISTA"] .opt-level { color: var(--amber-soft); }
.opt-card.enabled .opt-level { color: rgb(var(--opt-accent)); }
.opt-card h2 { overflow-wrap: anywhere; margin: 13px 0 8px; color: #f7f7fa; font-family: var(--display); font-size: 14.5px; line-height: 1.28; letter-spacing: -.12px; text-wrap: balance; }
.opt-card p { overflow-wrap: anywhere; margin: 0; color: #92929e; font-size: 11.25px; line-height: 1.5; }
.opt-flags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.opt-flag { display: inline-flex; align-items: center; gap: 5px; min-height: 20px; padding: 0 7px; border: 1px solid rgba(255, 255, 255, .065); background: rgba(255, 255, 255, .022); color: #7e7e8a; font-family: var(--mono); font-size: 7.2px; letter-spacing: .5px; }
.opt-flag svg { width: 11px; height: 11px; }
.opt-flag.warn { border-color: rgba(255, 176, 32, .18); background: rgba(255, 176, 32, .04); color: var(--amber-soft); }
.opt-flag.error { border-color: rgba(255, 37, 64, .2); color: #ff8798; }

.opt-details { flex: 0 0 auto; overflow: visible; overflow-wrap: anywhere; margin: 0 16px 14px; padding: 12px 13px 12px 15px; border: 1px solid rgba(255, 255, 255, .09); border-left: 2px solid rgba(var(--opt-accent), .72); background: linear-gradient(105deg, rgba(var(--opt-accent), .055), rgba(255, 255, 255, .018) 55%, transparent); color: #92929e; font-size: 10px; line-height: 1.5; box-shadow: inset 0 1px rgba(255, 255, 255, .02); animation: opt-details-in .2s ease-out both; }
.opt-details[hidden] { display: none; }
.opt-details b { display: block; color: #d0d0d8; font-weight: 500; }
.opt-details span { display: block; margin-top: 8px; padding-top: 7px; border-top: 1px solid rgba(255, 176, 32, .12); color: var(--amber-soft); }

.opt-card-foot { position: relative; flex: 0 0 52px; min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 14px 0 15px; border-top: 1px solid rgba(255, 255, 255, .075); background: linear-gradient(90deg, rgba(255, 255, 255, .024), rgba(255, 255, 255, .008)); }
.opt-info { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 8px; border: 1px solid transparent; background: transparent; color: #777783; font-family: var(--mono); font-size: 7.8px; letter-spacing: .7px; transition: color .18s ease, border-color .18s ease, background .18s ease; }
.opt-info svg { width: 14px; height: 14px; }
.opt-info:hover { color: #dedee5; border-color: rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .025); }
.opt-info[aria-expanded="true"] { color: #fff; border-color: rgba(var(--opt-accent), .24); background: rgba(var(--opt-accent), .08); }
.opt-action { display: flex; align-items: center; gap: 8px; }
.opt-action-label { color: #90909c; font-family: var(--display); font-size: 8.3px; font-weight: 600; letter-spacing: .75px; }
.opt-switch { position: relative; width: 38px; height: 20px; padding: 0; border: 1px solid rgba(255, 255, 255, .13); border-radius: 11px; background: linear-gradient(180deg, #292a34, #1d1e26); box-shadow: inset 0 2px 5px rgba(0, 0, 0, .28); transition: border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.opt-switch::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #dedee4; box-shadow: 0 2px 6px rgba(0, 0, 0, .55); transition: transform .22s cubic-bezier(.2, .8, .2, 1), background .2s ease; }
.opt-switch[aria-checked="true"] { border-color: rgba(255, 37, 64, .62); background: linear-gradient(90deg, #951126, var(--red)); box-shadow: 0 0 15px rgba(255, 37, 64, .17); }
.opt-switch[aria-checked="true"]::after { transform: translateX(18px); background: #fff; }
.opt-switch:disabled { opacity: .45; }

.opt-status-line { flex: 0 0 auto; min-height: 23px; display: flex; align-items: center; gap: 8px; padding: 7px 5px 0; color: #62626f; font-family: var(--mono); font-size: 8px; letter-spacing: .5px; }
.opt-status-line i { width: 5px; height: 5px; border-radius: 50%; background: #555561; }
.opt-status-line.ready i { background: var(--red); box-shadow: 0 0 8px rgba(255, 37, 64, .7); }

@keyframes opt-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes opt-details-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* Native modal keeps focus and interaction inside the central confirmation. */
.opt-risk-dialog { width: min(620px, calc(100vw - 40px)); max-width: none; max-height: calc(100vh - 40px); margin: auto; padding: 1px; border: 0; overflow: auto; color: var(--txt); background: transparent; scrollbar-width: thin; scrollbar-color: var(--red-deep) var(--carbon); }
.opt-risk-dialog::backdrop { background: rgba(3, 3, 7, .82); backdrop-filter: blur(9px); animation: opt-risk-fade .2s ease-out; }
.opt-risk-panel { position: relative; isolation: isolate; padding: 25px 28px 23px; border: 1px solid rgba(255, 37, 64, .55); background: radial-gradient(ellipse at 90% 0, rgba(255, 37, 64, .19), transparent 62%), repeating-linear-gradient(115deg, rgba(255, 255, 255, .015) 0 1px, transparent 1px 120px), linear-gradient(155deg, #18131b, #09090e 75%); box-shadow: inset 0 1px rgba(255, 255, 255, .12), inset 0 0 70px rgba(255, 37, 64, .045); animation: opt-rise .28s cubic-bezier(.2, .8, .2, 1) both; }
.opt-risk-panel::before { content: ''; position: absolute; top: 0; left: 28px; right: 28px; height: 2px; background: linear-gradient(90deg, var(--red), rgba(255, 115, 135, .7), transparent); box-shadow: 0 0 20px rgba(255, 37, 64, .7); }
.opt-risk-top { display: flex; align-items: center; gap: 11px; font-family: var(--display); color: var(--red-soft); font-size: 10px; font-weight: 700; letter-spacing: 1.4px; }
.opt-risk-mark { display: grid; place-items: center; width: 40px; height: 40px; background: rgba(255, 37, 64, .12); border: 1px solid rgba(255, 37, 64, .35); }
.opt-risk-mark svg { width: 23px; height: 23px; filter: drop-shadow(0 0 5px rgba(255, 37, 64, .6)); }
.opt-risk-top small { display: block; margin-top: 5px; color: #92929e; font-family: var(--mono); font-size: 8px; font-weight: 400; letter-spacing: .8px; }
.opt-risk-top > b { margin-left: auto; color: rgba(255, 115, 135, .22); font-size: 34px; line-height: 1; font-style: italic; }
.opt-risk-panel h2 { margin: 19px 0 9px; font-family: var(--display); font-size: 26px; line-height: 1.16; letter-spacing: -.7px; text-wrap: balance; }
.opt-risk-panel h2 span { display: block; }
.opt-risk-panel > p { margin: 0; color: #a4a4b1; font-size: 12px; line-height: 1.5; }
.opt-risk-specs { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0; }
.opt-risk-specs span { padding: 7px 9px; border: 1px solid rgba(255, 37, 64, .21); background: rgba(255, 37, 64, .055); color: #858591; font-family: var(--mono); font-size: 8px; letter-spacing: .4px; }
.opt-risk-specs b { margin-left: 5px; color: #ffb6c2; font-weight: 500; }
.opt-risk-list { display: grid; gap: 12px; padding: 16px; border: 1px solid rgba(255, 255, 255, .08); background: rgba(5, 5, 9, .6); }
.opt-risk-list > div { display: flex; align-items: start; gap: 12px; }
.opt-risk-list > div > span { padding-top: 2px; color: var(--red-soft); font-family: var(--mono); font-size: 10px; }
.opt-risk-list p { margin: 0; color: #9494a2; font-size: 11.5px; line-height: 1.45; }
.opt-risk-list strong { display: block; margin-bottom: 3px; color: #eeeef3; font-size: 12px; font-weight: 600; }
.opt-risk-panel > .opt-risk-limits { margin-top: 14px; font-size: 10.5px; color: #878793; }
.opt-risk-restore { display: flex; align-items: center; gap: 9px; margin-top: 13px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .08); color: #c3c3ce; font-size: 10.5px; line-height: 1.4; }
.opt-risk-restore svg { flex: 0 0 15px; width: 15px; height: 15px; color: var(--red-soft); }
.opt-risk-actions { display: flex; gap: 10px; margin-top: 18px; }
.opt-risk-actions .gbtn { min-width: 103px; justify-content: center; height: 43px; }
.opt-risk-confirm { flex: 1; display: flex; align-items: center; justify-content: center; gap: 13px; min-height: 43px; padding: 10px 16px; border: 1px solid rgba(255, 128, 149, .7); background: linear-gradient(115deg, #a90d26, #ed2340 65%, #b8122b); color: #fff; font-family: var(--display); font-size: 10px; font-weight: 700; letter-spacing: .45px; box-shadow: inset 0 1px rgba(255, 255, 255, .17); transition: filter .18s ease; }
.opt-risk-confirm:hover { filter: brightness(1.15); }
.opt-risk-confirm span { font-size: 19px; font-weight: 400; }
.opt-risk-actions button:focus-visible { outline: 2px solid var(--red-soft); outline-offset: -4px; }
@keyframes opt-risk-fade { from { background: transparent; backdrop-filter: blur(0); } }
@media (max-width: 500px) { .opt-risk-panel { padding: 20px 17px; } .opt-risk-panel h2 { font-size: 23px; } .opt-risk-actions { flex-direction: column-reverse; } }
@media (max-height: 720px) { .opt-risk-panel { padding-block: 20px; } .opt-risk-panel h2 { margin-top: 14px; } .opt-risk-specs { margin-block: 12px; } .opt-risk-list { gap: 10px; padding: 13px; } .opt-risk-actions { margin-top: 14px; } }
@media (prefers-reduced-motion: reduce) { .opt-risk-dialog::backdrop, .opt-risk-panel { animation: none; } }

@media (max-width: 1120px) {
  .optimization { padding-inline: 16px; }
  .opt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opt-filter, .opt-tier { padding-inline: 8px; letter-spacing: .5px; }
}

@media (max-width: 760px) {
  .optimization { padding: 12px 10px 10px; }
  .opt-head { grid-template-columns: 1fr; align-items: start; gap: 9px; }
  .opt-head h1 { font-size: 22px; }
  .opt-head p { display: none; }
  .opt-summary { justify-content: space-between; }
  .opt-search { max-width: none; flex-basis: 100%; }
  .opt-filters, .opt-tier-filters { width: 100%; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .opt-tier-filters { padding-left: 0; border-left: 0; }
  .opt-grid { grid-template-columns: 1fr; }
  .opt-card { min-height: 205px; }
  .opt-card-main { min-height: 153px; }
}

/* Windows workspace: compact chrome, persistent guidance and roomy configuration. */
.optimization { padding-top: 14px; background: radial-gradient(ellipse at 95% 0, rgba(255, 37, 64, .035), transparent 45%); }
.opt-head { align-items: center; padding-bottom: 12px; gap: 16px; }
.opt-head .eyebrow { color: #d66a79; font-family: var(--display); font-size: 8px; font-weight: 700; letter-spacing: 2px; }
.opt-head h1 { font-size: 26px; margin-top: 6px; }
.opt-head p { font-size: 11px; color: #91919e; }
.opt-restart-notice { flex: 0 0 auto; display: flex; align-items: center; gap: 11px; margin: 11px 4px 0; padding: 10px 12px; border: 1px solid rgba(255, 37, 64, .2); background: linear-gradient(105deg, rgba(255, 37, 64, .08), rgba(255, 255, 255, .018)); }
.opt-restart-notice > svg { flex-shrink: 0; width: 20px; height: 20px; color: #ff8093; }
.opt-restart-notice > span { flex: 1; font-size: 10.5px; line-height: 1.45; color: #b9b9c5; }
.opt-restart-notice strong { display: block; margin-bottom: 2px; color: #ededf4; font-family: var(--display); font-size: 8px; letter-spacing: 1px; }
.opt-restart-notice > b { color: #ff9bad; font-family: var(--mono); font-size: 8px; font-weight: 400; letter-spacing: .5px; }
.opt-restart-notice.pending { border-color: rgba(255, 37, 64, .42); }
.opt-navigation { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; padding: 13px 4px 1px; }
.opt-view { min-height: 35px; display: flex; align-items: center; gap: 13px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .02); color: #92929e; font-family: var(--display); font-size: 8px; font-weight: 700; letter-spacing: .7px; transition: border-color .18s, background .18s; }
.opt-view span { color: #62626e; font-family: var(--mono); font-size: 9px; }
.opt-view:hover { border-color: rgba(255, 37, 64, .35); color: #fff; }
.opt-view.active { background: linear-gradient(105deg, rgba(255, 37, 64, .18), rgba(255, 37, 64, .06)); border-color: rgba(255, 37, 64, .45); color: #fff; box-shadow: inset 0 -1px rgba(255, 37, 64, .4); }
.opt-view.active span { color: #ff8da0; }
.opt-nav-caption { margin-left: auto; font-family: var(--mono); color: #62626d; font-size: 7px; letter-spacing: .7px; }
.opt-quick-panel, .opt-tools-panel { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.opt-quick-panel[hidden], .opt-tools-panel[hidden] { display: none; }
.opt-card { animation-delay: 0ms; animation-duration: .18s; min-height: 208px; }
.opt-card-main { min-height: 152px; padding: 15px; }
.opt-level { flex-shrink: 1; text-align: right; letter-spacing: .3px; }
.opt-tools-toolbar { display: flex; align-items: center; gap: 12px; padding: 13px 4px; }
.opt-tools-toolbar p { flex: 1; margin: 0; color: #93939f; font-size: 10.5px; line-height: 1.45; }
.opt-tools-toolbar .gbtn { min-height: 31px; font-size: 8px; }
.opt-tools-toolbar .gbtn svg { width: 12px; height: 12px; }
.opt-tools-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: start; gap: 12px; padding: 1px 5px 14px 4px; overflow: hidden auto; scrollbar-width: thin; scrollbar-color: #48121c transparent; }
.opt-tool-card { position: relative; min-width: 0; display: flex; flex-direction: column; min-height: 226px; border: 1px solid rgba(255, 255, 255, .1); background: radial-gradient(ellipse at 95% 0, rgba(255, 37, 64, .09), transparent 65%), linear-gradient(135deg, #181820, #0c0c12); padding: 17px; box-shadow: inset 0 1px rgba(255, 255, 255, .04), 0 7px 20px rgba(0, 0, 0, .18); transition: border-color .2s, background .2s; }
.opt-tool-card:hover { border-color: rgba(255, 37, 64, .36); }
.opt-tool-card.managed { border-color: rgba(255, 37, 64, .35); box-shadow: inset 2px 0 #ff2540; }
.opt-tool-card.unavailable { background: linear-gradient(135deg, #15151d, #0b0b11); }
.opt-tool-card-top { display: flex; align-items: center; gap: 9px; }
.opt-tool-icon { display: grid; place-items: center; flex: 0 0 35px; width: 35px; height: 35px; border: 1px solid rgba(255, 37, 64, .3); background: rgba(255, 37, 64, .08); color: #ff8a9d; }
.opt-tool-icon svg { width: 19px; height: 19px; }
.opt-tool-category { font-family: var(--display); font-size: 7px; color: #9d9daa; letter-spacing: .7px; }
.opt-tool-number { margin-left: auto; color: #62626f; font-family: var(--mono); font-size: 13px; font-weight: 400; }
.opt-tool-card h2 { margin: 15px 0 8px; color: #f0f0f5; font-family: var(--display); font-size: 14px; line-height: 1.35; font-weight: 600; text-wrap: balance; }
.opt-tool-card > p { margin: 0 0 12px; color: #a1a1ad; font-size: 11px; line-height: 1.5; }
.opt-tool-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; }
.opt-tool-tags > span { border: 1px solid rgba(255, 255, 255, .08); padding: 4px 5px; color: #93939f; font-family: var(--mono); font-size: 7px; }
.opt-tool-tags .managed { border-color: rgba(255, 37, 64, .25); color: #ff9aac; }
.opt-tool-tags .unavailable { color: #c7ac83; }
.opt-tool-configure { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 13px; padding: 9px 0 0; border: 0; border-top: 1px solid rgba(255, 255, 255, .09); color: #dfdfe8; background: transparent; font-family: var(--display); font-size: 8px; font-weight: 700; letter-spacing: 1px; }
.opt-tool-configure::after { content: '↗'; color: #ff8497; font-size: 15px; }
.opt-tools-loading, .opt-tools-error { grid-column: 1 / -1; padding: 34px 16px; color: #a5a5b2; font-size: 12px; }
.opt-tools-error strong { color: #ff99aa; font-weight: 500; }
.opt-tool-dialog { width: min(680px, calc(100vw - 36px)); max-width: none; max-height: calc(100vh - 36px); border: 1px solid rgba(255, 37, 64, .42); margin: auto; padding: 0; color: #e8e8f0; background: #0d0d14; overflow: hidden; box-shadow: 0 35px 100px #000b; }
.opt-tool-dialog::backdrop { background: rgba(3, 3, 7, .82); backdrop-filter: blur(7px); }
.opt-tool-panel { display: flex; flex-direction: column; max-height: calc(100vh - 38px); background: radial-gradient(ellipse at 90% 0, rgba(255, 37, 64, .085), transparent 45%); }
.opt-tool-head { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 19px 21px; border-bottom: 1px solid rgba(255, 255, 255, .09); }
.opt-tool-head > div { flex: 1; min-width: 0; }
.opt-tool-head small { color: #ed7b8d; font-family: var(--display); font-size: 8px; letter-spacing: 1.2px; }
.opt-tool-head h2 { margin: 5px 0 0; font-family: var(--display); font-size: 21px; line-height: 1.2; }
.opt-tool-head .opt-tool-icon { width: 42px; height: 42px; flex-basis: 42px; }
.opt-tool-close { flex: 0 0 30px; width: 30px; height: 30px; border: 1px solid rgba(255, 255, 255, .13); background: rgba(255, 255, 255, .03); color: #bbbcca; font-size: 23px; line-height: 1; }
.opt-tool-body { flex: 1 1 auto; min-height: 0; overflow: hidden auto; padding: 18px 21px 22px; scrollbar-width: thin; scrollbar-color: #48121c transparent; }
#opt-tool-description { margin: 0 0 14px; color: #a8a8b6; font-size: 12px; line-height: 1.5; }
#opt-tool-status { padding: 11px 12px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .025); color: #d1d1dc; font-size: 11px; line-height: 1.5; }
#opt-tool-status[data-state="unavailable"] { border-color: rgba(255, 176, 32, .22); color: #d6bf9c; }
.opt-tool-details { display: grid; margin-top: 9px; }
.opt-tool-detail { display: flex; align-items: baseline; gap: 14px; padding: 7px 0; border-bottom: 1px solid rgba(255, 255, 255, .045); font-size: 10.5px; line-height: 1.5; }
.opt-tool-detail > span { color: #858594; }
.opt-tool-detail > b { margin-left: auto; max-width: 65%; text-align: right; color: #c8c8d3; font-weight: 400; overflow-wrap: anywhere; }
.opt-tool-details > p { margin: 6px 0; color: #a6a6b4; font-size: 11px; }
.opt-tool-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 17px; }
.opt-tool-form:empty { display: none; }
.opt-tool-field { display: flex; flex-direction: column; min-width: 0; gap: 7px; color: #b0b0bf; font-size: 10.5px; }
.opt-tool-field .game-select, .opt-tool-input { height: 35px; font-size: 11px; }
.opt-tool-input { width: 100%; padding: 0 9px; background: #16161f; border: 1px solid rgba(255, 255, 255, .14); color: #e0e0eb; user-select: text; }
.opt-tool-field-check { flex-direction: row; align-items: center; justify-content: space-between; grid-column: 1 / -1; min-height: 38px; padding: 7px 11px; border: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .02); }
.opt-tool-field-check input, .opt-tool-list-item > input, .opt-tool-cleanup-consent input { flex-shrink: 0; width: 16px; height: 16px; accent-color: #ed2340; cursor: pointer; }
.opt-tool-field small { color: #858595; font-size: 10px; }
.opt-tool-section-title { margin: 19px 0 9px; color: #dbdbe5; font-family: var(--display); font-size: 9px; letter-spacing: 1px; font-weight: 600; }
.opt-tool-list { max-height: 230px; overflow: hidden auto; border: 1px solid rgba(255, 255, 255, .1); background: rgba(0, 0, 0, .2); scrollbar-width: thin; scrollbar-color: #48121c transparent; }
.opt-tool-list-item { display: flex; align-items: center; gap: 11px; min-height: 53px; padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, .06); cursor: pointer; }
.opt-tool-list-item:last-child { border-bottom: 0; }
.opt-tool-list-item > span { flex: 1; min-width: 0; }
.opt-tool-list-item strong { display: block; color: #e1e1eb; font-size: 11.5px; font-weight: 500; overflow-wrap: anywhere; }
.opt-tool-list-item small { display: block; margin-top: 4px; color: #8f8f9f; font-size: 9.5px; line-height: 1.5; overflow-wrap: anywhere; }
.opt-tool-item-state { flex-shrink: 0; color: #b2959d; font-family: var(--mono); font-size: 7px; font-weight: 400; }
.opt-tool-list-empty { margin: 0; padding: 15px; color: #9393a3; font-size: 11px; }
.opt-tool-folder { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.opt-tool-folder > span { flex: 1; min-width: 0; overflow-wrap: anywhere; color: #c8c8d6; font-size: 11px; }
.opt-tool-remove { padding: 6px; border: 1px solid rgba(255, 37, 64, .25); background: rgba(255, 37, 64, .06); color: #ff9dae; font-family: var(--display); font-size: 7px; }
#opt-tool-special > .gbtn { margin-top: 8px; height: 33px; font-size: 8px; }
.opt-tool-help { margin: 10px 0 0; color: #9696a6; font-size: 10.5px; line-height: 1.5; }
.opt-tool-storage .gbtn { margin-top: 12px; min-height: 34px; }
.opt-tool-feedback { margin: 13px 0 0; padding: 11px 12px; border: 1px solid rgba(255, 255, 255, .15); color: #dedee7; background: rgba(255, 255, 255, .035); font-size: 11px; line-height: 1.5; }
.opt-tool-feedback[data-kind="error"] { border-color: rgba(255, 37, 64, .35); color: #ffa0b1; }
.opt-tool-cleanup-review { margin-top: 15px; padding: 14px; border: 1px solid rgba(255, 176, 32, .3); background: rgba(255, 176, 32, .035); }
.opt-tool-cleanup-review strong { color: #ebcca0; font-size: 14px; font-weight: 500; }
.opt-tool-cleanup-review p { color: #b4a897; font-size: 11px; line-height: 1.5; }
.opt-tool-cleanup-consent { display: flex; align-items: center; gap: 9px; margin: 13px 0; color: #d6cbbc; font-size: 10.5px; }
.opt-tool-admin { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; padding: 12px; border: 1px solid rgba(255, 176, 32, .2); color: #d1b996; font-size: 10.5px; }
.opt-tool-admin .gbtn { margin-left: auto; height: 31px; font-size: 8px; }
.opt-tool-footer { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 20px; border-top: 1px solid rgba(255, 255, 255, .09); background: rgba(255, 255, 255, .018); }
.opt-tool-footer > span { flex: 1; }
.opt-tool-footer .gbtn { height: 35px; padding-inline: 10px; font-size: 8px; }
.opt-tool-primary { min-height: 36px; padding: 8px 14px; border: 1px solid rgba(255, 120, 143, .45); background: linear-gradient(110deg, #a40d24, #eb2341); color: #fff; font-family: var(--display); font-size: 8px; font-weight: 700; letter-spacing: .7px; box-shadow: inset 0 1px rgba(255, 255, 255, .14); }
.opt-tool-primary:disabled { opacity: .4; }
.opt-tool-dialog input:disabled, .opt-tool-dialog select:disabled { opacity: .45; cursor: default; }
.opt-tool-list-item:has(input:disabled) { cursor: default; background: rgba(255, 255, 255, .012); }
.opt-tool-dialog[aria-busy="true"] .opt-tool-footer::before { content: 'PROCESSANDO…'; flex: 1 1 100%; color: #ff93a7; font-family: var(--mono); font-size: 8px; letter-spacing: 1px; }
.opt-tool-dialog button:focus-visible, .opt-tool-dialog input:focus-visible, .opt-view:focus-visible, .opt-tool-configure:focus-visible { outline: 2px solid #ff718a; outline-offset: 2px; }
.opt-tool-dialog [hidden], .opt-restart-notice [hidden] { display: none; }
@media (max-width: 1120px) { .opt-tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .opt-nav-caption { display: none; } .opt-head h1 { font-size: 23px; } .opt-head p { max-width: 320px; } }
@media (max-width: 820px) { .optimization { padding-inline: 12px; } .opt-head { gap: 10px; } .opt-counter { min-width: 100px; padding-inline: 9px; } .opt-head .gbtn { padding-inline: 9px; } .opt-head h1 { font-size: 21px; } .opt-head p { display: none; } .opt-restart-notice > b { max-width: 80px; text-align: right; line-height: 1.5; } .opt-toolbar { gap: 6px; padding-block: 10px; } .opt-tier-filters { padding-left: 0; border-left: 0; } }
@media (max-width: 760px) { .opt-tools-grid { grid-template-columns: 1fr; } .opt-navigation { flex-wrap: wrap; } .opt-view { flex: 1; justify-content: space-between; padding-inline: 9px; } }
@media (max-width: 500px) { .opt-tool-form { grid-template-columns: 1fr; } .opt-tool-head, .opt-tool-body { padding-inline: 14px; } .opt-tool-head h2 { font-size: 18px; } .opt-tool-footer { padding-inline: 13px; } .opt-tool-footer > span { display: none; } .opt-tool-primary { flex: 1; } }
@media (prefers-reduced-motion: reduce) { .opt-card, .opt-details { animation: none; } .opt-card, .opt-tool-card, .opt-view { transition: none; } }

/* Hardware-aware workspace. Device identity and compatibility stay distinct. */
.opt-hardware {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, .9fr);
  margin: 11px 4px 0;
  border: 1px solid rgba(255, 255, 255, .095);
  background: linear-gradient(110deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012)), #0d0d14;
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}
.opt-hardware-cell { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 13px 14px; }
.opt-hardware-cell + .opt-hardware-cell { border-left: 1px solid rgba(255, 255, 255, .075); }
.opt-hardware-icon { flex: 0 0 31px; display: grid; place-items: center; height: 31px; color: #d47786; background: rgba(255, 37, 64, .06); border: 1px solid rgba(255, 37, 64, .17); }
.opt-hardware-icon svg { width: 19px; height: 19px; }
.opt-hardware-cell > div { flex: 1; min-width: 0; }
.opt-hardware-cell small { display: block; color: #858594; font-family: var(--mono); font-size: 7px; letter-spacing: 1px; }
.opt-hardware-cell strong { display: block; margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #e3e3eb; font-size: 11px; font-weight: 600; }
.opt-hardware-cell div > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; color: #8f8f9f; font-size: 9px; line-height: 1.35; }
.opt-hardware[aria-busy="true"] .opt-hardware-icon { opacity: .45; }
.opt-hardware-note { flex: 0 0 auto; margin: 7px 5px 0; color: #8f8f9f; font-size: 10px; line-height: 1.45; }
.opt-toolbar { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding-block: 11px 8px; }
.opt-toolbar-top { display: grid; grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) auto; align-items: center; gap: 10px; min-width: 0; }
.opt-toolbar .opt-search { max-width: none; min-width: 0; width: 100%; height: 32px; }
.opt-toolbar .opt-search svg { top: 7px; }
.opt-toolbar-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 7px; min-width: 0; }
.opt-hardware-filters { display: flex; align-items: center; gap: 4px; min-width: 0; overflow: auto hidden; scrollbar-width: none; padding-block: 1px; }
.opt-hardware-filter, .opt-compatible { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 31px; padding: 0 10px; border: 1px solid rgba(255, 255, 255, .095); background: rgba(255, 255, 255, .025); color: #92929f; font-family: var(--display); font-size: 8px; font-weight: 700; letter-spacing: .65px; white-space: nowrap; transition: color .18s, border-color .18s, background .18s; }
.opt-hardware-filter:hover, .opt-compatible:hover { color: #fff; border-color: rgba(255, 255, 255, .23); }
.opt-hardware-filter.active { background: linear-gradient(105deg, rgba(255, 37, 64, .18), rgba(255, 37, 64, .07)); border-color: rgba(255, 37, 64, .43); color: #fff; }
.opt-compatible { color: #7a7a88; background: transparent; }
.opt-compatible svg { width: 13px; height: 13px; opacity: .4; }
.opt-compatible.active { border-color: rgba(255, 37, 64, .24); color: #edc9d0; background: rgba(255, 37, 64, .045); }
.opt-compatible.active svg { color: #ff7f96; opacity: 1; }
.opt-toolbar-bottom .opt-filter, .opt-toolbar-bottom .opt-tier { height: 25px; padding-inline: 8px; font-size: 7px; color: #8c8c9a; letter-spacing: .5px; }
.opt-toolbar-bottom .active { color: #e7e7ef; }
.opt-toolbar-bottom .opt-tier-filters { padding-left: 8px; }
.opt-results { display: flex; align-items: center; flex: 0 0 auto; min-height: 26px; gap: 12px; margin: 0 4px 5px; padding-bottom: 7px; border-bottom: 1px solid rgba(255, 255, 255, .055); }
#opt-results-count { flex: 0 0 auto; color: #c7c7d2; font-family: var(--mono); font-size: 7px; letter-spacing: .65px; }
#opt-results-help { flex: 1; color: #787887; font-size: 9px; line-height: 1.35; }
#opt-clear-filters { flex: 0 0 auto; border: 0; padding: 3px 0 3px 4px; background: transparent; color: #e48899; font-family: var(--mono); font-size: 7px; letter-spacing: .5px; }
#opt-clear-filters[hidden] { display: none; }
.opt-card { min-height: 236px; }
.opt-card-main { min-height: 181px; padding-bottom: 13px; }
.opt-card h2 { margin-top: 12px; }
.opt-card p { font-size: 11px; }
.opt-card-compatibility { margin-top: 10px; }
.opt-card-compatibility .opt-flag { display: flex; width: fit-content; max-width: 100%; padding-block: 4px; color: #aaaab9; font-size: 7.7px; line-height: 1.3; letter-spacing: 0; }
.opt-card-compatibility svg { flex-shrink: 0; color: #b4707d; }
.opt-card-compatibility .opt-flag > span { overflow-wrap: anywhere; }
.opt-flags { gap: 5px; margin-top: 8px; }
.opt-flag.recommended { color: #e3b4bf; border-color: rgba(255, 113, 141, .18); background: rgba(255, 37, 64, .045); }
.opt-card-guide { background: radial-gradient(ellipse at 100% 0, rgba(183, 191, 221, .06), transparent 70%), linear-gradient(145deg, #17171f, #0b0b12); }
.opt-card-guide .opt-level { color: #a0a0b3; }
.opt-card-optional .opt-level { color: #d7b27f; }
.opt-card.unavailable.restorable { opacity: .92; filter: none; border-color: rgba(255, 176, 32, .22); }
.opt-guide-action, .opt-card-restore, .opt-card-admin { min-height: 29px; max-width: 100%; border: 1px solid rgba(255, 37, 64, .25); padding: 7px 9px; background: linear-gradient(110deg, rgba(255, 37, 64, .12), rgba(255, 37, 64, .035)); color: #e3b5bf; font-family: var(--display); font-size: 7.5px; font-weight: 700; line-height: 1.4; letter-spacing: .3px; text-align: center; }
.opt-guide-action::after { content: ' ↗'; color: #ff9aad; }
.opt-guide-action:hover, .opt-card-restore:hover, .opt-card-admin:hover { border-color: rgba(255, 37, 64, .55); color: #fff; }
.opt-card-restore, .opt-card-admin { border-color: rgba(255, 176, 32, .3); background: rgba(255, 176, 32, .045); color: #dfc39f; }
.opt-guide-action:disabled, .opt-card-restore:disabled, .opt-card-admin:disabled { opacity: .45; }
.opt-detail-compatibility { margin-top: 9px !important; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .07); color: #a5a5b4 !important; font-size: 10px !important; }
.opt-empty { align-content: center; gap: 9px; min-height: 180px; padding: 24px; text-align: center; }
.opt-empty strong { color: #b6b6c3; font-size: 10px; font-weight: 500; }
.opt-empty p { max-width: 480px; margin: 0; color: #808091; font-family: var(--body); font-size: 11px; line-height: 1.6; letter-spacing: 0; }
.opt-empty .gbtn { margin-top: 5px; min-height: 32px; padding-inline: 13px; }
.opt-load-error strong { color: #f3a1b1; }
.opt-loading::before { content: ''; width: 21px; height: 21px; margin-bottom: 5px; border: 2px solid rgba(255, 255, 255, .1); border-top-color: #df425e; border-radius: 50%; animation: spin .8s linear infinite; }
.opt-adjustment-dialog .opt-risk-list { margin-top: 18px; gap: 14px; }
.opt-adjustment-dialog .opt-risk-list[hidden] { display: none; }
.opt-adjustment-dialog .opt-risk-list p { color: #c2bac2; line-height: 1.55; }
.opt-adjustment-dialog .opt-risk-top { color: #e5b27c; }
.opt-adjustment-dialog .opt-risk-mark { border-color: rgba(255, 176, 32, .24); background: rgba(255, 176, 32, .055); }
.optimization button:focus-visible, .opt-search:focus-within { outline: 2px solid #ff7e98; outline-offset: 2px; }
.optimization button:disabled { cursor: default; }
@media (max-width: 1120px) {
  .opt-toolbar-top { grid-template-columns: minmax(160px, 190px) minmax(0, 1fr) auto; gap: 7px; }
  .opt-hardware-filter { padding-inline: 8px; font-size: 7.5px; }
  .opt-hardware-cell { gap: 8px; padding: 11px; }
  .opt-hardware-icon { flex-basis: 27px; height: 27px; }
  .opt-hardware-cell strong { font-size: 10.5px; }
  .opt-toolbar-bottom .opt-tier-filters { border-left: 0; padding-left: 0; }
}
@media (max-width: 860px) {
  .opt-toolbar-top { grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
  .opt-hardware-filters { grid-row: 2; grid-column: 1 / -1; }
  .opt-compatible { grid-row: 1; grid-column: 2; }
  .opt-hardware-filters .opt-hardware-filter { flex: 1; }
  .opt-toolbar-bottom { gap: 5px; }
  .opt-filters, .opt-tier-filters { width: auto; max-width: 100%; overflow: auto hidden; scrollbar-width: none; }
  .opt-hardware-cell { padding: 10px 9px; }
  .opt-hardware-icon { display: none; }
  .opt-hardware-note { font-size: 9px; }
  #opt-results-help { font-size: 8px; }
  .opt-card-main { min-height: 166px; }
}
@media (max-width: 600px) {
  .opt-hardware { display: flex; overflow: auto hidden; scrollbar-width: thin; }
  .opt-hardware-cell { flex: 0 0 220px; }
  .opt-hardware-icon { display: grid; }
  .opt-toolbar-bottom .opt-filters, .opt-toolbar-bottom .opt-tier-filters { width: 100%; }
  .opt-results { gap: 7px; }
  #opt-results-help { display: none; }
  #opt-clear-filters { margin-left: auto; }
}
@media (max-height: 740px) {
  .opt-restart-notice { padding-block: 7px; margin-top: 8px; }
  .opt-hardware { margin-top: 8px; }
  .opt-hardware-cell { padding-block: 9px; }
  .opt-hardware-note { margin-top: 5px; }
  .opt-toolbar { padding-block: 8px 6px; gap: 6px; }
  .opt-navigation { padding-top: 10px; }
}
@media (prefers-reduced-motion: reduce) { .opt-loading::before { animation: none; } .opt-hardware-filter, .opt-compatible { transition: none; } }

/* Imported scripts: actual execution is distinct from reversible quick toggles. */
.opt-scripts-panel { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.opt-scripts-panel[hidden] { display: none; }
.opt-script-machine { flex: 0 0 auto; margin: 11px 4px 0; border: 1px solid rgba(255, 255, 255, .1); background: radial-gradient(ellipse at 100% 0, rgba(255, 37, 64, .08), transparent 65%), linear-gradient(115deg, #16151c, #0b0b12); }
.opt-script-machine-heading { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-bottom: 1px solid rgba(255, 255, 255, .065); }
.opt-script-machine-mark { display: grid; place-items: center; flex: 0 0 29px; height: 29px; border: 1px solid rgba(255, 37, 64, .26); background: rgba(255, 37, 64, .065); color: #f18b9c; }
.opt-script-machine-mark svg { width: 17px; height: 17px; }
.opt-script-machine-heading small { display: block; color: #bc7a88; font-family: var(--mono); font-size: 7px; letter-spacing: 1px; }
.opt-script-machine-heading strong { display: block; margin-top: 4px; color: #d6d6e1; font-family: var(--display); font-size: 11px; font-weight: 500; }
.opt-script-execution-badge { margin-left: auto; color: #a4848e; border: 1px solid rgba(255, 109, 134, .18); background: rgba(255, 37, 64, .035); padding: 5px 7px; font-family: var(--mono); font-size: 7px; letter-spacing: .5px; }
.opt-script-hardware { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, .85fr); padding: 11px 13px; gap: 14px; }
.opt-script-hardware-chip { min-width: 0; }
.opt-script-hardware-chip small { display: block; color: #777787; font-family: var(--mono); font-size: 7px; letter-spacing: .6px; }
.opt-script-hardware-chip strong { display: block; margin-top: 5px; color: #d5d5e0; font-size: 10.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt-script-hardware-chip > span { display: block; margin-top: 4px; color: #858595; font-size: 9px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt-script-toolbar { display: grid; grid-template-columns: minmax(170px, 240px) minmax(0, 1fr) auto; align-items: center; gap: 10px; flex: 0 0 auto; padding: 12px 4px 8px; }
.opt-script-toolbar .opt-search { min-width: 0; height: 32px; width: 100%; max-width: none; }
.opt-script-toolbar .opt-search svg { top: 7px; }
.opt-script-filters { display: flex; gap: 5px; min-width: 0; overflow: auto hidden; scrollbar-width: none; }
.opt-script-filter { flex: 0 0 auto; height: 31px; padding: 0 11px; border: 1px solid rgba(255, 255, 255, .09); color: #93939f; background: rgba(255, 255, 255, .025); font-family: var(--display); font-size: 8px; font-weight: 700; letter-spacing: .6px; white-space: nowrap; }
.opt-script-filter:hover { border-color: rgba(255, 255, 255, .23); color: #eee; }
.opt-script-filter.active { border-color: rgba(255, 37, 64, .44); color: #fff; background: linear-gradient(110deg, rgba(255, 37, 64, .18), rgba(255, 37, 64, .06)); }
.opt-script-info { flex: 0 0 auto; display: flex; gap: 12px; align-items: center; min-height: 24px; padding: 0 4px 8px; }
#opt-script-count-label { flex: 0 0 auto; font-family: var(--mono); color: #c8c8d3; font-size: 7px; letter-spacing: .6px; }
.opt-script-info p { flex: 1; margin: 0; color: #7f7f90; font-size: 9px; line-height: 1.5; }
#opt-script-clear { flex: 0 0 auto; border: 0; padding: 4px; background: transparent; color: #e68b9d; font-family: var(--mono); font-size: 7px; letter-spacing: .5px; }
.opt-script-feedback { flex: 0 0 auto; margin: 0 4px 9px; padding: 10px 12px; border: 1px solid rgba(255, 255, 255, .13); background: rgba(255, 255, 255, .025); color: #d4d4df; font-size: 11px; line-height: 1.5; max-height: 90px; overflow: auto; }
.opt-script-feedback[data-kind="error"] { border-color: rgba(255, 37, 64, .35); color: #ffa0b4; }
.opt-script-feedback[data-kind="warning"] { border-color: rgba(255, 176, 32, .3); color: #d9bc94; }
.opt-script-feedback[data-kind="busy"] { border-color: rgba(255, 37, 64, .3); color: #efb3c0; }
.opt-script-grid { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; align-content: start; grid-auto-rows: max-content; gap: 12px; padding: 1px 5px 14px 4px; overflow: hidden auto; scrollbar-width: thin; scrollbar-color: #48121c transparent; }
.opt-script-card { position: relative; isolation: isolate; min-width: 0; overflow: hidden; border: 1px solid rgba(255, 255, 255, .09); background: radial-gradient(ellipse at 100% 0, rgba(255, 37, 64, .075), transparent 72%), linear-gradient(140deg, #191820, #0b0b12); box-shadow: inset 0 1px rgba(255, 255, 255, .025), 0 8px 24px rgba(0, 0, 0, .16); }
.opt-script-card.managed { border-color: rgba(255, 37, 64, .31); box-shadow: inset 2px 0 #c42643; }
.opt-script-card.unavailable { background: linear-gradient(140deg, #15151d, #0b0b12); }
.opt-script-card-body { min-height: 189px; padding: 14px 15px 13px; }
.opt-script-card-top { display: flex; align-items: center; gap: 8px; }
.opt-script-file-mark { flex: 0 0 auto; display: inline-grid; place-items: center; width: 34px; height: 30px; border: 1px solid rgba(255, 37, 64, .29); background: rgba(255, 37, 64, .075); color: #f18a9e; font-family: var(--mono); font-size: 8px; letter-spacing: .6px; }
.opt-script-file-mark.bat { color: #d5b695; border-color: rgba(230, 171, 98, .24); background: rgba(230, 171, 98, .05); }
.opt-script-group { color: #a3a3b1; font-family: var(--display); font-size: 7px; font-weight: 700; letter-spacing: .6px; }
.opt-script-state { margin-left: auto; max-width: 50%; text-align: right; color: #9c7581; font-family: var(--mono); font-size: 6.5px; line-height: 1.5; letter-spacing: .35px; }
.opt-script-card.managed .opt-script-state { color: #f692a7; }
.opt-script-card.unavailable .opt-script-state { color: #b99b74; }
.opt-script-card h2 { margin: 13px 0 8px; color: #eeeef5; font-family: var(--display); font-size: 14px; line-height: 1.35; font-weight: 600; overflow-wrap: anywhere; }
.opt-script-card-body > p { margin: 0; color: #9b9baa; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.opt-script-source { margin-top: 10px; padding-left: 8px; border-left: 2px solid rgba(255, 37, 64, .37); color: #8c8c9c; font-family: var(--mono); font-size: 7px; line-height: 1.5; }
.opt-script-source > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt-script-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.opt-script-tags > span { padding: 4px 5px; border: 1px solid rgba(255, 255, 255, .075); color: #8b8b9a; font-family: var(--mono); font-size: 6.5px; letter-spacing: .2px; }
.opt-script-tags > .warning { color: #c8a77d; border-color: rgba(255, 176, 32, .18); }
.opt-script-blocked { margin-top: 10px; padding: 8px 9px; border: 1px solid rgba(219, 172, 112, .13); background: rgba(219, 172, 112, .035); color: #b5a08a; font-size: 10px; line-height: 1.45; }
.opt-script-details { margin: 0 14px 13px; padding: 11px 12px; border: 1px solid rgba(255, 255, 255, .08); border-left: 2px solid rgba(255, 37, 64, .35); background: rgba(0, 0, 0, .2); }
.opt-script-details p { margin: 0 0 8px; color: #9696a7; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.opt-script-details p:last-child { margin-bottom: 0; }
.opt-script-details .warning { color: #d5b28c; }
.opt-script-details > strong { display: block; margin-top: 11px; color: #d2b3bc; font-family: var(--mono); font-size: 7px; letter-spacing: .5px; }
.opt-script-result { max-height: 170px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0 0; color: #b8b8c7; font-family: var(--mono); font-size: 9px; line-height: 1.6; user-select: text; -webkit-user-select: text; scrollbar-width: thin; }
.opt-script-card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 13px; border-top: 1px solid rgba(255, 255, 255, .075); background: rgba(255, 255, 255, .015); }
.opt-script-more { padding: 5px 0; border: 0; background: transparent; color: #8e8e9e; font-family: var(--mono); font-size: 7px; letter-spacing: .4px; }
.opt-script-more:hover, .opt-script-more[aria-expanded="true"] { color: #eee; }
.opt-script-actions { display: flex; flex: 1; justify-content: flex-end; gap: 6px; }
.opt-script-apply, .opt-script-restore { min-height: 29px; padding: 7px 9px; border: 1px solid rgba(255, 100, 130, .36); background: linear-gradient(115deg, #a21933, #bb233f); color: #f7e7ec; font-family: var(--display); font-size: 7px; font-weight: 700; line-height: 1.4; letter-spacing: .3px; }
.opt-script-apply:hover:enabled { filter: brightness(1.15); }
.opt-script-restore { border-color: rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .025); color: #b5b5c4; }
.opt-script-restore:hover:enabled { color: #eee; border-color: rgba(255, 255, 255, .3); }
.opt-script-apply:disabled, .opt-script-restore:disabled { opacity: .35; }
.opt-script-dialog .opt-risk-panel h2 { overflow-wrap: anywhere; }
.opt-script-confirm-file { margin: 13px 0; padding: 9px 11px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(0, 0, 0, .2); color: #e5bac5; font-family: var(--mono); font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.opt-script-dialog .opt-risk-list { gap: 10px; }
.opt-script-dialog .opt-risk-list p { font-size: 10.5px; }
.opt-script-consent { display: flex; align-items: start; gap: 10px; margin-top: 16px; color: #d7c1cb; font-size: 11px; line-height: 1.5; }
.opt-script-consent input { flex: 0 0 auto; width: 15px; height: 15px; margin: 1px 0 0; accent-color: #e52747; }
.opt-script-dialog .opt-risk-confirm:disabled { opacity: .3; cursor: default; }
@media (max-width: 1120px) {
  .opt-script-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opt-script-toolbar { grid-template-columns: minmax(155px, 195px) minmax(0, 1fr) auto; gap: 7px; }
  .opt-script-filter { padding-inline: 8px; font-size: 7.5px; }
}
@media (max-width: 860px) {
  .opt-script-toolbar { grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
  .opt-script-filters { grid-row: 2; grid-column: 1 / -1; }
  .opt-script-filter { flex: 1; }
  #opt-script-compatible { grid-row: 1; grid-column: 2; }
  .opt-script-hardware { gap: 10px; }
  .opt-script-info p { font-size: 8.5px; }
  .opt-navigation { gap: 5px; }
  .opt-view { gap: 8px; padding-inline: 9px; font-size: 7px; }
}
@media (max-width: 680px) {
  .opt-script-grid { grid-template-columns: 1fr; }
  .opt-script-hardware { display: flex; overflow: auto hidden; scrollbar-width: thin; }
  .opt-script-hardware-chip { flex: 0 0 210px; }
  .opt-script-machine-heading strong { font-size: 10px; }
  .opt-script-execution-badge { display: none; }
  .opt-script-info { flex-wrap: wrap; gap: 5px 10px; }
  .opt-script-info p { flex-basis: 70%; }
}
@media (max-height: 740px) {
  .opt-script-machine { margin-top: 8px; }
  .opt-script-machine-heading { padding-block: 8px; }
  .opt-script-hardware { padding-block: 8px; }
  .opt-script-toolbar { padding-top: 9px; }
  .opt-script-card-body { min-height: 170px; }
}

/* Component filters describe the actual effect rather than the source folder. */
.opt-script-toolbar { grid-template-columns: minmax(0, 1fr) auto; gap: 9px 12px; }
.opt-script-toolbar .opt-search { max-width: 360px; }
.opt-script-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-column: 1 / -1; grid-row: 2; gap: 6px; overflow: visible; }
.opt-script-filter { display: flex; justify-content: center; align-items: center; width: 100%; min-width: 0; height: auto; min-height: 31px; padding: 7px 10px; white-space: normal; text-align: center; font-size: 8.5px; letter-spacing: .3px; line-height: 1.4; }
#opt-script-compatible { grid-row: 1; grid-column: 2; }
.opt-script-group { min-width: 0; max-width: 45%; font-size: 7.5px; line-height: 1.45; letter-spacing: .3px; }
.opt-script-target { margin-top: 11px; padding: 10px 11px; border: 1px solid rgba(255, 255, 255, .075); border-left: 2px solid rgba(255, 37, 64, .36); background: rgba(0, 0, 0, .16); }
.opt-script-target > small { display: block; color: #797989; font-family: var(--mono); font-size: 6.5px; letter-spacing: .7px; }
.opt-script-target > strong { display: block; margin-top: 5px; color: #e1c0cb; font-size: 10.5px; font-weight: 500; line-height: 1.4; }
.opt-script-target > span { display: block; margin-top: 5px; color: #9999aa; font-size: 10px; line-height: 1.5; }
.opt-script-confirm-file > strong { display: block; color: #e3bdc9; font-weight: 500; }
.opt-script-confirm-file > span { display: block; margin-top: 6px; color: #a8a4b4; font-family: var(--body); font-size: 11px; line-height: 1.5; }
@media (min-width: 1450px) { .opt-script-filters { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
@media (max-width: 860px) { .opt-script-filter { font-size: 8px; padding-inline: 7px; } .opt-script-toolbar .opt-search { max-width: none; } }
@media (max-width: 500px) { .opt-script-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
