/* V4: quiet surfaces, clear hierarchy, responsive controls. */
:root { --bg:#0c1220; --bg-2:#111b2e; --surface:#141f32; --surface-2:#1b2940; --text:#edf3ff; --text-2:#b1bed2; --text-3:#95a5bd; --accent:#60a5fa; --accent-2:#93c5fd; --accent-dim:rgba(96,165,250,.12); --accent-glow:rgba(96,165,250,.18); --border:#2b3950; --sh:0 4px 18px #00000014; }
html { scroll-behavior:smooth; scroll-padding-top:100px; }
html,body,body.light { background-image:none; font-family:system-ui,-apple-system,'Segoe UI',sans-serif; }
body.light { --bg:#f3f6fb; --bg-2:#ffffff; --surface:#ffffff; --surface-2:#f1f5f9; --text:#17263c; --text-2:#506078; --text-3:#61718a; --accent:#1d4ed8; --accent-2:#1d4ed8; --border:#dce3ee; }
.content-shell,body.light .content-shell { background-image:none; min-width:0; }
.sidebar { background:var(--bg-2); border-right:1px solid var(--border); }
.panelX,body.light .panelX { background:var(--surface); backdrop-filter:none; border:1px solid var(--border); box-shadow:var(--sh); border-radius:16px; min-width:0; }
.panel-header { padding:22px 24px; border-bottom:1px solid var(--border); }
.panel-header h2 { font-size:18px; letter-spacing:-.3px; }
.page-title { font-size:26px; letter-spacing:-.8px; }
.page-sub,.panel-desc { color:var(--text-2); }
.topbar,body.light .topbar { background:var(--bg); backdrop-filter:none; height:auto; min-height:84px; }
.workspace-nav { display:flex; gap:8px; flex-wrap:wrap; margin:0 0 22px; }
.workspace-nav a { border:1px solid var(--border); border-radius:9px; padding:10px 16px; background:var(--surface); font-weight:600; }
.workspace-nav a:hover { color:var(--accent); border-color:var(--accent); }
.upgrade-tools { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin:12px 0; }
.upgrade-tools select { padding:10px; background:var(--surface); color:var(--text); border:1px solid var(--border); border-radius:8px; }
button,.workspace-nav a { min-height:44px; cursor:pointer; }
:is(button,a,input,textarea,select):focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
.btn-neo { background:#2563eb; color:#fff; box-shadow:none; }
.btn-neo:hover { background:#1d4ed8; }
.glow-field,.textarea { border-color:var(--border); }
.table-wrap { max-width:100%; overflow:auto; }
.logs [hidden] { display:none !important; }
.login-orb { display:none; }
.login-card { background:var(--surface); border:1px solid var(--border); }
dialog { margin:auto; width:min(920px,94vw); max-height:90vh; border:1px solid var(--border); border-radius:16px; background:var(--surface); color:var(--text); padding:24px; }
dialog::backdrop { background:#020617bb; }
.preview-header { display:flex; justify-content:space-between; align-items:center; gap:16px; }
.preview-header p { overflow-wrap:anywhere; }
.preview-note { color:var(--text-2); margin:14px 0; }
#preview-frame { display:block; background:white; width:100%; height:55vh; border:1px solid var(--border); border-radius:8px; }
@media(max-width:1100px) { .app-shell { grid-template-columns:220px minmax(0,1fr); } .workspace-grid { grid-template-columns:minmax(0,1fr); } .wide-panel { grid-column:auto; } }
@media(max-width:760px) { .app-shell { display:block; } .sidebar { position:static; height:auto; padding:16px; } .sidebar .sidebar-section,.sidebar .sidebar-divider { display:none; } .sidebar-bottom { padding:8px 0 0; } .brand { padding:0; } .content-shell { padding:16px; } .topbar { position:static; flex-wrap:wrap; gap:14px; padding:16px 0; } .top-actions { flex-wrap:wrap; } .panel-header,.panel-body { padding:16px; } .grid-2,.grid-3 { grid-template-columns:1fr; } input,textarea,select { font-size:16px !important; } .workspace-nav a { flex:1 1 40%; text-align:center; } .page-title { font-size:24px; } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; } }
@media(max-width:760px) { .builder-grid,.controls-grid,.two-col-mini,.shield-grid { grid-template-columns:minmax(0,1fr); } .builder-grid>* { grid-column:auto !important; } }
