:root {
  --ink: #18211c;
  --muted: #647069;
  --line: #dce2dd;
  --surface: #fff;
  --canvas: #f3f6f3;
  --brand: #176b4d;
  --on-brand: #fff;
  --danger: #b42318;
  --shadow: 0 5px 18px rgba(24, 33, 28, .055);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
.admin-page, .auth-page { --brand-dark: color-mix(in srgb, var(--brand) 58%, #101814); --brand-soft: color-mix(in srgb, var(--brand) 12%, #fff); }
.admin-page { min-height: 100vh; background: linear-gradient(140deg, var(--brand-soft), var(--canvas) 260px); }
.admin-sidebar { position: fixed; inset: 0 auto 0 0; width: 208px; padding: 15px 12px; background: var(--brand-dark); color: #edf7f1; display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-size: 1.02rem; font-weight: 800; letter-spacing: -.025em; padding: 5px 7px; }
.brand__logo { display: block; max-width: 38px; max-height: 30px; object-fit: contain; }
.brand small { display: block; color: rgba(255, 255, 255, .62); font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-top: 2px; }
.admin-nav { display: grid; gap: 2px; margin-top: 18px; }
.admin-nav a { position: relative; padding: 7px 9px 7px 13px; border-radius: 4px; text-decoration: none; color: #edf7f1; font-size: .84rem; }
.admin-nav a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.admin-nav a.is-active { color: #fff; background: rgba(255, 255, 255, .14); font-weight: 760; }
.admin-nav a.is-active::before { content: ''; position: absolute; left: 5px; top: 50%; width: 3px; height: 14px; border-radius: 1px; background: #fff; transform: translateY(-50%); }
.admin-nav__group { border-radius: 4px; }
.admin-nav__group > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px; border-radius: 4px; color: #edf7f1; font-size: .84rem; cursor: pointer; list-style: none; }
.admin-nav__group > summary::-webkit-details-marker { display: none; }
.admin-nav__group > summary:hover { background: rgba(255, 255, 255, .12); }
.admin-nav__group > summary svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform .16s ease; }
.admin-nav__group[open] > summary svg { transform: rotate(180deg); }
.admin-nav__group > div { display: grid; gap: 1px; padding: 2px 0 4px 8px; }
.admin-nav__group > div a { color: rgba(237, 247, 241, .82); font-size: .79rem; }
.admin-sidebar__footer { margin-top: auto; display: grid; gap: 8px; padding: 14px 8px 0; border-top: 1px solid rgba(255, 255, 255, .2); color: rgba(255, 255, 255, .72); font-size: .82rem; }
.admin-sidebar__footer a { color: #fff; text-decoration: none; }
.admin-main { margin-left: 208px; padding: 22px 26px 34px; max-width: 1480px; min-height: 100vh; }
.sidebar-toggle { display: none; }
.page-heading, .section-heading, .panel__heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.page-heading { min-height: 46px; padding-bottom: 10px; border-bottom: 1px solid color-mix(in srgb, var(--brand) 15%, var(--line)); }
.page-heading__tools { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.page-heading h1, .section-heading h2, .panel h2 { margin: 0; letter-spacing: -.035em; }
.page-heading h1 { font-size: 1.46rem; }
.eyebrow { color: var(--brand); font-size: .66rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; margin: 0 0 4px; }
.back-link { display: inline-block; color: var(--muted); font-size: .78rem; text-decoration: none; margin-bottom: 5px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 14px; box-shadow: var(--shadow); margin-bottom: 12px; }
.stack { display: grid; gap: 10px; }
.form-grid { display: grid; gap: 10px; align-items: start; }
.form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.settings-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 13px; align-items: start; }
label { display: grid; gap: 4px; align-content: start; }
label > span { font-weight: 720; font-size: .8rem; }
label small, .form-help, .muted { color: var(--muted); font-size: .76rem; line-height: 1.35; }
.form-help { margin: 0; }
input, select, textarea { width: 100%; border: 1px solid #b9c5bd; border-radius: 4px; background: #fff; color: var(--ink); padding: 7px 9px; outline: none; font-size: .88rem; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent); }
input[type="color"] { min-height: 38px; padding: 3px; cursor: pointer; }
textarea { resize: vertical; }
.code-textarea { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .87rem; line-height: 1.6; }
.rich-editor { display: grid; gap: 5px; }
.rich-editor__label { font-weight: 700; font-size: .86rem; }
.rich-editor__toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; border: 1px solid #b9c5bd; border-bottom: 0; border-radius: 4px 4px 0 0; background: #f4f6f4; }
.rich-editor__toolbar button { min-width: 30px; border: 0; border-radius: 5px; padding: 5px 7px; background: transparent; color: var(--ink); font-size: .76rem; cursor: pointer; }
.rich-editor__toolbar svg { width: 17px; height: 17px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rich-editor__toolbar circle { fill: currentColor; stroke: none; }
.rich-editor__toolbar button:hover, .rich-editor__toolbar button:focus-visible { background: var(--brand-soft); color: var(--brand-dark); }
.rich-editor__surface { min-height: 132px; max-height: 55vh; overflow: auto; border: 1px solid #b9c5bd; border-radius: 0 0 4px 4px; background: #fff; padding: 9px 11px; line-height: 1.5; outline: none; }
.rich-editor__surface:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent); }
.rich-editor__surface > :first-child { margin-top: 0; }
.rich-editor__surface > :last-child { margin-bottom: 0; }
.check { display: flex; align-items: center; gap: 8px; min-height: 38px; }
.check input { width: auto; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: auto; border: 1px solid var(--brand); border-radius: 4px; background: var(--brand); color: var(--on-brand); padding: 7px 11px; font-size: .86rem; font-weight: 750; text-decoration: none; cursor: pointer; }
.button:hover { filter: brightness(.9); }
.button--secondary { background: #fff; color: var(--brand); }
.button--secondary:hover { background: var(--brand-soft); }
.button--danger { border-color: #e4aaa5; color: var(--danger); }
.button--danger:hover { background: #fff1f0; }
.button--small { padding: 5px 8px; font-size: .75rem; }
.button-row, .inline-form, .search-form, .user-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form select, .search-form input, .user-actions select { width: auto; }
.search-form { margin: 14px 0; }
.search-form input { flex: 1 1 260px; max-width: 460px; }
.link-button { appearance: none; border: 0; padding: 0; background: none; color: inherit; text-decoration: underline; cursor: pointer; }
.link-button--danger { color: var(--danger); font-size: .84rem; }
.tabs { display: flex; gap: 4px; margin: -4px 0 16px; }
.tabs a { padding: 6px 10px; border-radius: 4px; text-decoration: none; color: var(--muted); font-size: .78rem; font-weight: 800; }
.tabs a.is-active { background: var(--brand-soft); color: var(--brand-dark); }
.table-wrap { overflow: auto; padding: 0; }
.table-scroll { overflow: auto; border: 1px solid var(--line); border-radius: 4px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: .84rem; }
th { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
tr:last-child td { border-bottom: 0; }
.align-right { text-align: right; }
.tag, .status { display: inline-flex; margin-left: 6px; padding: 3px 6px; border-radius: 3px; background: #edf1ee; color: #526159; font-size: .66rem; font-weight: 800; }
.status--published, .status--applied, .status--active { background: #daf0e3; color: #14633f; }
.status--modified, .status--inactive { background: #fee4e2; color: #9d1c14; }
.status--pending, .status--draft, .status--invited { background: #fff1cc; color: #805d00; }
.status--expired { background: #edf1ee; color: #526159; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list .tag { margin: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.stats-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-card { position: relative; display: grid; gap: 2px; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 13px 14px; box-shadow: var(--shadow); text-decoration: none; }
.stat-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--brand); }
.stat-card strong { font-size: 1.4rem; letter-spacing: -.04em; }
.stat-card span { color: var(--muted); }
.content-section { margin-top: 20px; }
.block-card { position: relative; }
.block-card__heading { display: flex; align-items: center; justify-content: flex-start; gap: 10px; color: var(--muted); font-size: .8rem; cursor: pointer; list-style: none; }
.block-card__heading::-webkit-details-marker { display: none; }
.block-card__heading > span:last-of-type { margin-left: auto; }
.block-card:not(.is-open) > form { display: none; }
.block-card.is-open .block-card__heading { margin-bottom: 13px; }
.block-card__heading strong { color: var(--ink); font-size: 1rem; }
.block-card__toggle { flex: 0 0 auto; display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); cursor: pointer; }
.block-card__toggle:hover, .block-card__toggle:focus-visible { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft); }
.block-card__toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .16s ease; }
.block-card.is-open .block-card__toggle svg { transform: rotate(180deg); }
.details-body { padding-top: 13px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.media-card { overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: var(--shadow); }
.media-card__preview { aspect-ratio: 4 / 3; background: #e8ede9; display: grid; place-items: center; color: var(--muted); font-weight: 800; }
.media-card__preview img { width: 100%; height: 100%; object-fit: cover; }
.media-card__body { padding: 14px; display: grid; gap: 7px; }
.media-card__body strong, .media-card__body code { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-card__body small { color: var(--muted); }
.media-card__body code { font-size: .72rem; }
.logo-preview { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px dashed var(--line); border-radius: 5px; }
.logo-preview img { max-width: 180px; max-height: 72px; object-fit: contain; }
.mail-preview { overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.mail-preview iframe { display: block; width: 100%; height: 600px; border: 0; }
.flash { padding: 9px 11px; border-radius: 4px; margin-bottom: 10px; background: #e7edf8; color: #27466f; }
.flash--success { background: #dbf0e3; color: #135a39; }
.flash--warning { background: #fff1cc; color: #6c4e00; }
.flash--error { background: #fee4e2; color: #9d1c14; }
.empty { text-align: center; color: var(--muted); padding: 24px; }
.is-muted { opacity: .55; }
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top, var(--brand-soft), var(--canvas) 55%); }
.auth-card { width: min(100%, 420px); background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 26px; box-shadow: var(--shadow); }
.brand--auth { color: var(--brand); padding: 0; margin-bottom: 30px; }
.brand--auth .brand__logo { max-width: 150px; max-height: 64px; }
.auth-card h1 { margin: 0 0 10px; letter-spacing: -.04em; }
.field-action { align-self: end; }
.toast-region { position: fixed; top: 16px; right: 18px; z-index: 100; display: grid; gap: 8px; width: min(380px, calc(100vw - 36px)); pointer-events: none; }
.toast { padding: 9px 12px; border-radius: 5px; box-shadow: 0 12px 36px rgba(24, 33, 28, .2); background: #e7edf8; color: #27466f; animation: toast-in .18s ease-out; }
.toast--success { background: #dbf0e3; color: #135a39; }
.toast--warning { background: #fff1cc; color: #6c4e00; }
.toast--error { background: #fee4e2; color: #9d1c14; }
.is-submitting { opacity: .65; cursor: wait; }
.is-submitting .button { pointer-events: none; }
.audit-detail { margin: 3px 0 0; font-size: .75rem; color: var(--muted); overflow-wrap: anywhere; }
.compact-panel { padding: 12px 14px; }
.inline-label { display: flex; align-items: center; gap: 9px; }
.inline-label select { width: auto; }
.notice p { margin: 5px 0 0; }
.notice--warning { border-color: #efd891; background: #fff9e7; color: #6c4e00; }
.translation-sync { margin-bottom: 14px; }
.translation-sync .panel__heading { align-items: flex-start; }
.translation-diff { display: flex; flex-wrap: wrap; gap: 7px; }
.translation-diff .status { margin: 0; }
.translation-diff__details > summary { cursor: pointer; font-weight: 750; }
.translation-diff__details ul { margin: 7px 0 0; padding-left: 20px; }
[data-page-create-open][hidden], [data-page-create-modal][hidden] { display: none !important; }
.menu-tabs, .editor-tabs { display: flex; align-items: center; gap: 4px; overflow-x: auto; margin-bottom: 14px; }
.menu-tab, .editor-tabs button { appearance: none; border: 0; border-radius: 4px; background: transparent; color: var(--muted); padding: 6px 9px; font: inherit; font-size: .76rem; font-weight: 800; white-space: nowrap; cursor: pointer; }
.menu-tab.is-active, .editor-tabs button.is-active { color: var(--brand-dark); background: var(--brand-soft); }
.menu-panel, .editor-panel { display: none; }
.menu-panel.is-active, .editor-panel.is-active { display: block; }
.editor-panel.is-active.stack { display: grid; }
.menu-settings { padding: 10px 14px; }
.menu-settings details > summary, .field-settings > summary { cursor: pointer; font-weight: 750; }
.menu-builder .panel__heading p { margin: 4px 0 0; color: var(--muted); font-size: .8rem; }
.page-tree { list-style: none; padding: 0; margin: 0; min-height: 10px; }
.page-tree--nested { margin: 5px 0 0 28px; padding-left: 13px; border-left: 1px dashed #bdc8c0; }
.page-tree__item { margin: 5px 0; }
.page-tree__row, .page-card { display: flex; align-items: center; gap: 8px; min-height: 46px; border: 1px solid var(--line); border-radius: 4px; background: #fff; padding: 6px 8px; }
.page-tree__item.is-dragging, [data-sort-id].is-dragging { opacity: .42; }
.page-tree__handle, .definition-field__handle, .drag-cell { flex: 0 0 auto; color: var(--muted); cursor: grab; font-weight: 900; letter-spacing: -3px; user-select: none; touch-action: none; }
.page-tree__main, .page-card > div { min-width: 0; flex: 1; display: grid; gap: 2px; }
.page-tree__main span, .page-card span { color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-tree__row .button-row { justify-content: flex-end; }
.page-cards { display: grid; gap: 7px; }
.compact-empty { padding: 18px; margin: 0; }
.editor-tabs { border-bottom: 1px solid var(--line); padding-bottom: 7px; margin-bottom: 2px; }
.page-editor-shell { gap: 0; }
.page-editor-shell > .editor-tabs { margin-bottom: 0; }
.page-editor-shell > .editor-main-form, .page-editor-shell > .editor-panel { padding-top: 14px; }
.page-editor-shell > .editor-main-form > .editor-panel:first-child { padding-top: 0; }
[data-page-editor]:is([data-active-editor-tab="blocks"], [data-active-editor-tab="records"]) > .editor-main-form { padding-top: 0; }
[data-page-editor]:is([data-active-editor-tab="blocks"], [data-active-editor-tab="records"]) > .editor-main-form > .sticky-save { display: none; }
.input-action { display: flex; gap: 6px; }
.input-action input { flex: 1; }
.input-prefix { display: flex; align-items: center; border: 1px solid #b9c5bd; border-radius: 4px; background: #f4f6f4; overflow: hidden; }
.input-prefix > span { padding: 0 0 0 9px; color: var(--muted); font-size: .8rem; white-space: nowrap; }
.input-prefix input { border: 0; box-shadow: none; }
.page-type-options[hidden], [data-page-type-section][hidden] { display: none !important; }
.sticky-save { position: sticky; bottom: 8px; z-index: 3; display: flex; justify-content: flex-end; align-items: center; gap: 9px; width: fit-content; margin-left: auto; padding: 6px; border: 1px solid var(--line); border-radius: 5px; background: rgba(255,255,255,.96); box-shadow: var(--shadow); }
.sticky-save span { color: var(--muted); font-size: .78rem; }
.has-unsaved-changes .sticky-save span { color: #8a5b00; font-weight: 700; font-size: 0; }
.has-unsaved-changes .sticky-save span::after { content: 'Neuložené změny'; font-size: .78rem; }
.definition-value-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; }
.definition-value--1-4 { grid-column: span 3; }
.definition-value--1-3 { grid-column: span 4; }
.definition-value--1-2 { grid-column: span 6; }
.definition-value--1-1 { grid-column: span 12; }
.definition-fields { display: grid; gap: 8px; }
.definition-field { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 12px; margin-bottom: 0; }
.definition-field__form { min-width: 0; }
.field-settings { border: 1px solid var(--line); border-radius: 4px; padding: 7px 9px; }
.span-2 { grid-column: span 2; }
.definition-gallery__meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin-top: 8px; }
.definition-gallery__meta fieldset { display: grid; gap: 7px; border: 1px solid var(--line); border-radius: 4px; padding: 10px; }
.definition-gallery__meta legend { max-width: 100%; padding: 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; font-weight: 700; }
.revision-list { display: grid; gap: 5px; }
.revision-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: .82rem; }
.approved-version { border: 1px solid #efc56b; border-radius: 4px; background: #fff8e8; padding: 10px; }
.approved-version strong { color: #714d00; }
.button--warning { border-color: #b87900; background: #b87900; color: #fff; }
.button--warning:hover { background: #8d5d00; }
.admin-modal { width: min(620px, calc(100vw - 28px)); border: 0; border-radius: 7px; padding: 0; box-shadow: 0 18px 60px rgba(15, 25, 19, .28); }
.admin-modal::backdrop { background: rgba(15, 25, 19, .48); }
.admin-modal__header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.admin-modal__header h2 { margin: 0; }
.admin-modal__body { padding: 14px; }
.admin-modal__footer { display: flex; justify-content: flex-end; gap: 7px; padding: 9px 14px; border-top: 1px solid var(--line); background: #f7f9f7; }
.icon-button { display: inline-grid; place-items: center; width: 29px; height: 29px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); cursor: pointer; }
.icon-button:hover { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft); }
.icon-button[disabled] { opacity: .35; cursor: default; }
.page-tree__tools { display: flex; align-items: center; gap: 4px; }
.url-parent-action { white-space: nowrap; }
.url-parent-action.is-current { color: #14633f; border-color: #acd9bd; background: #eff9f3; }
.drag-cell { width: 28px; color: var(--muted); font-weight: 900; letter-spacing: -3px; cursor: grab; }
.page-help { flex: 0 0 auto; display: inline-flex; }
.page-help-button { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid color-mix(in srgb, var(--brand) 55%, var(--line)); border-radius: 4px; background: #fff; color: var(--brand); cursor: pointer; }
.page-help-button:hover, .page-help-button:focus-visible { background: var(--brand-soft); }
.page-help-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.admin-help-modal { width: min(720px, calc(100vw - 28px)); max-height: min(84vh, 760px); }
.admin-help-modal .admin-modal__body { max-height: 62vh; overflow: auto; }
.help-section { padding: 0 0 10px 13px; border-bottom: 1px solid var(--line); border-left: 3px solid color-mix(in srgb, var(--brand) 45%, var(--line)); }
.help-section:last-child { padding-bottom: 0; border-bottom: 0; }
.help-section h3, .help-section p { margin: 0; }
.help-section p { margin-top: 4px; color: var(--muted); font-size: .84rem; line-height: 1.5; }
.contact-list { display: grid; padding: 0; overflow: hidden; }
.contact-list__row { display: grid; grid-template-columns: auto 46px minmax(0, 1fr) auto auto; align-items: center; gap: 9px; padding: 8px 11px; border-bottom: 1px solid var(--line); background: #fff; }
.contact-list__row:last-child { border-bottom: 0; }
.contact-list__main { min-width: 0; display: grid; gap: 2px; }
.contact-list__main span { color: var(--muted); font-size: .78rem; }
.contact-avatar { display: block; width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.contact-avatar--placeholder { position: relative; overflow: hidden; color: transparent; background: #dfe8e2; }
.contact-avatar--female { background: #ece2e7; }
.contact-avatar--placeholder::before { content: ''; position: absolute; left: 50%; top: 9px; width: 15px; height: 15px; border-radius: 50%; background: #83958a; transform: translateX(-50%); }
.contact-avatar--placeholder::after { content: ''; position: absolute; left: 50%; bottom: -4px; width: 35px; height: 25px; border-radius: 50% 50% 0 0; background: #83958a; transform: translateX(-50%); }
button.drag-cell { appearance: none; border: 0; background: none; }
.contact-editor { display: grid; grid-template-columns: minmax(230px, .72fr) minmax(0, 1.8fr); gap: 16px; align-items: start; }
.avatar-picker { margin: 0; border: 1px solid var(--line); border-radius: 4px; padding: 10px; }
.avatar-picker legend { padding: 0 5px; font-size: .82rem; font-weight: 700; }
.avatar-picker > div { display: flex; gap: 8px; }
.avatar-picker label { display: grid; grid-template-columns: auto 42px auto; align-items: center; gap: 7px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
.avatar-picker input { width: auto; }
.avatar-picker .contact-avatar { width: 38px; height: 38px; }
.contact-card-tools { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.contact-card-tools p { margin: 4px 0 0; }
.contact-qr-preview { display: grid; grid-template-columns: 58px auto; align-items: center; gap: 9px; color: var(--brand-dark); font-size: .8rem; font-weight: 750; text-decoration: none; }
.contact-qr-preview img { display: block; width: 58px; height: 58px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.system-text-filters { display: grid; grid-template-columns: minmax(260px, 2fr) repeat(2, minmax(170px, 1fr)); gap: 12px; }
.system-text-row { margin-bottom: 0; }
.system-text-row__heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 9px; }
.system-text-row__heading > div { display: grid; gap: 2px; }
.system-text-row__heading span, .system-text-row__heading small { color: var(--muted); font-size: .76rem; }
.system-text-row__heading code { margin-left: 4px; }
.system-text-locales { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 9px; }
.system-text-locale { padding: 8px; border: 1px solid var(--line); border-radius: 4px; background: #fafcfa; }
.system-text-locale.is-overridden { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); background: var(--brand-soft); }
.system-text-locale > span { display: flex; justify-content: space-between; gap: 8px; }
.system-text-locale em { color: var(--muted); font-size: .7rem; font-weight: 500; }
.system-text-locale details { color: var(--muted); font-size: .75rem; }
.system-text-locale details summary { cursor: pointer; }
.system-text-locale details p { margin: 5px 0 0; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

@media (max-width: 900px) {
  .admin-sidebar { transform: translateX(-100%); transition: transform .2s; }
  .sidebar-open .admin-sidebar { transform: none; }
  .sidebar-toggle { display: block; position: fixed; right: 16px; top: 16px; z-index: 30; border: 0; border-radius: 4px; background: var(--brand-dark); color: #fff; padding: 9px 12px; }
  .admin-main { margin-left: 0; padding: 62px 16px 24px; }
  .form-grid--2, .form-grid--3, .form-grid--4, .stats-grid, .stats-grid--3, .settings-grid { grid-template-columns: 1fr; }
  .page-heading, .section-heading { align-items: flex-start; }
  .inline-form { align-items: stretch; flex-direction: column; }
  .inline-form select { width: 100%; }
  .definition-value-grid { grid-template-columns: 1fr; }
  .definition-value--1-4, .definition-value--1-3, .definition-value--1-2, .definition-value--1-1, .span-2 { grid-column: auto; }
  .definition-field { grid-template-columns: auto 1fr; }
  .definition-field > form:last-child { grid-column: 2; }
  .page-tree--nested { margin-left: 12px; padding-left: 7px; }
  .page-tree__row { align-items: flex-start; flex-wrap: wrap; }
  .contact-list__row { grid-template-columns: auto 46px minmax(0, 1fr) auto; }
  .contact-list__row > .status { display: none; }
  .contact-editor, .system-text-filters { grid-template-columns: 1fr; }
  .contact-card-tools { align-items: flex-start; }
}
