/* Rozszerzona przestrzeń robocza i ukrywanie menu bocznego (zgodne ze wspólnym kontraktem z app.css) */
@media (min-width: 981px) {
  body.sandbox-sidebar-hidden .sidebar { display: none; }
  body.sandbox-sidebar-hidden .main-content { margin-left: 0; width: 100%; max-width: 100vw; }
}
@media (max-width: 980px) {
  body.sandbox-sidebar-hidden:not(.menu-open) .sidebar { display: none; }
  body.menu-open .sidebar { display: block; transform: translateX(0); z-index: 110; }
}
.sandbox-page .php-shell { width: min(1740px, 98%); max-width: 100%; }

.sandbox-page .php-page-header { gap: 2rem; }
.sandbox-header { align-items: center; }
.sandbox-runtime-card { display: grid; min-width: 210px; gap: .35rem; padding: 1rem; border: 1px solid rgba(103, 232, 194, .24); border-radius: 12px; background: rgba(3, 18, 31, .55); color: var(--color-text); }
.sandbox-runtime-card small { color: var(--color-text-dim); font: .7rem Consolas, monospace; }
.sandbox-card-buttons { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .4rem; }
.sandbox-card-buttons .php-button { margin-top: 0; }
.php-button-sidebar-toggle { border-color: rgba(103, 232, 194, .35); }

