:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #17202a;
  background: #f4f6f8;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 238px 1fr; }
.sidebar { min-width: 0; overflow: hidden; background: #17212b; color: #fff; padding: 18px 12px; }
.brand-row { display: flex; align-items: center; gap: 10px; padding: 0 8px 22px; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; background: #e64a36; color: #fff; font-weight: 800; }
.brand-mark.small { width: 30px; height: 30px; font-size: 12px; }
.platform-label { padding: 0 8px 7px; color: #91a0ad; font-size: 12px; text-transform: uppercase; }
.platform-button, #section-nav button { width: 100%; border: 0; background: transparent; color: #cdd6dd; text-align: left; padding: 9px 10px; }
.platform-button.active { color: #fff; background: #253441; }
.platform-button span { float: right; font-size: 11px; color: #82909d; }
#section-nav { margin-top: 18px; border-top: 1px solid #34414d; padding-top: 10px; }
#section-nav button.active, #section-nav button:hover { background: #263743; color: #fff; }
.workspace { min-width: 0; }
.toolbar { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; background: #fff; border-bottom: 1px solid #dfe4e8; }
.toolbar h1 { margin: 0; font-size: 21px; letter-spacing: 0; }
.toolbar p { margin: 4px 0 0; color: #65727e; font-size: 13px; }
.commands { display: flex; gap: 8px; }
.commands button, .table-tools button, .dialog-actions button { min-height: 36px; border: 1px solid #c9d1d8; background: #fff; padding: 0 13px; }
.primary-command { border-color: #d94330 !important; background: #d94330 !important; color: #fff; }
.editor { padding: 20px 24px 48px; overflow: auto; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.section-heading h2 { margin: 0; font-size: 17px; }
.table-tools { display: flex; gap: 8px; }
.data-grid { width: 100%; border-collapse: collapse; background: #fff; font-size: 13px; }
.table-wrap { width: 100%; overflow: auto; }
.data-grid th { position: sticky; top: 0; z-index: 1; background: #edf1f4; text-align: left; padding: 9px; border: 1px solid #d7dde2; white-space: nowrap; }
.data-grid td { padding: 0; border: 1px solid #e0e5e9; min-width: 110px; }
.data-grid input, .data-grid select { width: 100%; min-height: 34px; border: 0; padding: 6px 8px; background: transparent; }
.data-grid input:focus { outline: 2px solid #4f86b3; outline-offset: -2px; }
.delete-row { width: 34px; border: 0; background: transparent; color: #a52c20; }
.json-editor { width: 100%; min-height: 520px; resize: vertical; border: 1px solid #cfd7dd; padding: 14px; font: 13px/1.55 Consolas, monospace; }
.issues-panel { position: fixed; right: 20px; bottom: 20px; width: min(460px, calc(100vw - 40px)); max-height: 55vh; overflow: auto; background: #fff; border: 1px solid #d9b1ab; box-shadow: 0 12px 32px #0002; padding: 14px; }
.issues-panel > div { display: flex; justify-content: space-between; }
.issues-panel ul { padding-left: 20px; }
#close-issues { border: 0; background: transparent; font-size: 20px; }
dialog { border: 1px solid #cbd3da; width: min(720px, 92vw); padding: 20px; }
dialog textarea { width: 100%; font: 13px/1.5 Consolas, monospace; }
dialog label { display: grid; gap: 7px; }
dialog input { min-height: 38px; border: 1px solid #cbd3da; padding: 8px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.login-shell { min-height: 100vh; display: grid; place-items: center; background: #17212b; }
.login-panel { width: min(360px, calc(100vw - 32px)); background: #fff; padding: 30px; }
.login-panel h1 { margin: 16px 0 4px; }
.login-panel p { margin: 0 0 22px; color: #6a7680; }
.login-panel label { display: grid; gap: 6px; margin: 14px 0; font-size: 13px; }
.login-panel input { min-height: 40px; border: 1px solid #cbd3da; padding: 8px; }
.login-panel button { width: 100%; min-height: 42px; border: 0; }
@media (max-width: 760px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; padding-bottom: 10px; }
  #section-nav { display: flex; max-width: 100%; overflow-x: auto; }
  #section-nav button { width: auto; white-space: nowrap; }
  .toolbar { align-items: flex-start; flex-direction: column; }
  .commands { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .commands button { min-width: 0; padding: 0 6px; }
  .editor { padding: 14px 12px 40px; }
}
