/* Percent-based workspaces; only content panels scroll. Typography follows the existing zoom. */
.next-content:has(.next-admin-page) { overflow: hidden; }
.next-admin-page { display: flex; flex-direction: column; width: 100%; height: 100%; min-width: 0; min-height: 0; overflow: hidden; }
.next-admin-page > .next-page-head { flex: 0 0 auto; }
.next-admin-body { position: relative; flex: 1 1 auto; min-height: 0; min-width: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.next-admin-content { flex: 1 1 auto; min-height: 0; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.next-admin-loading { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; padding: 20px; background: rgba(255,255,255,.91); text-align: center; font-size: .875rem; }
.next-admin-spinner { display: inline-block; flex: 0 0 auto; width: 22px; height: 22px; border: 3px solid #eee8d6; border-top-color: #a37b08; border-radius: 50%; animation: next-admin-spin 1s linear infinite; }
@keyframes next-admin-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .next-admin-spinner { animation: none; border-color: #a37b08; } }
.next-admin-filter { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fafaf8; }
.next-admin-filter input { flex: 1 1 30%; min-width: 0; }
.next-admin-filter select { flex: 0 1 24%; min-width: 0; }
.next-admin-filter input, .next-admin-filter select, .next-admin-setting-list > input, .next-admin-norm-category > header > input { min-height: 40px; box-sizing: border-box; padding: 8px 11px; border: 1px solid #d7d7d2; border-radius: 7px; color: var(--ink); background: #fff; font: inherit; font-size: .8125rem; }
.next-admin-filter .is-active { background: #fff1bd; border-color: #e5cb7a; }
.next-admin-scroll { flex: 1 1 auto; min-height: 0; min-width: 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.next-admin-empty { padding: 28px; color: var(--muted); text-align: center; font-size: .875rem; }
.next-admin-table { width: 100%; border-collapse: collapse; font-size: .8125rem; }
.next-admin-table th { position: sticky; top: 0; z-index: 1; background: #f5f5f1; text-align: left; color: #5c5b54; font-size: .6875rem; text-transform: uppercase; }
.next-admin-table th, .next-admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.next-admin-table small { display: block; margin-top: 4px; color: var(--muted); font-size: .6875rem; overflow-wrap: anywhere; }
.next-admin-table td { overflow-wrap: anywhere; }
.next-admin-log-table { table-layout: fixed; }
.next-admin-log-table th:nth-child(1) { width: 10%; }
.next-admin-log-table th:nth-child(2) { width: 16%; }
.next-admin-log-table th:nth-child(3) { width: 24%; }
.next-admin-log-table th:nth-child(4) { width: 50%; }
.next-admin-log-table summary { cursor: pointer; white-space: pre-wrap; }
.next-admin-log-table pre { padding: 12px; border-radius: 6px; background: #f8f8f5; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .75rem; }
.next-admin-level { display: inline-block; border-radius: 5px; padding: 4px 6px; background: #ecece6; font-size: .6875rem; font-weight: 700; }
.next-admin-level.error, .next-admin-level.fatal { color: #9f2525; background: #ffe7e2; }
.next-admin-level.warning { color: #795c03; background: #fff3c9; }
.next-admin-pagination { flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: .75rem; color: var(--muted); }
.next-admin-pagination > span { margin-right: auto; }
.next-admin-customer { margin: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; }
.next-admin-customer > header { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 16px; background: #fafaf7; font-size: .875rem; }
.next-admin-customer h2 { margin: 0 0 5px; font-size: 1rem; }
.next-admin-customer small, .next-admin-muted { color: var(--muted); font-size: .75rem; }
.next-admin-totals { display: flex; gap: 20px; flex-wrap: wrap; padding: 10px 16px; border-block: 1px solid var(--line); font-size: .75rem; }
.next-admin-document-head { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 15px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.next-admin-document-head > .next-form-field { flex: 0 1 25%; }
.next-admin-document-head > span { margin-left: auto; font-size: .75rem; color: var(--muted); }
.next-admin-document-head h2 { margin: 0 0 4px; font-size: 1rem; overflow-wrap: anywhere; }
.next-admin-document-head small { color: var(--muted); font-size: .75rem; }
.next-admin-editor { flex: 1 1 auto; display: flex; min-width: 0; min-height: 0; padding: 14px 16px; overflow: hidden; }
.next-admin-editor > .next-rich-text-editor { flex: 1 1 auto; min-height: 0; min-width: 0; display: flex; flex-direction: column; }
.next-admin-editor .cke { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.next-admin-editor .cke_inner { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.next-admin-editor .cke_top, .next-admin-editor .cke_bottom { flex: 0 0 auto; }
.next-admin-editor .cke_contents { flex: 1 1 auto; min-height: 0; }
.next-admin-note { flex: 0 0 auto; margin: 0; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; line-height: 1.5; }
.next-admin-new-version { padding: 20px 24px; font-size: .8125rem; }
.next-admin-settings-layout { flex: 1 1 auto; min-height: 0; min-width: 0; display: grid; grid-template-columns: minmax(0, 27%) minmax(0, 73%); overflow: hidden; }
.next-admin-setting-list { display: flex; flex-direction: column; gap: 5px; min-height: 0; overflow-y: auto; border-right: 1px solid var(--line); padding: 12px; background: #fafaf7; }
.next-admin-setting-list > input { width: 100%; flex: 0 0 auto; margin-bottom: 8px; }
.next-admin-setting-list > button { padding: 11px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); font: inherit; font-size: .8125rem; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.next-admin-setting-list > button.is-active, .next-admin-setting-list > button:hover { background: #fff1bd; }
.next-admin-setting-workspace { display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; }
.next-admin-setting-workspace > .next-admin-scroll { padding: 16px; }
.next-admin-norms { display: grid; gap: 14px; }
.next-admin-norm-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.next-admin-norm-category, .next-admin-norm-definitions { border: 1px solid var(--line); border-radius: 8px; }
.next-admin-norm-category > header, .next-admin-norm-row-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; }
.next-admin-norm-category > header { background: #fafaf7; border-radius: 8px 8px 0 0; }
.next-admin-norm-category > header > input, .next-admin-norm-row-head > label { flex: 1 1 45%; min-width: 0; }
.next-admin-norm-row { border-top: 1px solid var(--line); }
.next-admin-norm-row > summary, .next-admin-norm-definitions > summary { padding: 12px; font-size: .8125rem; font-weight: 700; cursor: pointer; }
.next-admin-norm-definitions > label, .next-admin-norm-profile { margin: 12px; }
.next-admin-norm-profile { display: flex; align-items: center; gap: 14px; }
.next-admin-norm-profile > label { flex: 1; }
.next-admin-flags { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 10px 12px; border: 1px solid var(--line); border-radius: 6px; padding: 10px; font-size: .75rem; }
.next-admin-flags legend { color: var(--muted); padding-inline: 5px; }
.next-admin-flags label { display: flex; align-items: center; gap: 6px; }
.next-admin-norm-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 12px; }
.next-admin-norm-values > section { padding: 12px; border: 1px solid var(--line); border-radius: 6px; }
.next-admin-norm-values h3 { margin: 0 0 10px; font-size: .8125rem; overflow-wrap: anywhere; }
.next-admin-rating-value { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.next-admin-rating-value > label:last-child { grid-column: 1 / -1; }
.next-support-control { position: relative; }
.next-support-control .is-support-active { color: #1b664b; background: #e2f5ed; border-color: #9fcebc; }
.next-support-popover { position: fixed; top: var(--next-header-height); right: 2vw; z-index: 45; width: 30vw; max-height: calc(var(--next-viewport-height, 100dvh) - var(--next-header-height) - 24px); overflow-y: auto; padding: 18px; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 35px rgba(0,0,0,.2); background: #fff; font-size: .8125rem; line-height: 1.5; }
.next-support-popover > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.next-support-popover .next-admin-spinner { vertical-align: middle; margin-right: 8px; }
.next-support-viewer { position: relative; flex: 1 1 auto; min-width: 0; min-height: 0; overflow: hidden; background: #20201e; }
.next-support-viewer video { width: 100%; height: 100%; object-fit: contain; }
.next-support-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 15px; padding: 20px; color: #e3e3dc; text-align: center; font-size: .875rem; }
.next-support-empty > .material-icons { width: 36px; height: 36px; }
@media (max-width: 65rem) {
    .next-admin-norm-values { grid-template-columns: minmax(0, 1fr); }
    .next-support-popover { width: 48vw; }
    .next-support-control > button > span { display: none; }
}
@media (max-width: 47.5rem) {
    .next-admin-filter input { flex-basis: 100%; }
    .next-admin-filter select { flex: 1 1 35%; }
    .next-admin-settings-layout { grid-template-columns: minmax(0, 32%) minmax(0, 68%); }
    .next-admin-document-head > .next-form-field { flex-basis: 100%; }
    .next-admin-setting-list { padding: 8px; }
    .next-support-popover { width: 90vw; }
    .next-admin-log-table th:nth-child(2) { width: 20%; }
    .next-admin-log-table th:nth-child(3) { width: 18%; }
}
