/* Admin CMS. Tokens match the "Admin components" frame in Sales-Wireframes.pen. */
@font-face { font-family: 'Inter'; src: url('/fonts/inter-latin.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-latin-ext.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02BA, U+1E00-1EFF; }

:root {
  --bg: #F6F6F7; --text: #1A1A1A; --muted: #6E6E73; --line: #E6E6E8; --surface: #fff;
  --accent: #0071E3; --accent-hover: #0064CA; --accent-soft: #EAF3FE;
  --success: #127A43; --success-soft: #E6F5EC; --warning: #8A5A12; --warning-soft: #FDF3E1;
  --danger: #C5221F; --danger-soft: #FCE8E6; --faint: #B8B8BD;
  --radius: 8px; --radius-lg: 12px;
  --mono: ui-monospace, 'JetBrains Mono', SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.45 'Inter', system-ui, sans-serif; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-family: var(--mono); }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon { flex: none; }

/* Shell */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 232px; flex: none; background: #fff; border-right: 1px solid var(--line); padding: 22px 12px; display: flex; flex-direction: column; justify-content: space-between; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 12px 28px; }
.tag { padding: 3px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 500; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius); color: var(--text); font-weight: 500; }
.nav__item .icon { color: var(--muted); }
.nav__item:hover { background: var(--bg); text-decoration: none; }
.nav__item.is-active { background: var(--accent-soft); color: var(--accent); }
.nav__item.is-active .icon { color: var(--accent); }
.account { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.account__who { display: flex; flex-direction: column; flex: 1; min-width: 0; font-size: 13px; }
.account__who span { color: var(--muted); font-size: 12px; }
.avatar { width: 32px; height: 32px; flex: none; border-radius: 999px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.link-btn { border: 0; background: none; padding: 6px; border-radius: 6px; color: var(--muted); cursor: pointer; display: inline-flex; }
.link-btn:hover { background: var(--bg); color: var(--text); }

.main { flex: 1; min-width: 0; padding: 28px 36px 60px; max-width: 1320px; }
.main--wide { max-width: none; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 20px; }
.page-head h1 { font-size: 26px; font-weight: 600; letter-spacing: -.5px; }
.crumbs { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.page-head__sub { color: var(--muted); margin-top: 6px; }
.page-head__actions { display: flex; align-items: center; gap: 10px; flex: none; }
.save-status { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.save-status.is-dirty { color: var(--warning); }
.save-status.is-dirty::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #E0A33A; }
.save-status.is-error { color: var(--danger); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; color: var(--text); font-weight: 500; cursor: pointer; white-space: nowrap; line-height: 20px; text-decoration: none !important; }
.btn:hover { border-color: #C9C9CE; }
.btn:disabled { opacity: .5; cursor: default; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--ghost-danger { color: var(--danger); background: transparent; border-color: transparent; }
.btn--ghost-danger:hover { background: var(--danger-soft); border-color: var(--danger-soft); }
.btn--sm { padding: 5px 10px; font-size: 13px; }
.btn--block { width: 100%; padding: 11px 14px; }
.text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 500; border: 0; background: none; padding: 0; cursor: pointer; font-size: 13px; }
.icon-link { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 6px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.icon-link:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.icon-link:disabled { opacity: .3; cursor: default; background: none; }

/* Flash, notes */
.flash { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; font-size: 13px; }
.flash--ok { background: var(--success-soft); color: var(--success); }
.flash--error { background: var(--danger-soft); color: var(--danger); }
.note { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: var(--radius-lg); font-size: 13px; margin-top: 12px; }
.note--warning { background: var(--warning-soft); color: var(--text); }
.note--warning .icon { color: var(--warning); }
.info-line { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--radius); background: var(--bg); color: var(--muted); font-size: 12px; }

/* Cards, layout */
.columns { display: flex; gap: 24px; align-items: flex-start; }
.col-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.col-side { width: 420px; flex: none; display: flex; flex-direction: column; gap: 20px; position: sticky; top: 20px; }
.col-side--wide { width: 460px; }
.settings-grid { display: flex; flex-direction: column; gap: 20px; }
.settings-grid__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.card__head h2 { font-size: 16px; font-weight: 600; }
.card__head p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.card__body { display: flex; flex-direction: column; gap: 16px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.form-foot { display: flex; justify-content: space-between; align-items: center; }

/* Fields */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field__label { font-size: 13px; font-weight: 500; }
.field__hint { font-size: 12px; color: var(--muted); }
.field__error { font-size: 12px; color: var(--danger); }
.req { font-size: 11px; font-weight: 500; color: var(--danger); margin-left: 4px; }
input[type=text], input[type=email], input[type=password], input[type=date], input:not([type]), select, textarea {
  width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.check.is-disabled { color: var(--faint); cursor: default; }
.chip { display: inline-block; padding: 4px 8px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); font-size: 12.5px; white-space: nowrap; }
.search { display: flex; align-items: center; gap: 8px; width: 320px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--muted); }
.search input { border: 0; padding-left: 0; box-shadow: none !important; }
.toolbar { margin-bottom: 16px; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.badge--accent { background: var(--accent-soft); color: var(--accent); }
.badge--success { background: var(--success-soft); color: var(--success); }
.badge--warning { background: var(--warning-soft); color: var(--warning); }
.badge--muted { background: var(--bg); color: var(--muted); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; vertical-align: middle; }
.dot--warn { background: #E0A33A; }

/* Tables */
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: visible; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); background: var(--bg); padding: 10px 20px; }
.table th:first-child { border-top-left-radius: var(--radius-lg); }
.table th:last-child { border-top-right-radius: var(--radius-lg); }
.table td { padding: 14px 20px; border-top: 1px solid var(--line); vertical-align: middle; }
.row-link:hover td { background: #FCFCFD; cursor: pointer; }
.cell-main { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.cell-main span { display: flex; flex-direction: column; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions > *, .row-actions form { display: inline-flex; vertical-align: middle; }
.logo-tile { display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: #fff; font-weight: 700; font-size: 13px; flex: none; }
.logo-tile--img { background: #fff; border: 1px solid var(--line); padding: 3px; }
.logo-tile img { max-width: 100%; max-height: 100%; object-fit: contain; }
.swatches { display: inline-flex; gap: 6px; }
.swatch { display: inline-block; width: 18px; height: 18px; border-radius: 5px; border: 1px solid rgba(0,0,0,.1); }

/* Menus */
.menu { position: relative; display: inline-block; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu__list { position: absolute; right: 0; top: 34px; z-index: 20; min-width: 170px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.1); text-align: left; }
.menu__list form { display: block; }
.menu__list button { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 6px; cursor: pointer; }
.menu__list button:hover { background: var(--bg); }
.menu__list .danger { color: var(--danger); }

/* Segmented controls & tabs */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--radius); background: var(--bg); }
.seg--filters { background: #fff; border: 1px solid var(--line); margin-bottom: 16px; }
.seg__item { padding: 5px 12px; border-radius: 6px; font-size: 13px; font-weight: 500; color: var(--muted); border: 0; background: none; cursor: pointer; }
.seg__item:hover { color: var(--text); text-decoration: none; }
.seg__item.is-active { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.seg--filters .seg__item.is-active { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs__item { padding: 10px 14px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs__item:hover { color: var(--text); text-decoration: none; }
.tabs__item.is-active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* Empty state */
.empty { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 40px; }
.empty__icon { width: 56px; height: 56px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.empty h2 { font-size: 18px; font-weight: 600; }
.empty p { color: var(--muted); max-width: 440px; }

/* Client editor */
.ph-table { display: flex; flex-direction: column; gap: 10px; }
.ph-row { display: grid; grid-template-columns: 190px 1fr; gap: 16px; align-items: center; }
.ph-row--head { font-size: 12px; font-weight: 500; color: var(--muted); }
.ph-key { display: flex; align-items: center; gap: 6px; }
.brand-row { display: grid; grid-template-columns: 1fr 200px 200px; gap: 16px; align-items: start; }
.dropzone { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1.5px dashed var(--line); border-radius: 10px; background: var(--bg); cursor: pointer; }
.dropzone:hover { border-color: var(--accent); }
.dropzone:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.dropzone__preview { width: 56px; height: 56px; flex: none; border-radius: 10px; background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--muted); padding: 6px; }
.dropzone__preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.dropzone__copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dropzone__copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.color-input { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.color-input input[type=color] { width: 26px; height: 26px; padding: 0; border: 1px solid rgba(0,0,0,.1); border-radius: 6px; background: none; cursor: pointer; }
.color-input input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.color-input input[type=color]::-webkit-color-swatch { border: 0; border-radius: 5px; }
.color-input input.mono { border: 0; min-height: 0; padding: 0; box-shadow: none !important; text-transform: uppercase; }
.preview-frame { position: relative; width: 100%; aspect-ratio: 1440 / 1024; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.preview-frame iframe { position: absolute; left: 0; top: 0; width: 1440px; height: 1024px; border: 0; transform-origin: 0 0; pointer-events: none; }
.mini-link { display: flex; flex-direction: column; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.mini-link__top { display: flex; justify-content: space-between; align-items: center; }
.mini-link__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.created-link { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-radius: var(--radius-lg); background: var(--success-soft); color: var(--success); margin-bottom: 16px; }
.created-link code { color: var(--text); background: #fff; padding: 4px 8px; border-radius: 6px; }
.modal-page { display: flex; justify-content: center; padding-top: 12px; }
.card--modal { width: 560px; box-shadow: 0 24px 64px rgba(0,0,0,.08); }

/* Services */
.service-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.service-row { display: flex; align-items: center; gap: 20px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.service-row.is-dragging { opacity: .5; }
.service-row.is-over { border-color: var(--accent); }
.reorder { display: flex; flex-direction: column; align-items: center; gap: 0; color: var(--faint); }
.drag-handle { cursor: grab; display: inline-flex; padding: 2px; }
.service-row__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.service-row__title { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.service-row__title a { color: var(--text); }
.service-row__report { width: 250px; flex: none; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 560px; font-size: 13px; }
.step-chips { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; }
.step-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 500; }
.step-chip.is-done { background: var(--success-soft); color: var(--success); }
.step-chip:hover { text-decoration: none; filter: brightness(.97); }
.readiness { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.readiness .step-chips { padding: 0; }
.file-inline { display: inline-flex; align-items: center; gap: 6px; }
.file-inline--warn { color: var(--warning); }
.file-row { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.file-icon { width: 40px; height: 48px; flex: none; border-radius: 6px; background: #FDECEA; color: #D93025; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.file-row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.reorder-save { position: sticky; bottom: 20px; display: flex; justify-content: flex-end; margin-top: 12px; }
.picker-card { width: 240px; height: 300px; padding: 22px; border: 1px solid #E8E8E8; border-radius: 6px; background: #fff; box-shadow: 0 16px 40px rgba(0,0,0,.08); display: flex; flex-direction: column; justify-content: space-between; }
.picker-card__title { display: block; color: var(--accent); font-size: 17px; font-weight: 500; margin-bottom: 8px; }
.picker-card__desc { font-size: 17px; line-height: 1.4; overflow: hidden; }
.picker-card__state { display: flex; align-items: center; gap: 6px; color: var(--accent); font-size: 13px; }

/* Settings */
.keys-table { display: flex; flex-direction: column; gap: 10px; }
.keys-row { display: grid; grid-template-columns: 190px 1fr 1.4fr 70px 80px 30px; gap: 10px; align-items: center; }
.keys-row--head { font-size: 12px; font-weight: 500; color: var(--muted); }
.keys-row--new { padding-top: 10px; border-top: 1px dashed var(--line); }
.inline-upload { display: flex; gap: 10px; align-items: center; }
.inline-upload input[type=file] { flex: 1; min-width: 0; font-size: 13px; }
.user-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.user-row { display: flex; align-items: center; gap: 12px; }
.user-row.is-inactive { opacity: .55; }
.user-row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.user-row select { width: auto; min-height: 32px; padding: 4px 8px; font-size: 13px; }
.add-user summary { list-style: none; display: inline-flex; }
.add-user summary::-webkit-details-marker { display: none; }
.add-user__form { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; padding: 16px; border-radius: var(--radius); background: var(--bg); }
.invite-box { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: var(--radius); background: var(--accent-soft); }
.copy-field { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.copy-field code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Dialog */
.dialog { border: 0; border-radius: 16px; padding: 24px; width: 440px; max-width: calc(100vw - 32px); box-shadow: 0 24px 64px rgba(0,0,0,.2); }
.dialog::backdrop { background: rgba(15,15,20,.4); }
.dialog h2 { font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.dialog p { color: var(--muted); font-size: 14px; }
.dialog__foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* Sign-in pages */
.bare { background: var(--bg); }
.signin { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.signin__card { width: 400px; max-width: 100%; display: flex; flex-direction: column; gap: 18px; padding: 36px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.signin__card h1 { font-size: 22px; font-weight: 600; letter-spacing: -.4px; }
.signin__card .flash { margin: 0; }

/* Builder */
.builder { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 16px; align-items: start; }
.builder__edit { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.panel--sticky { position: sticky; top: 20px; }
.panel__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.panel__head h2 { font-size: 14px; font-weight: 600; }
.block-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.block-item { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; }
.block-item:hover { border-color: #C9C9CE; }
.block-item.is-selected { background: var(--accent-soft); border-color: var(--accent); }
.block-item.is-dragging { opacity: .4; }
.block-item.is-over { box-shadow: 0 -2px 0 var(--accent); }
.block-item.has-problem .block-item__label::after { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #E0A33A; margin-left: 6px; vertical-align: middle; }
.block-item__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.block-item__label { font-size: 13px; font-weight: 500; }
.block-item__sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.block-item .icon-main { color: var(--muted); }
.block-item.is-selected .icon-main { color: var(--accent); }
.block-item .drag-handle { color: var(--faint); }
.add-block { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; border: 1px dashed var(--faint); border-radius: var(--radius); background: none; color: var(--accent); font-weight: 500; cursor: pointer; width: 100%; }
.add-block:hover { border-color: var(--accent); background: var(--accent-soft); }
.step-note { padding: 12px; border-radius: var(--radius); background: var(--bg); color: var(--muted); font-size: 12px; }
.problems { padding: 12px; border-radius: var(--radius); background: var(--warning-soft); font-size: 12px; }
.problems strong { color: var(--warning); display: block; margin-bottom: 4px; }
.problems ul { margin: 0; padding-left: 16px; }
.problems--ok { background: var(--success-soft); color: var(--success); }
.inspector form { display: flex; flex-direction: column; gap: 14px; }
.inspector .toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.toggle { position: relative; width: 36px; height: 20px; flex: none; }
.toggle input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.toggle span { position: absolute; inset: 0; border-radius: 999px; background: #D9D9DE; transition: background .15s; pointer-events: none; }
.toggle span::after { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle input:checked + span { background: var(--accent); }
.toggle input:checked + span::after { transform: translateX(16px); }
.toggle input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.keys-insert { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--radius); background: var(--bg); }
.keys-insert__list { display: flex; flex-wrap: wrap; gap: 6px; }
.keys-insert button { font-family: var(--mono); font-size: 12px; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.keys-insert button:hover { border-color: var(--accent); }
.image-field { display: flex; flex-direction: column; gap: 8px; }
.image-field__thumb { height: 120px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg) center / cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; }
.preview-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.preview-toolbar select { width: auto; min-height: 32px; padding: 4px 8px; font-size: 13px; }
.preview-legend { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.modal-list { display: flex; flex-direction: column; gap: 10px; }
.type-option { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: left; cursor: pointer; }
.type-option:hover:not(:disabled) { border-color: var(--accent); }
.type-option:disabled { background: var(--bg); cursor: default; opacity: .75; }
.type-option__icon { width: 36px; height: 36px; flex: none; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.type-option:disabled .type-option__icon { background: #fff; color: var(--muted); }
.type-option__text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.type-option__limit { font-size: 12px; font-weight: 500; color: var(--accent); white-space: nowrap; }
.type-option:disabled .type-option__limit { color: var(--muted); }
.dialog--wide { width: 600px; }

@media (max-width: 1200px) {
  .columns { flex-direction: column; }
  .col-side, .col-side--wide { width: 100%; position: static; }
  .builder { grid-template-columns: 240px 1fr; }
  .settings-grid__row { grid-template-columns: 1fr; }
  .builder .panel--preview { grid-column: 1 / -1; }
}
@media (max-width: 800px) {
  .shell { flex-direction: column; }
  .sidebar { position: static; width: 100%; height: auto; flex-direction: row; align-items: center; }
  .main { padding: 20px 16px; }
  .row2, .row3, .brand-row { grid-template-columns: 1fr; }
  .builder { grid-template-columns: 1fr; }
}

/* Compact sidebar (builder pages): icons only, so the preview gets the width. */
.shell--compact .sidebar { width: 64px; padding: 22px 8px; }
.shell--compact .brand { padding: 0 0 28px; justify-content: center; }
.shell--compact .brand img { width: 44px; height: auto; }
.shell--compact .brand .tag, .shell--compact .nav__item span, .shell--compact .account__who { display: none; }
.shell--compact .nav__item { justify-content: center; padding: 10px; }
.shell--compact .account { flex-direction: column; padding: 8px 0; }

/* Preview toolbar + expanded preview */
.preview-toolbar__right { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.preview-dialog { border: 0; padding: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; background: #1b1b1f; color: #fff; }
.preview-dialog::backdrop { background: #1b1b1f; }
.preview-dialog__bar { height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; font-size: 13px; color: #c9c9ce; }
.preview-dialog__bar .btn { background: transparent; color: #fff; border-color: #3a3a40; }
.preview-dialog__bar .btn:hover { border-color: #6a6a70; }
.preview-dialog__stage { height: calc(100vh - 52px); overflow: auto; display: flex; justify-content: center; align-items: flex-start; padding: 0 24px 24px; }
.preview-dialog__frame { position: relative; flex: none; background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.preview-dialog__frame iframe { position: absolute; left: 0; top: 0; width: 1440px; border: 0; transform-origin: 0 0; }
