 .key-heading-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;min-width:0}
dialog:has(#key-create-form){max-width:720px;max-height:min(90dvh,920px);overflow-y:auto;overscroll-behavior:contain}
dialog:has(#key-create-form) .dialog-top{margin-bottom:20px}
.key-create-form{display:flex;flex-direction:column;gap:18px;min-width:0;font-size:14px}
.key-create-form [hidden]{display:none!important}
.key-create-form fieldset{min-width:0;border:0;padding:0;margin:0}
.key-create-form legend{margin-bottom:9px;font-size:13px;color:var(--muted)}
.key-create-field{display:flex;flex-direction:column;gap:7px;min-width:0}
.key-create-field>label>span[aria-hidden]{color:var(--danger)}
.key-create-form input:not([type="checkbox"]),.key-create-form select,.key-create-form textarea{width:100%;min-width:0;background:var(--bg);color:var(--text);border:1px solid var(--line);border-radius:8px;padding:10px 12px;min-height:43px;font:inherit}
.key-create-form textarea{resize:vertical}
.key-create-form input[type="checkbox"]{accent-color:var(--accent);min-height:0;width:16px;height:16px;flex-shrink:0;margin:0}
.key-create-form small{font-size:12px}
.key-create-two-column{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
.key-create-switch{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:34px}
.key-create-switch input[role="switch"]{appearance:none;width:36px;height:21px;border-radius:99px;border:0;position:relative;background:var(--line);cursor:pointer;transition:background .12s}
.key-create-switch input[role="switch"]:before{content:"";position:absolute;top:3px;left:3px;width:15px;height:15px;background:var(--text);border-radius:50%;transition:transform .12s}
.key-create-switch input[role="switch"]:checked{background:var(--accent)}
.key-create-switch input[role="switch"]:checked:before{transform:translateX(15px);background:var(--bg)}
.key-create-switch input[role="switch"]:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.key-create-auto>select{margin-bottom:12px}
.key-create-group-list legend span{margin-left:8px;font-size:12px}
.key-create-groups{max-height:230px;overflow:auto;scrollbar-width:thin;display:flex;flex-direction:column;gap:5px}
.key-create-group-row{display:flex;align-items:center;gap:8px;border-radius:8px;padding:7px 9px;background:var(--bg)}
.key-create-group-row.selected{background:color-mix(in srgb,var(--accent) 10%,var(--bg))}
.key-create-group-row>label{display:flex;align-items:center;gap:9px;min-width:0;flex:1;cursor:pointer}
.key-create-group-row>label>span:last-child{overflow-wrap:anywhere;min-width:0;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.key-create-group-row small{color:var(--accent);font-variant-numeric:tabular-nums;white-space:nowrap}
.key-create-order{flex-shrink:0;min-width:18px;color:var(--accent);font-size:12px;font-weight:700;text-align:center}
.key-create-order-actions{display:flex;gap:2px;flex-shrink:0}
.key-create-order-actions .icon-button{background:transparent;width:30px;height:30px;min-height:30px;padding:6px}
.key-create-order-actions .icon-button svg{height:16px;width:16px;transform:rotate(90deg)}
.key-create-models>fieldset{display:flex;flex-direction:column;gap:10px;margin-top:8px}
.key-create-model-list{max-height:200px;overflow:auto;scrollbar-width:thin;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.key-create-model-list>label{display:flex;align-items:center;gap:8px;padding:7px 9px;border-radius:6px;background:var(--bg);min-width:0;cursor:pointer}
.key-create-model-list>label>span{font-size:12px;overflow-wrap:anywhere;min-width:0}
.key-create-advanced{padding-top:2px}
.key-create-advanced>summary{color:var(--muted);cursor:pointer;min-height:28px}
.key-create-advanced[open]>summary{margin-bottom:12px}
.key-create-advanced .key-create-field{margin-bottom:10px}
.key-create-advanced .key-create-switch{margin-top:6px}
.key-create-form .dialog-actions{margin-top:2px;position:sticky;bottom:-22px;background:var(--panel);padding:12px 0 0}
.key-create-visually-hidden{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(max-width:560px){.key-create-two-column{grid-template-columns:1fr;gap:16px}.key-create-model-list{grid-template-columns:1fr}.key-create-form{gap:16px}.key-create-form .dialog-actions>.button{flex:1}}
@media(max-width:560px){.key-heading-actions{justify-content:flex-start;max-width:100%}.key-heading-actions>.button{white-space:normal;text-align:center;overflow-wrap:anywhere;max-width:100%}}
