.create-table-drawer{position:fixed;inset:0 0 0 auto;margin:0;width:min(760px,100vw);height:100dvh;max-height:100dvh;max-width:100vw;padding:0;border:0;border-left:1px solid var(--border);border-radius:0;box-shadow:-12px 0 50px #0002;overflow:hidden}
.create-table-drawer[open]{animation:create-drawer-in .2s ease-out}
@keyframes create-drawer-in{from{transform:translateX(100%)}to{transform:translateX(0)}}
#create-table-form{height:100%;display:flex;flex-direction:column}.create-table-header{display:flex;justify-content:space-between;gap:18px;padding:26px 28px 22px;border-bottom:1px solid var(--border);background:var(--surface)}.create-table-header h2{font-size:22px}.create-table-header p:last-child{font-size:12px;color:var(--muted);margin-top:8px}.create-table-header strong{color:var(--primary);font-family:Consolas,monospace}.create-table-body{flex:1;min-height:0;overflow-y:auto;padding:0 28px 24px}.create-section{padding:25px 0;border-bottom:1px solid var(--border)}.create-section-title{display:flex;align-items:flex-start;gap:12px;margin-bottom:22px}.create-section-title>span{display:grid;place-items:center;width:28px;height:28px;border-radius:8px;background:var(--tint);color:var(--primary);font-size:10px;font-weight:700;flex-shrink:0}.create-section-title p{color:var(--muted);font-size:11px;line-height:1.7;margin-top:5px}.create-section-title>strong{font-size:10px;white-space:nowrap;margin-left:auto;color:var(--muted);padding-top:6px}.create-field{display:block;font-size:12px;font-weight:600;margin:18px 0 8px}.create-field span{font-size:10px;font-weight:400;margin-left:5px;color:var(--muted)}.create-table-drawer input:not([type=checkbox]):not([type=hidden]),.create-table-drawer textarea{width:100%;min-width:0;background:var(--surface);border:1px solid var(--border);border-radius:7px;padding:10px 11px;color:var(--text);font-size:12px;font-family:inherit}.create-table-drawer textarea{resize:vertical;min-height:82px;font-family:inherit}.create-table-drawer input[type=checkbox]{accent-color:var(--primary);width:15px;height:15px;flex-shrink:0}.create-table-drawer #table-name-hint{display:block;margin-top:8px;font-size:10px}.create-column-row{display:grid;grid-template-columns:minmax(100px,1.15fr) minmax(115px,1fr) minmax(100px,1fr) auto auto 28px;gap:9px;align-items:end;margin-bottom:14px;padding:12px;background:var(--soft);border:1px solid var(--border);border-radius:9px}.create-column-row label>span,.column-type-field>span{display:block;color:var(--muted);font-size:9px;margin-bottom:7px}.create-column-row .column-check{display:flex;align-items:center;gap:3px;font-size:10px;min-height:38px;white-space:nowrap}.create-column-row .icon-btn{width:28px;height:38px}.create-column-row input{font-size:11px!important;min-height:38px}.type-picker{position:relative}.type-picker summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:6px;min-height:38px;border:1px solid var(--border);border-radius:7px;padding:8px;background:var(--surface);font:11px Consolas,monospace;cursor:pointer}.type-picker summary::-webkit-details-marker{display:none}.type-picker summary svg{width:13px;height:13px;transform:rotate(90deg)}.type-options{position:absolute;z-index:5;top:calc(100% + 5px);left:0;width:160px;max-height:200px;overflow:auto;padding:6px;border-radius:8px;background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow)}.type-options button{display:flex;align-items:center;gap:8px;border:0;width:100%;text-align:left;padding:8px;border-radius:5px;background:transparent;font:11px Consolas,monospace;min-height:36px}.type-options button:hover,.type-options button:focus-visible{background:var(--tint);color:var(--primary)}.type-options svg{width:14px;height:14px}.add-column{width:100%;border-style:dashed;background:transparent}.create-option{display:flex;align-items:flex-start;gap:12px;padding:14px 0;cursor:pointer}.create-option strong{font-size:12px;font-weight:600;display:block}.create-option small{display:block;font-size:10px;margin-top:5px;line-height:1.8}.create-table-footer{max-width:none;display:flex;align-items:center;justify-content:space-between;flex-shrink:0;border-top:1px solid var(--border);padding:18px 28px;margin:0;background:var(--surface);font-size:10px}.create-table-footer>div{display:flex;gap:8px}.create-table-footer b{color:var(--primary)}.create-design-note{color:var(--muted);font-size:10px;padding-top:20px;line-height:1.8}#create-table-feedback{padding:14px;margin-top:20px;border:1px solid var(--border);border-radius:8px;background:var(--tint);color:var(--primary);font-size:12px;line-height:1.8}
@media(max-width:650px){.create-table-header{padding:20px}.create-table-body{padding:0 18px 20px}.create-table-header h2{font-size:20px}.create-column-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 32px;gap:10px}.create-column-row>label:nth-child(3){grid-column:1/3;grid-row:2}.create-column-row>.column-check{grid-row:3;min-height:44px}.create-column-row>.remove-column{grid-column:3;grid-row:1;width:32px;height:44px}.create-table-drawer input:not([type=checkbox]):not([type=hidden]),.create-table-drawer textarea{font-size:16px!important;min-height:44px}.type-picker summary{min-height:44px}.type-options button{min-height:44px}.create-table-footer{padding:14px 18px;gap:12px;flex-wrap:wrap}.create-table-footer .btn{min-height:44px}.type-options{max-width:calc(100vw - 60px)}}

