:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #07101d;
  color: #e7eef8;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top right, #17345d 0, #07101d 42%); }
button, input, select, textarea { font: inherit; }
button { border: 0; border-radius: 10px; padding: 12px 16px; background: #5ba8ff; color: #04101f; font-weight: 800; cursor: pointer; }
button:disabled { opacity: .4; cursor: not-allowed; }
button.secondary { background: #182b43; color: #dceaff; border: 1px solid #314965; }
button.danger { background: #ffb45d; color: #241100; }
.shell { width: min(1240px, calc(100% - 32px)); margin: 0 auto; padding: 36px 0 64px; }
header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 24px; }
h1 { margin: 0; font-size: clamp(2.2rem, 6vw, 4.8rem); letter-spacing: -.065em; }
h2 { margin: 0 0 8px; }
.eyebrow { color: #73b8ff; font-weight: 800; letter-spacing: .14em; font-size: .72rem; margin: 0 0 8px; }
.subtitle, .hint { color: #9eb0c6; }
.panel { background: rgba(12,25,43,.92); border: 1px solid #263b56; border-radius: 18px; padding: 22px; box-shadow: 0 20px 50px rgba(0,0,0,.2); }
.hidden { display: none !important; }
.header-actions, .button-row, .panel-heading, .editor-heading, .output-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.badge { border-radius: 999px; padding: 8px 12px; font-weight: 800; font-size: .78rem; }
.badge.offline { background: #3a1c25; color: #ff9cae; }
.badge.online { background: #173b2c; color: #8aefbc; }
.login-panel { max-width: 720px; margin: 60px auto; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.login-form label, .script-footer label { display: block; margin-bottom: 8px; font-weight: 700; font-size: .88rem; }
input, select, textarea { width: 100%; color: #eef5ff; background: #081424; border: 1px solid #314965; border-radius: 10px; padding: 12px 13px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: #73b8ff; box-shadow: 0 0 0 3px rgba(115,184,255,.12); }
.login-form button { width: 100%; margin-top: 12px; }
.error { color: #ff9cae; grid-column: 1/-1; }
.status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.server-pill { display: inline-block; margin-top: 8px; padding: 6px 10px; border-radius: 999px; background: #173b2c; color: #8aefbc; font-size: .78rem; font-weight: 800; }
.safety-card { border-color: #67451f; background: rgba(48,31,14,.9); }
.workspace-panel { padding: 0; overflow: hidden; }
.tabs { display: flex; gap: 4px; padding: 10px; border-bottom: 1px solid #263b56; background: #081424; }
.tab { background: transparent; color: #9eb0c6; }
.tab.active { background: #182b43; color: #fff; }
.tab-panel { display: none; padding: 24px; }
.tab-panel.active { display: block; }
.command-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1rem; margin: 14px 0 10px; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 18px; }
.quick-actions button { padding: 8px 10px; font-size: .8rem; }
.editor-heading select { width: auto; min-width: 210px; }
.risk-badge { border-radius: 999px; padding: 7px 10px; background: #4a2d10; color: #ffc986; font-size: .75rem; font-weight: 800; }
.code-editor { min-height: 620px; height: 68vh; max-height: 1200px; resize: vertical; margin-top: 16px; font: 14px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; tab-size: 2; white-space: pre; }
.script-footer { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 18px; margin-top: 14px; }
pre { min-height: 280px; max-height: 600px; overflow: auto; white-space: pre-wrap; word-break: break-word; background: #040b14; border: 1px solid #233650; border-radius: 12px; padding: 18px; color: #cfe2f7; }
details { margin: 16px 0; }
details pre { min-height: 120px; max-height: 260px; }
.share-notice { margin: 14px 0; border: 1px solid #2f6c50; background: #112f23; color: #a4efc8; border-radius: 10px; padding: 12px; }
.bottom-row { justify-content: flex-end; }
code { color: #cbe3ff; }
@media (max-width: 760px) {
  header, .header-actions, .panel-heading, .editor-heading, .output-heading { align-items: flex-start; flex-direction: column; }
  .login-panel, .status-grid, .script-footer { grid-template-columns: 1fr; }
  .tabs { overflow-x: auto; }
  .button-row { flex-wrap: wrap; }
}
