.at-section { display: grid; gap: 14px; }
.at-section[hidden], .at-preview[hidden], .at-actions [hidden] { display: none; }
.at-actions { display: flex; gap: 8px 12px; align-items: end; flex-wrap: wrap; }
.at-actions .first-field { margin: 0; }
.at-actions .first-field:has(input[type="search"]) { flex: 1; min-width: min(100%, 220px); }
.at-actions .first-field:has(input[type="checkbox"]) { display: flex; flex-direction: row-reverse; align-items: center; gap: .5rem; padding: .6rem 0; }
.at-actions .first-field:has(input[type="checkbox"]) input, .at-table input { width: auto; accent-color: var(--ft-sky); }
.at-actions > strong { align-self: center; font-size: .86rem; color: var(--ft-muted); margin-inline-start: auto; }
.at-status { min-height: 1.2em; margin: .6rem 0; color: var(--ft-sky); font-size: .9rem; }
.at-status:empty { display: none; }
.at-error { color: #ffafae; }
.at-table-scroll { max-width: 100%; overflow: auto; border: 1px solid var(--ft-line); border-radius: 12px; }
.at-table { width: 100%; min-width: 815px; border-collapse: collapse; font-size: .84rem; }
.at-table :is(th, td) { text-align: start; padding: .55rem .45rem; border-bottom: 1px solid var(--ft-line); }
.at-table thead { background: #111724; color: var(--ft-muted); }
.at-table thead th .first-button { padding: .3rem .25rem; border-color: transparent; background: transparent; font-size: inherit; }
.at-table tbody tr:nth-child(even) { background: #161c26; }
.at-table tbody tr.at-selected { background: color-mix(in srgb, var(--ft-sky) 12%, var(--ft-card)); }
.at-item { display: flex; align-items: center; gap: .5rem; }
.at-item code { color: var(--ft-ink); overflow-wrap: anywhere; }
.at-item img { flex: none; object-fit: contain; padding: 1px; background: #171e2a; border: 1px solid var(--ft-line); border-radius: 7px; }
.at-row-actions, .at-chips { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem; }
.at-row-actions { flex-wrap: nowrap; }
.at-row-actions .first-button { min-width: 30px; padding: .35rem; font-size: .95rem; line-height: 1; }
.at-row-actions .first-button:last-child { color: #ffafae; }
.at-chips span { border-radius: 5px; padding: .2rem .35rem; color: #9acbf8; background: #1b2c42; font-size: .7rem; }
.at-chips span[data-tag="value"] { color: #abecd2; background: #153329; }
.at-chips span[data-tag="tag"] { color: #e1ccfa; background: #302346; }
.at-footer { justify-content: center; align-items: center; }
.at-dialog { width: min(760px, calc(100% - 24px)); max-height: calc(100dvh - 40px); box-sizing: border-box; padding: 0; color: var(--ft-ink); background: var(--ft-card); border: 1px solid var(--ft-line); border-radius: 16px; }
.at-dialog::backdrop { background: #070b11bd; }
.at-dialog-inner { display: grid; gap: 14px; padding: clamp(12px, 3vw, 24px); }
.at-dialog-title, .at-dialog-actions { justify-content: space-between; align-items: center; }
.at-dialog-title { position: sticky; z-index: 1; top: 0; padding: .7rem 0; background: var(--ft-card); border-bottom: 1px solid var(--ft-line); }
.at-dialog-title h2 { margin: 0; overflow-wrap: anywhere; }
.at-editor-grid, .at-flags { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.at-editor-field, .at-flags, .at-preview { padding: .7rem; border: 1px solid var(--ft-line); border-radius: 9px; }
.at-editor-field .first-field, .at-flags .first-field { margin: .25rem 0; min-width: 0; }
.at-flags { min-width: 0; }
.at-preview { background: #121a26; }
.at-preview ul { display: grid; gap: .35rem; padding-left: 1.4rem; }
.at-preview li span { display: block; color: var(--ft-muted); font-size: .85rem; }
.at-dialog p:empty { display: none; }
.at-dialog-actions { justify-content: flex-end; }
@media (max-width: 540px) {
  .at-editor-grid, .at-flags { grid-template-columns: 1fr; }
}