/* Adapter for the reference Table Editor; all data comes from the project DB. */
.hi-console main.console-main:has(>.hc-live-editor){width:100%;max-width:none;margin:0;padding:0;min-width:0;min-height:0;overflow:hidden}
@media(min-width:651px){
  html:has(main>.hc-live-editor){scrollbar-gutter:auto}
  .hi-console .workspace:has(main>.hc-live-editor){display:flex;flex-direction:column;height:100dvh;overflow:hidden}
  .hi-console .workspace:has(main>.hc-live-editor)>.hc-page-bar{flex-shrink:0}
  .hi-console .workspace:has(main>.hc-live-editor)>main.console-main{display:flex;flex:1;min-height:0}
  .hi-console main.console-main>.hc-live-editor{flex:1;height:100%;min-height:0}
}
.hi-console .hc-live-editor{width:100%;min-width:0;height:calc(100dvh - 160px);min-height:540px;border:0;border-radius:0}
.hc-live-editor .editor-content,.hc-live-editor .editor-grid-host{min-width:0}
.hc-editor-tabs{display:flex;min-width:0;overflow:auto}
.hc-live-editor .editor-tabbar{overflow:visible;min-width:0}
.hc-editor-schema{position:relative;min-width:0}
.hc-editor-schema summary{display:flex;align-items:center;gap:10px;list-style:none;cursor:pointer;border:1px solid var(--border);border-radius:6px;padding:8px 10px;background:var(--surface)}
.hc-editor-schema summary svg{width:14px;margin-left:auto;transform:rotate(90deg)}
.hc-editor-schema>div{position:absolute;z-index:15;left:0;right:0;max-height:260px;overflow:auto;background:var(--surface);border:1px solid var(--border);border-radius:6px;box-shadow:0 8px 24px #0002}
.hc-live-editor details>summary::-webkit-details-marker{display:none}
.hc-live-editor .editor-tools details{position:relative}
.hc-live-editor .editor-tools summary{list-style:none;cursor:pointer}
.hc-editor-sort{position:absolute;right:0;top:100%;width:230px;padding:14px;background:var(--surface);border:1px solid var(--border);border-radius:8px;box-shadow:0 8px 24px #0002;z-index:16;display:grid;gap:12px}
.hc-editor-sort label{display:grid;gap:6px}
.hc-live-editor select{border:1px solid var(--border);background:var(--surface);color:var(--text);padding:5px;border-radius:5px;font:inherit;max-width:100%}
.hc-editor-size select{font-size:10px}
.hc-live-editor .hc-null{color:var(--muted);font-style:italic}
.hc-live-editor .constraint-list{flex-wrap:wrap;white-space:normal;gap:8px}
.hc-live-editor .constraint-list small{display:block;flex-basis:100%}
.hc-editor-drawer{background:var(--surface);color:var(--text)}
.hc-editor-drawer::backdrop{background:#0006}
.hc-editor-drawer>[data-table-editor-target=dialogBody]{height:100%;display:flex;flex-direction:column;min-height:0}
.hc-editor-drawer form{display:flex;flex-direction:column;flex:1;min-height:0}
.hc-editor-drawer .create-table-body{display:flex;flex-direction:column;gap:16px;padding-top:20px}
.hc-editor-drawer label{display:grid;gap:7px;font-size:12px}
.hc-editor-drawer .column-check,.hc-editor-drawer .create-option{display:flex;align-items:center}
.hc-editor-drawer pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:11px}
.hc-editor-drawer .hc-insert-field{display:grid;grid-template-columns:minmax(0,1fr) 110px;gap:10px;padding:14px 0;border-bottom:1px solid var(--border)}
.hc-editor-drawer .hc-insert-field>small{grid-column:1/-1}
.hc-editor-drawer .hc-feedback{white-space:pre-wrap;color:var(--primary);overflow-wrap:anywhere}
.hc-editor-actions{display:flex;gap:8px;flex-wrap:wrap}
.hc-editor-drawer .create-column-row{flex-shrink:0}
@media(max-width:650px){.hi-console .hc-live-editor{height:auto;min-height:calc(100dvh - 150px)}.hc-editor-drawer .create-column-row{display:flex;flex-wrap:wrap}.hc-editor-drawer .create-column-row>label,.hc-editor-drawer .create-column-row>.column-type-field{flex:1 1 40%}.hc-editor-drawer .create-column-row>.column-check{flex:0 1 auto}.hc-live-editor .editor-footer{align-items:flex-start}}
@media(prefers-reduced-motion:reduce){.hc-editor-drawer[open]{animation:none}}

.hc-column-action{border:0;background:transparent;padding:2px;color:var(--muted)}.hc-column-action svg{width:12px;height:12px}.hc-live-editor .editor-pagination>.btn{min-height:26px;padding:3px 7px;font-size:10px}.hc-editor-drawer .create-column-row details>summary{cursor:pointer;padding:10px}.hc-editor-drawer .create-column-row details[open]{grid-column:1/-1}.hc-editor-drawer .create-column-row details>.create-option{display:inline-flex;margin-right:16px}.hc-editor-drawer .hc-insert-field input:disabled,.hc-editor-drawer .hc-insert-field textarea:disabled{opacity:.5}

.hc-editor-tab-wrap{display:flex;align-items:center;border-right:1px solid var(--border);flex-shrink:0}.hc-editor-tab-wrap>.icon-btn{width:24px;height:26px;margin-right:4px}.hc-editor-tab-wrap>.icon-btn svg{width:12px;height:12px}.hc-live-editor .editor-tab{border-right:0}

.hc-table-definition{font:12px/1.8 Consolas,monospace;padding:20px;margin:0;white-space:pre;min-width:max-content}.hc-live-editor .editor-data-scroll>details{padding:12px}.hc-live-editor .editor-data-scroll>.btn{margin:10px}.hc-editor-drawer select[multiple]{min-height:100px}

.hc-editor-drawer .create-column-row{grid-template-columns:minmax(90px,1fr) minmax(90px,1fr) minmax(90px,1fr) auto auto 45px 28px;align-items:end}.hc-editor-drawer .create-column-row>details>summary{white-space:nowrap;font-size:10px;padding:10px 0}.hc-editor-drawer .create-column-row .type-picker summary{min-height:38px}.hc-editor-drawer .type-picker summary svg{width:13px;height:13px}.hc-editor-drawer .create-column-row>label{gap:4px}.hc-editor-drawer .create-column-row label>span{margin-bottom:0}.hc-editor-drawer .create-column-row .column-type-field>span{margin-bottom:4px}