.sandbox-status-dot { display: inline-block; width: .65rem; height: .65rem; margin-right: .35rem; border-radius: 50%; background: #e5a84b; box-shadow: 0 0 0 4px rgba(229, 168, 75, .12); }
.sandbox-status-dot[data-state="ready"] { background: #67e8c2; box-shadow: 0 0 0 4px rgba(103, 232, 194, .12); }
.sandbox-status-dot[data-state="error"] { background: #f47d8a; box-shadow: 0 0 0 4px rgba(244, 125, 138, .12); }
.sandbox-notice { margin-bottom: 1rem; padding: 1rem 1.1rem; border: 1px solid rgba(229, 168, 75, .35); border-radius: 12px; background: rgba(92, 62, 23, .25); color: var(--color-text-muted); line-height: 1.65; }
.sandbox-notice strong { color: #f0bd69; }
.sandbox-notice code { color: #f7d774; }

/* Układy przestrzeni roboczej (podział, tylko edytor, piętrowy) */
.sandbox-workspace { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr); gap: 1.25rem; align-items: start; transition: all .2s ease; }
.sandbox-workspace[data-layout="split"] { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr); gap: 1.25rem; }
.sandbox-workspace[data-layout="editor-max"] { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.sandbox-workspace[data-layout="editor-max"] .sandbox-preview-panel { display: none !important; }
.sandbox-workspace[data-layout="stacked"] { display: flex; flex-direction: column; gap: 1.5rem; }
.sandbox-workspace[data-layout="stacked"] .sandbox-editor-panel,
.sandbox-workspace[data-layout="stacked"] .sandbox-preview-panel { width: 100%; }

.sandbox-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.sandbox-panel-heading h2 { margin: .2rem 0 0; }
.sandbox-heading-controls { display: flex; align-items: center; gap: .6rem; }
.sandbox-layout-toggle { display: inline-flex; padding: 2px; border: 1px solid var(--color-border); border-radius: 8px; background: rgba(8, 17, 31, .7); gap: 2px; }
.sandbox-layout-btn { padding: .35rem .65rem; border: 0; border-radius: 6px; background: transparent; color: var(--color-text-dim); font: 600 .7rem Consolas, monospace; cursor: pointer; transition: all .15s ease; white-space: nowrap; }
.sandbox-layout-btn:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.sandbox-layout-btn.is-active { color: #06201d; background: var(--color-accent); font-weight: 700; }

.sandbox-chip, .sandbox-output-state { display: inline-flex; align-items: center; padding: .35rem .55rem; border: 1px solid rgba(103, 232, 194, .25); border-radius: 99px; color: var(--color-accent); font: .68rem Consolas, monospace; white-space: nowrap; }
.sandbox-output-state[data-state="error"] { color: #ff9aa5; border-color: rgba(244, 125, 138, .35); }
.sandbox-output-state[data-state="running"] { color: #f0bd69; border-color: rgba(229, 168, 75, .35); }

/* Pasek narzędzi edytora */
.sandbox-editor-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .8rem; margin-bottom: .75rem; }
.sandbox-tabs-wrapper { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; }
.sandbox-tabs { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.sandbox-tab { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .65rem; border: 1px solid var(--color-border); border-radius: 6px; color: var(--color-text-muted); background: rgba(15, 29, 47, .65); cursor: pointer; font: 700 .72rem Consolas, monospace; transition: all .15s; user-select: none; }
.sandbox-tab:hover, .sandbox-tab:focus-visible, .sandbox-tab.is-active { color: #06201d; border-color: var(--color-accent); background: var(--color-accent); }
.sandbox-tab-close { display: inline-flex; align-items: center; justify-content: center; width: 1.15rem; height: 1.15rem; margin-left: .15rem; border-radius: 4px; font-size: .68rem; color: inherit; opacity: .55; cursor: pointer; transition: opacity .15s, background .15s; }
.sandbox-tab-close:hover { opacity: 1; background: rgba(0, 0, 0, .25); }
.sandbox-tab.is-active .sandbox-tab-close:hover { background: rgba(0, 0, 0, .2); color: #06201d; }
.sandbox-tab[hidden] { display: none !important; }

/* Przycisk + Dodaj okienko języka */
.sandbox-add-tab-wrapper { position: relative; }
.sandbox-tab-add-btn { display: inline-flex; align-items: center; gap: .35rem; padding: .42rem .75rem; border: 1px dashed rgba(103, 232, 194, .55); border-radius: 6px; background: rgba(103, 232, 194, .08); color: var(--color-accent); font: 700 .72rem Consolas, monospace; cursor: pointer; transition: all .2s ease; }
.sandbox-tab-add-btn:hover { background: rgba(103, 232, 194, .2); border-style: solid; color: #fff; }
.sandbox-tab-add-btn .add-icon { font-size: .8rem; line-height: 1; }

/* Menu rozwijane: Dodaj okienko, Szablony oraz Opcje */
.sandbox-add-tab-dropdown, .sandbox-tools-menu, .sandbox-templates-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 250; width: max-content; min-width: 255px; max-width: 340px; padding: .55rem; border: 1px solid rgba(103, 232, 194, .3); border-radius: 10px; background: #0c1c2e; box-shadow: 0 14px 38px rgba(0, 0, 0, .7); backdrop-filter: blur(8px); animation: sandboxDropdownSlide .18s ease-out; }
.sandbox-tools-menu { left: auto; right: 0; min-width: 280px; }
.sandbox-templates-menu { left: auto; right: 0; min-width: 320px; }
.sandbox-add-tab-dropdown[hidden], .sandbox-tools-menu[hidden], .sandbox-templates-menu[hidden] { display: none !important; }

.dropdown-header { padding: .35rem .6rem .25rem; color: var(--color-text-dim); font: 700 .68rem Consolas, monospace; text-transform: uppercase; letter-spacing: .08em; }
.dropdown-item, .sandbox-menu-item { display: flex; align-items: center; gap: .55rem; width: 100%; padding: .5rem .65rem; border: 0; border-radius: 6px; background: transparent; color: var(--color-text-muted); font: .76rem Consolas, monospace; text-align: left; cursor: pointer; transition: background .15s, color .15s; }
.dropdown-item:hover, .sandbox-menu-item:hover { background: rgba(103, 232, 194, .15); color: #fff; }
.dropdown-item strong { color: #e3f8f2; font-weight: 700; }
.dropdown-item small { margin-left: auto; color: var(--color-text-dim); font-size: .7rem; }
.dropdown-item.template-item { align-items: flex-start; }
.dropdown-item.template-item .lang-icon { font-size: 1.1rem; line-height: 1.2; margin-top: 2px; }
.dropdown-item.template-item small { display: block; margin-left: 0; margin-top: 2px; line-height: 1.35; color: #8a99ad; }
.dropdown-item.preset-item { color: #8ee6ca; font-weight: 600; }
.dropdown-divider, .sandbox-menu-divider { height: 1px; margin: .4rem 0; background: rgba(255, 255, 255, .08); }

/* Grupa akcji po prawej */
.sandbox-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; }
.sandbox-actions .php-button[hidden] { display: none !important; }
.sandbox-tools-dropdown, .sandbox-templates-dropdown { position: relative; }
.php-button-tools, .php-button-templates { padding: .45rem .75rem; border-color: rgba(255, 255, 255, .15); }
.sandbox-tools-colors { padding: .5rem .65rem; }
.sandbox-tools-colors .tools-label { display: block; margin-bottom: .4rem; color: var(--color-text-dim); font: .7rem Consolas, monospace; }
.sandbox-tools-colors .color-inputs { display: flex; align-items: center; gap: .6rem; }
.sandbox-tools-colors label { display: inline-flex; align-items: center; gap: .3rem; color: var(--color-text-muted); font: .72rem Consolas, monospace; cursor: pointer; margin: 0; }
.sandbox-tools-colors input[type="color"] { width: 1.6rem; height: 1.4rem; padding: .1rem; border: 1px solid var(--color-border); border-radius: 4px; background: #070e17; cursor: pointer; }
.sandbox-tools-colors .php-menu-link { margin-left: auto; padding: .2rem .4rem; color: var(--color-text-dim); font-size: .7rem; }

@keyframes sandboxDropdownSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Duże, elastyczne pole robocze edytora (responsywne względem wysokości ekranu) */
.sandbox-code-editor { --sandbox-editor-bg: #151515; --sandbox-editor-font: #d4d4d4; position: relative; display: grid; min-height: 580px; height: clamp(580px, 68vh, 840px); overflow: hidden; border: 1px solid var(--color-border); border-radius: 9px; background: var(--sandbox-editor-bg); }
.sandbox-code-editor[hidden] { display: none; }
.sandbox-highlight, .sandbox-source { grid-area: 1 / 1; box-sizing: border-box; width: 100%; min-width: 0; min-height: 580px; height: 100%; margin: 0; padding: 1rem 1rem 1rem 4.7rem; border: 0; font: .83rem/1.65 Consolas, "Courier New", monospace; white-space: pre-wrap; overflow: auto; overflow-wrap: anywhere; tab-size: 2; }
.sandbox-highlight { z-index: 1; color: var(--sandbox-editor-font); pointer-events: none; background: var(--sandbox-editor-bg); }
.sandbox-source { z-index: 2; resize: none; color: transparent; -webkit-text-fill-color: transparent; caret-color: var(--sandbox-editor-font); background: transparent; outline: none; }
.sandbox-source::selection { background: rgba(86, 156, 214, .35); -webkit-text-fill-color: transparent; }
.sandbox-line-numbers { position: absolute; z-index: 3; inset: 0 auto 0 0; width: 3.6rem; margin: 0; padding: 1rem .6rem 1rem 0; overflow: hidden; color: #687386; border-right: 1px solid rgba(255,255,255,.08); background: #111; font: .83rem/1.65 Consolas, monospace; text-align: right; user-select: none; pointer-events: none; }
.sandbox-code-editor:focus-within { outline: 2px solid var(--php-blue); outline-offset: 2px; }
.sandbox-language-hint, .sandbox-output-help { margin: .7rem 0 0 !important; color: var(--color-text-dim) !important; font: .72rem/1.55 Consolas, monospace; }
.sandbox-diagnostics { min-height: 1.4rem; margin-top: .75rem; padding: .65rem .8rem; border: 1px solid var(--color-border); border-radius: 8px; color: var(--color-text-muted); background: rgba(15, 29, 47, .55); font: .74rem/1.5 Consolas, monospace; }
.sandbox-diagnostics.is-ok { color: #8ee6ca; border-color: rgba(103, 232, 194, .3); background: rgba(33, 101, 86, .2); }
.sandbox-diagnostics.has-issues { color: #f7d774; border-color: rgba(229, 168, 75, .35); background: rgba(92, 62, 23, .22); }
.sandbox-diagnostics strong { display: block; margin-bottom: .25rem; color: inherit; }
.sandbox-diagnostics ul { margin: .25rem 0 0 1.2rem; padding: 0; }
.sandbox-diagnostics li[data-type="error"] { color: #ff9aa5; }
.sandbox-diagnostics li[data-type="warning"] { color: #f7d774; }

/* ==========================================================
   Xcode / VS Code Mini Statusbar
   ========================================================== */
.sandbox-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-top: 0.75rem;
  padding: 0.42rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: rgba(9, 16, 28, 0.88);
  font: 500 0.73rem/1.3 Consolas, "SF Mono", "JetBrains Mono", monospace;
  color: var(--color-text-dim, #8a99ad);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sandbox-statusbar-left,
.sandbox-statusbar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem 0.75rem;
}

.sandbox-status-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.sb-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.7);
  animation: sbPulse 2.4s infinite ease-in-out;
}

@keyframes sbPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(0.92); }
}

.sb-pill {
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text, #f8fafc);
  font-weight: 600;
  font-size: 0.7rem;
}

.sb-pill-accent {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.3);
  color: #38bdf8;
}

.sb-syntax-clean {
  color: #34d399;
  font-weight: 600;
}

.sb-syntax-dirty {
  color: #f7d774;
  font-weight: 600;
}

.sb-syntax-error {
  color: #f87171;
  font-weight: 600;
}

.sb-shortcut-hint {
  color: var(--color-text-dim, #8a99ad);
}

.sb-shortcut-hint kbd {
  font-size: 0.68rem;
  padding: 0.12rem 0.35rem;
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.18);
  color: #cbd5e1;
}

@media (max-width: 650px) {
  .sb-meta-item { display: none; }
  .sandbox-statusbar { flex-direction: column; align-items: flex-start; gap: 0.45rem; }
}

/* Panel podglądu (elastyczny względem viewportu) */
.sandbox-preview-panel { min-width: 0; }
.sandbox-preview { display: block; width: 100%; min-height: 580px; height: clamp(580px, 68vh, 840px); border: 1px solid var(--color-border); border-radius: 9px; background: #fff; }
@media (max-width: 900px) {
  .sandbox-code-editor,
  .sandbox-highlight,
  .sandbox-source,
  .sandbox-preview {
    min-height: 360px;
    height: clamp(360px, 55vh, 520px);
  }
}
.sandbox-output { min-height: 4.5rem; margin-top: .8rem; padding: .8rem; overflow: auto; border: 1px solid var(--color-border); border-radius: 8px; color: #d9f9ef; background: #111820; font: .78rem/1.55 Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.sandbox-output.is-error { color: #ffd6da; border-color: rgba(244, 125, 138, .35); background: rgba(98, 30, 45, .25); }
.sandbox-sql-result { max-height: 360px; margin-top: .8rem; padding: .8rem; overflow: auto; border: 1px solid rgba(103, 232, 194, .28); border-radius: 8px; color: #d9f9ef; background: #111820; font: .74rem/1.45 Consolas, monospace; }
.sandbox-sql-result.is-loading { color: #f7d774; border-color: rgba(229, 168, 75, .35); }
.sandbox-sql-result.is-error { color: #ffd6da; border-color: rgba(244, 125, 138, .45); background: rgba(98, 30, 45, .25); }
.sandbox-sql-result.is-ready { color: #d9f9ef; }
.sandbox-sql-table { width: 100%; min-width: 420px; border-collapse: collapse; }
.sandbox-sql-table caption { padding: 0 0 .55rem; color: var(--color-accent); text-align: left; }
.sandbox-sql-table th, .sandbox-sql-table td { padding: .45rem .55rem; border: 1px solid rgba(255,255,255,.12); vertical-align: top; text-align: left; }
.sandbox-sql-table th { color: #b7d7ff; background: rgba(30, 61, 89, .55); }
.sandbox-sql-table td { color: #e3f8f2; white-space: pre-wrap; overflow-wrap: anywhere; }
.sandbox-sql-limit-note { margin: .6rem 0 0; color: #f7d774; }
.sandbox-sql-panel { grid-column: 1 / -1; min-width: 0; }
.sandbox-sql-panel-grid { display: grid; grid-template-columns: minmax(170px, .25fr) minmax(0, 1fr); gap: 1rem; }
.sandbox-sql-panel-label { margin: 0 0 .55rem; color: var(--color-text-dim); font: .7rem Consolas, monospace; text-transform: uppercase; letter-spacing: .08em; }
.sandbox-sql-tables { display: grid; gap: .4rem; align-content: start; }
.sandbox-sql-table-button { width: 100%; padding: .55rem .7rem; border: 1px solid var(--color-border); border-radius: 7px; color: var(--color-text-muted); background: rgba(15, 29, 47, .65); cursor: pointer; font: .76rem Consolas, monospace; text-align: left; }
.sandbox-sql-table-button:hover, .sandbox-sql-table-button:focus-visible, .sandbox-sql-table-button.is-active { color: #06201d; border-color: var(--color-accent); background: var(--color-accent); }
.sandbox-sql-table-details { min-width: 0; overflow: auto; }
.sandbox-sql-table-details h3 { margin: 0 0 .7rem; color: var(--color-accent); font: 700 1rem Consolas, monospace; }
.sandbox-sql-table-details .sandbox-sql-panel-label { margin-top: .8rem; }
.sandbox-sql-io { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--color-border); }
.sandbox-file-button { position: relative; overflow: hidden; cursor: pointer; }
.sandbox-file-button input[type="file"] { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.sandbox-page:fullscreen { width: 100vw; height: 100vh; margin: 0; padding: 1rem 2rem; overflow: auto; background: var(--color-bg); }
.sandbox-page:fullscreen .php-shell { width: min(1500px, 100%); }
.sandbox-php-runtime { position: fixed; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
.sandbox-guide { margin-top: 1rem; }
.sandbox-guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.sandbox-guide-grid h3 { margin-top: .7rem; }
.sandbox-guide-grid p { margin-bottom: 0; }
.sandbox-guide-number { color: var(--color-accent); font: 700 .75rem Consolas, monospace; }
.sandbox-token-tag { color: #569cd6; }.sandbox-token-keyword { color: #c586c0; }.sandbox-token-string { color: #ce9178; }.sandbox-token-variable { color: #9cdcfe; }.sandbox-token-number { color: #b5cea8; }.sandbox-token-function { color: #dcdcaa; }.sandbox-token-comment { color: #6a9955; }.sandbox-token-attr { color: #9cdcfe; }.sandbox-token-operator { color: #d4d4d4; }.sandbox-token-punctuation { color: #808080; }

/* Inteligentny podział kodu - Baner propozycji */
.sandbox-auto-split-banner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; padding: .85rem 1.15rem; border: 1px solid rgba(103, 232, 194, .4); border-radius: 12px; background: linear-gradient(135deg, rgba(13, 38, 54, .95), rgba(7, 22, 33, .95)); box-shadow: 0 6px 20px rgba(0, 0, 0, .35); animation: sandboxBannerSlide .25s ease-out; }
.sandbox-auto-split-banner[hidden] { display: none !important; }
.sandbox-auto-split-info { display: flex; align-items: center; gap: .85rem; }
.sandbox-sparkle-icon { font-size: 1.5rem; line-height: 1; filter: drop-shadow(0 0 6px rgba(103, 232, 194, .6)); }
.sandbox-auto-split-text strong { display: block; color: var(--color-accent); font: 700 .84rem Consolas, monospace; letter-spacing: .02em; }
.sandbox-auto-split-text p { margin: .2rem 0 0; color: #b9d8ea; font: .76rem/1.45 Consolas, monospace; }
.sandbox-auto-split-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.php-button-subtle { background: rgba(255, 255, 255, .08); color: var(--color-text-muted); border: 1px solid var(--color-border); }
.php-button-subtle:hover { background: rgba(255, 255, 255, .15); color: #fff; }

/* Modal wklejania całego kodu */
.sandbox-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 1.5rem; box-sizing: border-box; }
.sandbox-modal[hidden] { display: none !important; }
.sandbox-modal-backdrop { position: fixed; inset: 0; background: rgba(3, 10, 18, .82); backdrop-filter: blur(5px); }
.sandbox-modal-dialog { position: relative; z-index: 10000; width: min(880px, 100%); max-height: calc(100vh - 3rem); display: flex; flex-direction: column; padding: 1.6rem; border: 1px solid rgba(103, 232, 194, .32); border-radius: 16px; background: #0c1a29; box-shadow: 0 25px 65px rgba(0, 0, 0, .75); box-sizing: border-box; }
.sandbox-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.sandbox-modal-header h2 { margin: .2rem 0 0; color: #fff; font-size: 1.35rem; }
.sandbox-modal-close { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border: 1px solid rgba(255, 255, 255, .12); border-radius: 8px; background: rgba(255, 255, 255, .06); color: var(--color-text-muted); font-size: 1.1rem; cursor: pointer; transition: background .15s, color .15s; }
.sandbox-modal-close:hover { background: rgba(244, 125, 138, .2); color: #ff9aa5; border-color: rgba(244, 125, 138, .4); }
.sandbox-modal-desc { margin: 0 0 1rem; color: var(--color-text-muted); font-size: .84rem; line-height: 1.55; }
.sandbox-modal-desc code { padding: .15rem .4rem; border-radius: 5px; background: rgba(255, 255, 255, .07); color: #f7d774; font-family: Consolas, monospace; font-size: .8rem; }
.sandbox-modal-body { display: flex; flex-direction: column; gap: .85rem; flex: 1 1 auto; min-height: 0; }
.sandbox-modal-textarea { width: 100%; min-height: 290px; max-height: 48vh; box-sizing: border-box; padding: 1.1rem; border: 1px solid var(--color-border); border-radius: 10px; background: #060e18; color: #e3f8f2; font: .84rem/1.65 Consolas, "Courier New", monospace; white-space: pre-wrap; overflow-wrap: anywhere; resize: vertical; tab-size: 2; outline: none; }
.sandbox-modal-textarea:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(103, 232, 194, .18); }
.sandbox-detection-badges { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; min-height: 2rem; }
.sandbox-badge { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .75rem; border: 1px solid rgba(103, 232, 194, .45); border-radius: 99px; background: rgba(103, 232, 194, .12); color: var(--color-accent); font: 700 .74rem Consolas, monospace; transition: all .2s ease; }
.sandbox-badge .badge-icon { font-size: .95rem; }
.sandbox-badge .badge-count { font-weight: 700; color: #fff; }
.sandbox-badge.is-empty { opacity: .45; border-color: rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .03); color: var(--color-text-dim); }
.sandbox-badge.is-empty .badge-count { color: var(--color-text-dim); }
.sandbox-modal-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .6rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, .08); }

/* Pływające powiadomienie Toast z opcją cofnięcia (Undo) */
.sandbox-toast { position: fixed; bottom: 2rem; right: 2rem; z-index: 10050; display: flex; align-items: center; gap: .85rem; max-width: min(540px, calc(100vw - 2rem)); padding: .8rem 1.15rem; border: 1px solid rgba(56, 189, 248, .4); border-radius: 14px; background: rgba(12, 23, 42, .94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 16px 40px rgba(0, 0, 0, .6), 0 0 20px rgba(56, 189, 248, .15); color: #f1f5f9; font: .84rem/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; animation: sandboxToastSlide .25s cubic-bezier(0.16, 1, 0.3, 1); }
.sandbox-toast[hidden] { display: none !important; }
.sandbox-toast #sandboxToastUndoBtn { display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .85rem; border-radius: 8px; background: linear-gradient(135deg, rgba(56, 189, 248, .22), rgba(14, 165, 233, .35)); border: 1px solid rgba(56, 189, 248, .6); color: #fff; font-weight: 700; font-size: .78rem; cursor: pointer; white-space: nowrap; transition: all .2s ease; box-shadow: 0 2px 8px rgba(56, 189, 248, .25); }
.sandbox-toast #sandboxToastUndoBtn:hover { background: linear-gradient(135deg, rgba(56, 189, 248, .38), rgba(14, 165, 233, .5)); border-color: #38bdf8; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(56, 189, 248, .4); }
.sandbox-toast-close { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; margin-left: .2rem; border: 0; border-radius: 6px; background: transparent; color: var(--color-text-dim, #94a3b8); font-size: .9rem; cursor: pointer; transition: all .15s ease; }
.sandbox-toast-close:hover { color: #fff; background: rgba(255, 255, 255, .1); }

@keyframes sandboxBannerSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes sandboxToastSlide {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .sandbox-workspace, .sandbox-workspace[data-layout="split"], .sandbox-guide-grid { grid-template-columns: 1fr; }
  .sandbox-header { align-items: start; }
  .sandbox-runtime-card { width: 100%; }
  .sandbox-panel-heading { flex-direction: column; align-items: flex-start; gap: .6rem; }
  .sandbox-heading-controls { width: 100%; justify-content: flex-start; overflow-x: auto; }
}
@media (max-width: 650px) {
  .sandbox-editor-toolbar { align-items: stretch; flex-direction: column; }
  .sandbox-tabs-wrapper { width: 100%; }
  .sandbox-actions { width: 100%; }
  .sandbox-actions .php-button { flex: 1 1 auto; }
  .sandbox-code-editor, .sandbox-highlight, .sandbox-source, .sandbox-preview { min-height: 380px; height: 380px; }
  .sandbox-sql-panel-grid { grid-template-columns: 1fr; }
  .sandbox-auto-split-banner { flex-direction: column; align-items: stretch; }
  .sandbox-auto-split-actions { justify-content: stretch; }
  .sandbox-auto-split-actions .php-button { flex: 1 1 auto; }
  .sandbox-toast { bottom: 1rem; right: 1rem; left: 1rem; max-width: none; }
  .sandbox-modal { padding: .8rem; }
  .sandbox-modal-dialog { padding: 1.1rem; }
}

/* ==========================================================
   Lokalny Asystent AI (WebGPU LLM) Styles
   ========================================================== */
.php-button-llm {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(129, 140, 248, 0.28));
  border-color: rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
  transition: all .2s ease;
}
.php-button-llm:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.35), rgba(129, 140, 248, 0.45));
  border-color: #38bdf8;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(56, 189, 248, 0.3);
}

.sb-pill-llm {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
  cursor: pointer;
  transition: all .15s ease;
}
.sb-pill-llm:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  color: #fff;
}
.llm-indicator-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 6px #38bdf8;
  margin-right: 4px;
}
.sb-pill-llm.is-active .llm-indicator-dot {
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
}
.sb-pill-llm.is-loading .llm-indicator-dot {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
  animation: sbPulse 1s infinite ease-in-out;
}

.sandbox-llm-dialog {
  display: block !important;
  width: min(940px, calc(100vw - 2.5rem)) !important;
  max-height: 88vh !important;
  max-height: 88dvh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 2rem 2.2rem 3rem !important;
  margin: auto !important;
  box-sizing: border-box !important;
  position: relative !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.4) rgba(15, 23, 42, 0.6);
}

.sandbox-llm-dialog::-webkit-scrollbar {
  width: 8px;
}

.sandbox-llm-dialog::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.35);
  border-radius: 4px;
}

.sandbox-llm-dialog .sandbox-modal-body {
  display: block !important;
  flex: none !important;
  height: auto !important;
  min-height: auto !important;
  overflow: visible !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.llm-hardware-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.15rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(103, 232, 194, 0.3);
  margin-bottom: 1rem;
}
.llm-hardware-card.is-ok {
  border-color: rgba(52, 211, 153, 0.4);
  background: rgba(6, 78, 59, 0.18);
}
.llm-hardware-card.is-warning {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(120, 53, 15, 0.18);
}
.llm-hardware-icon {
  font-size: 1.8rem;
  line-height: 1;
}
.llm-hardware-info strong {
  display: block;
  font-size: 0.92rem;
  color: #f8fafc;
}
.llm-hardware-info p {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.4;
}

.llm-tiers-label {
  font: 700 0.76rem Consolas, monospace;
  text-transform: uppercase;
  color: var(--color-text-dim, #8a99ad);
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.llm-tiers-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
  margin-bottom: 2.2rem !important;
}
@media (max-width: 720px) {
  .llm-tiers-grid {
    grid-template-columns: 1fr;
  }
}

.llm-tier-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.05rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.6);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.llm-tier-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.llm-tier-card:hover {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(30, 41, 59, 0.5);
  transform: translateY(-2px);
}
.llm-tier-card.is-selected {
  border-color: #38bdf8;
  background: linear-gradient(145deg, rgba(14, 165, 233, 0.12), rgba(15, 23, 42, 0.8));
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}
.llm-tier-card.is-cached-ready {
  border-color: rgba(56, 189, 248, 0.45);
}
.llm-tier-card.is-active-loaded {
  border-color: rgba(52, 211, 153, 0.65);
  box-shadow: 0 0 20px rgba(52, 211, 153, 0.22);
}
.llm-card-download-status {
  font: 700 0.65rem Consolas, monospace;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.llm-card-download-status.badge-loaded {
  background: rgba(52, 211, 153, 0.2);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.45);
}
.llm-card-download-status.badge-cached {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.45);
}

.llm-tier-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.llm-tier-badge {
  font: 700 0.68rem Consolas, monospace;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  letter-spacing: 0.04em;
}
.badge-sast { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }
.badge-light { background: rgba(52, 211, 153, 0.2); color: #34d399; }
.badge-recommended { background: rgba(56, 189, 248, 0.25); color: #38bdf8; }
.badge-expert { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }

.llm-tier-device {
  font-size: 0.68rem;
  color: #94a3b8;
  font-family: Consolas, monospace;
}
.llm-tier-name {
  margin: 0.2rem 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
}
.llm-tier-desc {
  margin: 0 0 0.85rem;
  font-size: 0.77rem;
  line-height: 1.45;
  color: #94a3b8;
  flex: 1 1 auto;
}
.llm-tier-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font: 0.73rem Consolas, monospace;
  color: #cbd5e1;
}
.llm-tier-meta strong {
  color: #38bdf8;
}

.llm-progress-section {
  padding: 1.15rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.35);
  margin-bottom: 1.1rem;
  animation: sandboxBannerSlide 0.2s ease-out;
}
.llm-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
  font-size: 0.86rem;
  color: #f1f5f9;
}
.llm-progress-header strong {
  font-size: 1.1rem;
  color: #38bdf8;
  font-family: Consolas, monospace;
}
.llm-progress-bar-track {
  height: 10px;
  width: 100%;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 0.55rem;
}
.llm-progress-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #38bdf8, #818cf8, #34d399);
  transition: width 0.25s ease;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}
.llm-progress-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font: 0.76rem Consolas, monospace;
  color: #94a3b8;
}
.llm-cache-tip {
  margin: 0.75rem 0 0;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.18);
  color: #bae6fd;
  font-size: 0.78rem;
  line-height: 1.45;
}

.llm-storage-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.llm-storage-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.llm-storage-icon {
  font-size: 1.25rem;
}
.llm-storage-label {
  display: block;
  font-size: 0.72rem;
  color: #94a3b8;
  font-family: Consolas, monospace;
}
.llm-storage-val {
  font-size: 0.82rem;
  color: #e2e8f0;
  font-weight: 600;
}

/* Układ przycisków w modalu LLM - przycisk pobierania pod całą resztą */
.sandbox-llm-footer {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 1.1rem !important;
  width: 100% !important;
  margin-top: 3.2rem !important;
  padding-top: 1.8rem !important;
  border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
  flex-shrink: 0 !important;
  clear: both !important;
  position: static !important;
  box-sizing: border-box !important;
}

.llm-btn-full {
  width: 100% !important;
  min-height: 52px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.65rem !important;
  padding: 1.05rem 1.5rem !important;
  font-size: 0.98rem !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #0284c7, #4f46e5) !important;
  border: 1px solid rgba(56, 189, 248, 0.6) !important;
  color: #fff !important;
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.35) !important;
  letter-spacing: 0.02em !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
  margin: 0 0 0.85rem 0 !important;
}

.llm-btn-full:hover:not(:disabled) {
  background: linear-gradient(135deg, #0369a1, #4338ca) !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 6px 26px rgba(14, 165, 233, 0.5) !important;
  transform: translateY(-2px) !important;
}

.llm-btn-full:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.llm-footer-secondary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* Pływający wskaźnik pobierania w tle po zamknięciu modalu */
.sandbox-llm-floating-bar {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 10045;
  width: min(440px, calc(100vw - 2.5rem));
  padding: 0.95rem 1.25rem;
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: rgba(12, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(56, 189, 248, 0.2);
  animation: sandboxToastSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.sandbox-llm-floating-bar[hidden] {
  display: none !important;
}

.sandbox-llm-floating-bar.is-completed {
  border-color: rgba(52, 211, 153, 0.6);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(52, 211, 153, 0.25);
}

.llm-floating-inner {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.llm-floating-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.llm-floating-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.llm-floating-pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
  animation: sbPulse 1.2s infinite ease-in-out;
  flex-shrink: 0;
}

.sandbox-llm-floating-bar.is-completed .llm-floating-pulse {
  background: #34d399;
  box-shadow: 0 0 10px #34d399;
  animation: none;
}

.llm-floating-title strong {
  font-size: 0.88rem;
  color: #f8fafc;
}

.llm-floating-percent {
  font: 700 1rem Consolas, monospace;
  color: #38bdf8;
}

.sandbox-llm-floating-bar.is-completed .llm-floating-percent {
  color: #34d399;
}

.llm-floating-track {
  height: 7px;
  width: 100%;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.llm-floating-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #38bdf8, #818cf8, #34d399);
  transition: width 0.25s ease;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

.llm-floating-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font: 0.75rem Consolas, monospace;
  color: #94a3b8;
}

.llm-floating-details span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 270px;
}

.llm-floating-btn {
  border: 0;
  background: transparent;
  color: #38bdf8;
  font: 700 0.75rem Consolas, monospace;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.llm-floating-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #fff;
}

/* Pełnowymiarowa sekcja Audytu Semantycznego LLM pod kodem i podglądem */
.sandbox-llm-audit-fullwidth {
  width: 100% !important;
  max-width: 100% !important;
  margin-top: 2rem !important;
  margin-bottom: 2.5rem !important;
  background: #0b1322 !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  border-radius: 18px !important;
  padding: 1.8rem 2.2rem !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), 0 0 25px rgba(56, 189, 248, 0.08) !important;
  box-sizing: border-box !important;
  transition: all 0.25s ease !important;
}

.sandbox-llm-audit-header {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 1.25rem !important;
  padding-bottom: 1.25rem !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09) !important;
  margin-bottom: 1.4rem !important;
}

.llm-audit-title-group {
  flex: 1 1 480px !important;
}

.llm-audit-badge-row {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 0.6rem !important;
  margin-bottom: 0.5rem !important;
}

.ai-model-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  padding: 0.3rem 0.75rem !important;
  border-radius: 99px !important;
  background: rgba(56, 189, 248, 0.15) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  color: #38bdf8 !important;
  font-weight: 700 !important;
  font-size: 0.8rem !important;
  text-transform: uppercase !important;
  font-family: Consolas, monospace !important;
}

.llm-gpu-target-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  padding: 0.3rem 0.75rem !important;
  border-radius: 99px !important;
  background: rgba(16, 185, 129, 0.15) !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  color: #34d399 !important;
  font-weight: 700 !important;
  font-size: 0.78rem !important;
  font-family: Consolas, monospace !important;
}

.llm-audit-status-badge {
  display: inline-flex !important;
  align-items: center !important;
  padding: 0.3rem 0.65rem !important;
  border-radius: 99px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #94a3b8 !important;
  font-size: 0.76rem !important;
  font-family: Consolas, monospace !important;
}

.llm-audit-main-title {
  margin: 0.2rem 0 0.35rem 0 !important;
  font-size: 1.6rem !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
  letter-spacing: -0.02em !important;
}

.llm-audit-subtitle {
  margin: 0 !important;
  color: #94a3b8 !important;
  font-size: 0.92rem !important;
  line-height: 1.55 !important;
}

.llm-audit-header-actions {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 0.65rem !important;
}

.llm-gpu-switch-container {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  border-radius: 9px !important;
  padding: 0.4rem 0.85rem !important;
}

.llm-gpu-select-label {
  font-size: 0.8rem !important;
  color: #67e8c2 !important;
  font-weight: 700 !important;
  font-family: Consolas, monospace !important;
  white-space: nowrap !important;
}

.llm-gpu-select {
  background: transparent !important;
  border: none !important;
  color: #f1f5f9 !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  outline: none !important;
}

.llm-gpu-select option {
  background: #0f172a !important;
  color: #f1f5f9 !important;
}

.llm-gpu-help-btn {
  background: rgba(56, 189, 248, 0.12) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  color: #38bdf8 !important;
  border-radius: 6px !important;
  padding: 0.22rem 0.55rem !important;
  font-size: 0.76rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
}

.llm-gpu-help-btn:hover {
  background: rgba(56, 189, 248, 0.28) !important;
  border-color: rgba(56, 189, 248, 0.7) !important;
  color: #ffffff !important;
}

.llm-audit-content-area {
  min-height: 400px !important;
  max-height: 80vh !important;
  overflow-y: auto !important;
  scrollbar-width: thin !important;
  transition: max-height 0.3s ease !important;
}

.llm-audit-content-area.is-collapsed {
  display: none !important;
}

.llm-audit-placeholder {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 3.5rem 2rem !important;
  color: #94a3b8 !important;
  border: 2px dashed rgba(255, 255, 255, 0.12) !important;
  border-radius: 14px !important;
  background: rgba(15, 23, 42, 0.4) !important;
}

.llm-audit-placeholder-icon {
  font-size: 3.4rem !important;
  margin-bottom: 0.8rem !important;
}

.llm-audit-placeholder h3 {
  margin: 0 0 0.5rem 0 !important;
  color: #f1f5f9 !important;
  font-size: 1.3rem !important;
}

.llm-audit-placeholder p {
  max-width: 700px !important;
  margin: 0 0 1.5rem 0 !important;
  font-size: 0.95rem !important;
  line-height: 1.6 !important;
}

.llm-audit-quick-tips {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 1.4rem !important;
  font-size: 0.84rem !important;
  font-family: Consolas, monospace !important;
  color: #67e8c2 !important;
}

.llm-audit-streaming-card {
  background: #070e1a !important;
  border: 1px solid rgba(56, 189, 248, 0.25) !important;
  border-radius: 14px !important;
  padding: 2.2rem 2.6rem !important;
  box-shadow: inset 0 2px 14px rgba(0, 0, 0, 0.45) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 1rem !important;
  line-height: 1.8 !important;
  color: #f1f5f9 !important;
  word-break: break-word !important;
}

.llm-stream-text {
  font-size: 1.02rem !important;
  line-height: 1.8 !important;
}

.llm-stream-text h1,
.llm-stream-text h2,
.llm-stream-text h3 {
  color: #38bdf8 !important;
  margin-top: 1.5rem !important;
  margin-bottom: 0.75rem !important;
  letter-spacing: -0.01em !important;
}

.llm-stream-text h1 { font-size: 1.45rem !important; border-bottom: 1px solid rgba(56, 189, 248, 0.2) !important; padding-bottom: 0.4rem !important; }
.llm-stream-text h2 { font-size: 1.25rem !important; }
.llm-stream-text h3 { font-size: 1.1rem !important; }

.llm-stream-text code:not(pre code) {
  font-family: Consolas, monospace !important;
  background: rgba(56, 189, 248, 0.12) !important;
  color: #7dd3fc !important;
  padding: 0.15rem 0.45rem !important;
  border-radius: 5px !important;
  font-size: 0.9em !important;
  border: 1px solid rgba(56, 189, 248, 0.2) !important;
}

.llm-stream-text pre {
  background: #040810 !important;
  border: 1px solid rgba(56, 189, 248, 0.28) !important;
  border-radius: 10px !important;
  padding: 1.2rem 1.4rem !important;
  overflow-x: auto !important;
  color: #f8fafc !important;
  font-family: Consolas, monospace !important;
  font-size: 0.94rem !important;
  line-height: 1.6 !important;
  margin: 1.2rem 0 !important;
  position: relative !important;
}

.llm-stream-text pre code {
  font-family: inherit !important;
  color: inherit !important;
  background: none !important;
  padding: 0 !important;
  border: none !important;
}

.ai-cursor {
  display: inline-block !important;
  width: 9px !important;
  height: 20px !important;
  background: #38bdf8 !important;
  vertical-align: middle !important;
  animation: blinkCursor 0.8s infinite !important;
  margin-left: 3px !important;
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@media (max-width: 720px) {
  .sandbox-llm-audit-fullwidth {
    padding: 1.25rem 1rem !important;
  }
  .sandbox-llm-audit-header {
    flex-direction: column !important;
  }
  .llm-audit-header-actions {
    width: 100% !important;
  }
  .llm-gpu-switch-container {
    width: 100% !important;
    justify-content: space-between !important;
  }
  .llm-audit-streaming-card {
    padding: 1.2rem 1rem !important;
  }
}



