:root {
    --bg: #e7f1f8;
    --ink: #102435;
    --accent: #1f6f9f;
    --accent-deep: #153f5a;
    --accent-soft: #d9ebf6;
    --panel: rgba(255, 255, 255, 0.94);
    --line: #d3e1eb;
    --warn: #9d0208;
    --sidebar-width: 200px;
    --app-body-scrollbar-width: 0px;
    --header-height: 84px;
    --content-max-width: 980px;
    --min-app-width: 0px;
    --shell-padding-x: 24px;
    --shell-padding-bottom: 24px;
    --panel-padding: 24px;
    --topbar-gap: 16px;
    --topbar-padding-x: 16px;
    --topbar-card-width: 240px;
    --topbar-user-card-width: 300px;
    --topbar-card-gap: 12px;
    --topbar-logo-width: 168px;
    --topbar-logo-gap: 12px;
    --brand-gap: 14px;
    --brand-mark-size: 44px;
    --brand-mark-radius: 14px;
    --brand-name-size: 1.16rem;
    --brand-section-size: 0.84rem;
    --body-font-size: 16px;
    --sidebar-padding-y: 20px;
    --sidebar-padding-x: 16px;
    --sidebar-link-min-height: 48px;
    --sidebar-link-font-size: 0.94rem;
    --sidebar-sublink-min-height: 42px;
    --sidebar-sublink-font-size: 0.9rem;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    min-width: var(--min-app-width);
    overflow-x: auto;
    overflow-y: hidden;
    font-family: "Segoe UI", Tahoma, sans-serif;
    font-size: var(--body-font-size);
    background:
        radial-gradient(circle at top left, rgba(31, 111, 159, 0.18), transparent 22%),
        linear-gradient(180deg, #f7fbfe 0%, var(--bg) 100%);
    color: var(--ink);
}

a {
    color: inherit;
    text-decoration: none;
}

.layout {
    height: 100vh;
    height: 100dvh;
}

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-height);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    padding: 0 var(--topbar-padding-x);
    border-bottom: 1px solid var(--line);
    background: rgba(250, 252, 249, 0.94);
    backdrop-filter: blur(14px);
}

.topbar.topbar-auth {
    gap: 2px;
    justify-content: flex-start;
    padding-top: 4px;
    padding-bottom: 4px;
    padding-left: 0;
    padding-right: 0;
}

.topbar-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: var(--topbar-gap);
    min-height: var(--header-height);
}

.topbar-auth .topbar-main {
    min-height: 34px;
}

.topbar-auth-body {
    margin-left: calc(var(--topbar-logo-width) + var(--topbar-logo-gap));
    min-width: 0;
    padding: 0 var(--topbar-padding-x);
}

.topbar-main-auth {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--topbar-gap);
}

.topbar-main-auth .topbar-center {
    justify-content: flex-start;
}

.topbar-main-auth .topbar-start {
    display: none;
}

.topbar-admin .topbar-main {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.topbar-admin .topbar-center {
    justify-content: flex-start;
}

.topbar-admin-user-card {
    width: min(100%, 620px);
    max-width: 620px;
    gap: 18px;
    justify-content: flex-start;
}

.topbar-admin-logout {
    width: auto;
    min-width: 140px;
    max-width: none;
    justify-content: center;
    font-weight: 700;
}

.offline-snapshot-topbar {
    position: relative;
    flex: 0 0 auto;
}

.offline-snapshot-button {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid #d6a83d;
    border-radius: 50%;
    background: #fff7df;
    color: #6b4a07;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.offline-snapshot-button:hover,
.offline-snapshot-button:focus-visible {
    background: #fff0c2;
    border-color: #c48f1d;
    outline: none;
}

.offline-snapshot-popover {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    z-index: 80;
    width: min(320px, calc(100vw - 24px));
    display: none;
    padding: 12px 14px;
    border: 1px solid #d4b15a;
    border-radius: 8px;
    background: #fffdf6;
    box-shadow: 0 18px 44px rgba(15, 79, 119, 0.18);
    color: #4d3a0b;
    font-size: 0.84rem;
    line-height: 1.4;
}

.offline-snapshot-popover span {
    display: block;
}

.offline-snapshot-topbar:hover .offline-snapshot-popover,
.offline-snapshot-topbar:focus-within .offline-snapshot-popover {
    display: block;
}

.topbar-start {
    min-width: 0;
}

.topbar-center {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--topbar-card-gap);
    min-width: 0;
}

.brand-block {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: var(--brand-gap);
    overflow: hidden;
    flex: 1 1 auto;
}

.brand-mark {
    width: var(--brand-mark-size);
    height: var(--brand-mark-size);
    flex: 0 0 var(--brand-mark-size);
    display: grid;
    place-items: center;
    border-radius: var(--brand-mark-radius);
    background: linear-gradient(135deg, var(--accent) 0%, #4b93bb 100%);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.brand-copy {
    min-width: 0;
    overflow: hidden;
}

.brand-name,
.brand-section {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-name {
    font-size: var(--brand-name-size);
    font-weight: 700;
}

.brand-section {
    color: #5a7183;
    font-size: var(--brand-section-size);
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--topbar-card-gap);
    min-width: 0;
}

.topbar-card {
    width: min(100%, var(--topbar-card-width));
    min-width: 0;
    max-width: var(--topbar-card-width);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid #d0deea;
    background: #f4faff;
}

.topbar-inline-card {
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    text-align: left;
    color: var(--accent-deep);
}

.topbar-inline-card:hover {
    background: #edf6fb;
    border-color: #bfd4e3;
}

.topbar-inline-card[aria-expanded="true"] {
    background: #e7f3fb;
    border-color: #a9c9dc;
}

.topbar-card-caret {
    color: #4f6c80;
    font-size: 0.82rem;
    line-height: 1;
}

.topbar-inline-card .topbar-card-value {
    color: var(--accent-deep);
}

.topbar-card-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.topbar-card-label {
    display: block;
    margin-bottom: 4px;
    color: #5a7183;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.topbar-card-value {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.topbar-user {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    text-align: center;
}

.topbar-user .topbar-card-label {
    margin-bottom: 0;
}

.topbar-user .topbar-card-value {
    width: 100%;
    min-width: 0;
}

.topbar-user-card {
    width: min(100%, var(--topbar-user-card-width));
    max-width: var(--topbar-user-card-width);
    gap: 10px;
}

.topbar-logo-slot {
    position: absolute;
    left: var(--topbar-padding-x);
    top: 4px;
    bottom: 4px;
    width: var(--topbar-logo-width);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.topbar-logo-slot img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.topbar-logo-fallback {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(31, 111, 159, 0.15) 0%, rgba(75, 147, 187, 0.24) 100%);
    color: var(--accent-deep);
    font-weight: 800;
    letter-spacing: 0.06em;
}

.topbar-inline-card.account-switcher-card {
    position: relative;
    justify-content: space-between;
    padding-right: 12px;
}

.topbar-inline-card.account-switcher-card .topbar-card-copy {
    width: auto;
    flex: 1 1 auto;
    text-align: left;
}

.switcher-current {
    text-align: left;
}

.user-menu {
    position: relative;
}

.user-menu-panel {
    right: 0;
    left: auto;
    min-width: 180px;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 14px;
    white-space: nowrap;
}

.topnav a {
    padding: 10px 12px;
    border-radius: 12px;
    font-weight: 700;
}

.topnav a:hover {
    background: #edf6fb;
}

.topbar-quick {
    min-width: 0;
    overflow: visible;
}

.topbar.topbar-auth .topbar-quick {
    transform: translateY(3px);
}

.topbar-quick-inner {
    width: calc(100% - var(--sidebar-width) - var(--app-body-scrollbar-width));
    margin-left: var(--sidebar-width);
    padding: 0 var(--shell-padding-x);
}

.topbar-quick-track {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    width: min(100%, var(--content-max-width));
    min-width: 0;
    margin: 0 auto;
}

.topbar-quick-hint {
    min-width: 0;
}

.topbar-quick-hint .topbar-quick-button {
    width: 100%;
}

.topbar-quick-button {
    min-height: 31px;
    padding: 0 10px;
    border-radius: 12px;
    border: 1px solid #5f98b9;
    background: linear-gradient(135deg, var(--accent) 0%, #3f86af 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-quick-button--with-icon {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    text-align: left;
}

.topbar-quick-button--with-icon span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-quick-button--has-unseen {
    position: relative;
    animation: topbarQuickPulse 1.4s ease-in-out infinite;
}

.topbar-quick-button--has-unseen::after {
    content: "";
    position: absolute;
    top: 4px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d61f1f;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.86);
}

.topbar-quick-icon {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
}

.topbar-quick-button:disabled {
    opacity: 0.92;
    cursor: default;
}

.topbar-quick-hint .topbar-quick-button:disabled {
    pointer-events: none;
}

.qa-label-md {
    display: none;
}

.topbar-quick-mobile {
    display: none;
}

.topbar-quick-mobile-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.topbar-quick-mobile-toggle {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #5f98b9;
    background: linear-gradient(135deg, var(--accent) 0%, #3f86af 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
}

.topbar-quick-mobile-toggle--has-unseen {
    animation: topbarQuickPulse 1.4s ease-in-out infinite;
}

.topbar-quick-mobile-toggle--has-unseen::after {
    content: "";
    position: absolute;
    top: 6px;
    right: 9px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d61f1f;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.86);
}

.topbar-quick-mobile-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.topbar-quick-mobile-copy strong {
    font-size: 0.9rem;
    line-height: 1.1;
    color: #ffffff;
}

.topbar-quick-mobile-copy span {
    font-size: 0.74rem;
    line-height: 1.15;
    color: rgba(255, 255, 255, 0.92);
}

.topbar-quick-mobile-caret {
    font-size: 0.95rem;
    line-height: 1;
    transition: transform 0.18s ease;
}

.topbar-quick-mobile-toggle[aria-expanded="true"] .topbar-quick-mobile-caret {
    transform: rotate(180deg);
}

.topbar-quick-mobile-notify {
    position: relative;
    min-width: 132px;
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid #5f98b9;
    background: linear-gradient(135deg, var(--accent) 0%, #3f86af 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-weight: 700;
    font-size: 0.78rem;
    white-space: nowrap;
}

.topbar-quick-mobile-notify:hover {
    background: linear-gradient(135deg, #2a7fad 0%, #4a8fb7 100%);
    border-color: #74a3c0;
}

.topbar-quick-mobile-notify .topbar-quick-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.topbar-quick-mobile-notify--has-unseen {
    animation: topbarQuickPulse 1.4s ease-in-out infinite;
}

.topbar-quick-mobile-notify--has-unseen::after {
    content: "";
    position: absolute;
    top: 6px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d61f1f;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.86);
}

.topbar-quick-mobile-badges {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.qa-mobile-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid #bcd5e4;
    background: #eef6fc;
    color: #245c82;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.qa-mobile-badge--danger {
    border-color: #e49ca2;
    background: #fbe7ea;
    color: #a71c2a;
}

.qa-mobile-badge--warn {
    border-color: #e6bb7f;
    background: #fff4e3;
    color: #8f5a0d;
}

.qa-mobile-badge--attention {
    border-color: #b8cde0;
    background: #e8f1f8;
    color: #1f5f95;
}

.qa-mobile-badge--info {
    border-color: #bcd5e4;
    background: #eef6fc;
    color: #245c82;
}

.topbar-quick-sheet[hidden] {
    display: none;
}

.topbar-quick-sheet {
    position: fixed;
    inset: 0;
    z-index: 1200;
}

.topbar-quick-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(13, 28, 41, 0.45);
    touch-action: none;
}

.topbar-quick-sheet-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: min(72vh, 560px);
    border-radius: 18px 18px 0 0;
    border: 1px solid #c7dae8;
    border-bottom: 0;
    background: #ffffff;
    box-shadow: 0 -16px 36px rgba(16, 36, 53, 0.2);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.topbar-quick-sheet-head {
    padding: 12px 14px 10px;
    border-bottom: 1px solid #d6e3ed;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.topbar-quick-sheet-head strong {
    color: #163f5d;
    font-size: 0.95rem;
}

.topbar-quick-sheet-head p {
    margin: 4px 0 0;
    color: #557189;
    font-size: 0.78rem;
}

.topbar-quick-sheet-close {
    min-height: 34px;
    min-width: 34px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid #c7dae8;
    background: #f2f8fd;
    color: #245c82;
    font-size: 0.96rem;
}

.topbar-quick-sheet-list {
    overflow: auto;
    overscroll-behavior: contain;
    padding: 10px 12px 14px;
    display: grid;
    gap: 8px;
}

.topbar-quick-sheet-item {
    width: 100%;
    min-height: 58px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #5f98b9;
    background: linear-gradient(135deg, var(--accent) 0%, #3f86af 100%);
    color: #ffffff;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    text-align: left;
}

.topbar-quick-sheet-item .topbar-quick-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
}

.topbar-quick-sheet-item:hover {
    background: linear-gradient(135deg, #2a7fad 0%, #4a8fb7 100%);
    border-color: #74a3c0;
}

.topbar-quick-sheet-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.topbar-quick-sheet-copy strong {
    color: #ffffff;
    font-size: 0.86rem;
}

.topbar-quick-sheet-copy span {
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.76rem;
    line-height: 1.25;
}

.topbar-quick-sheet-badge {
    min-width: 22px;
    min-height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.48);
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.topbar-quick-sheet-badge.is-danger {
    border-color: #e49ca2;
    background: #fbe7ea;
    color: #a71c2a;
}

.topbar-quick-sheet-item--unseen {
    animation: topbarQuickPulse 1.4s ease-in-out infinite;
}

.topbar-quick-sheet-item--disabled {
    opacity: 0.92;
    cursor: default;
}

.topbar-quick-sheet-item--disabled:hover {
    background: linear-gradient(135deg, var(--accent) 0%, #3f86af 100%);
    border-color: #5f98b9;
}

.quick-sheet-open .app-body {
    overflow: hidden;
}

@media (max-width: 1120px) {
    .topbar.topbar-auth .topbar-quick {
        transform: none;
    }
}

.app-body {
    height: calc(100vh - var(--header-height));
    height: calc(100dvh - var(--header-height));
    margin-top: var(--header-height);
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
}

.app-sidebar {
    position: sticky;
    top: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 20px;
    padding: var(--sidebar-padding-y) var(--sidebar-padding-x);
    border-right: 1px solid var(--line);
    background: rgba(242, 248, 252, 0.92);
    overflow: auto;
}

.sidebar-nav {
    display: grid;
    gap: 10px;
}

.sidebar-auth-entry {
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.sidebar-nav-public {
    flex: 0 0 auto;
    align-content: start;
}

.sidebar-subnav {
    display: grid;
    gap: 8px;
    margin-top: -2px;
    padding-left: 16px;
}

.sidebar-separator {
    height: 0;
    margin: 8px 0 2px;
    border-top: 2px solid #c7d9e5;
}

.sidebar-copyright {
    margin: 0;
    color: #6f8392;
    font-size: 0.72rem;
    line-height: 1.35;
    letter-spacing: 0.01em;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: var(--sidebar-link-min-height);
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid transparent;
    white-space: nowrap;
    overflow: hidden;
    font-weight: 600;
    font-size: var(--sidebar-link-font-size);
}

.sidebar-link:hover {
    background: #edf6fb;
    border-color: #d4e3ee;
}

.sidebar-link.is-active {
    background: linear-gradient(135deg, var(--accent) 0%, #3f86af 100%);
    border-color: var(--accent);
    color: #fff;
}

.sidebar-link-mode {
    cursor: default;
    background: rgba(31, 111, 159, 0.12);
    border-color: rgba(31, 111, 159, 0.18);
    color: var(--accent-deep);
}

.sidebar-link-mode:hover {
    background: rgba(31, 111, 159, 0.12);
    border-color: rgba(31, 111, 159, 0.18);
}

.sidebar-link-mode.is-active {
    background: linear-gradient(135deg, rgba(31, 111, 159, 0.18) 0%, rgba(75, 147, 187, 0.26) 100%);
    border-color: rgba(31, 111, 159, 0.2);
    color: var(--accent-deep);
}

.sidebar-sublink {
    min-height: var(--sidebar-sublink-min-height);
    padding-left: 18px;
    font-size: var(--sidebar-sublink-font-size);
    color: #36556c;
}

.sidebar-icon {
    display: none;
    width: 22px;
    flex: 0 0 22px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-sublink .sidebar-label {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.15;
}

.content-shell {
    min-height: 100%;
    overflow: visible;
    padding: 0 var(--shell-padding-x) var(--shell-padding-bottom);
    display: flex;
    flex-direction: column;
}

.content-shell > * {
    width: min(100%, var(--content-max-width));
    min-width: 0;
    margin: 0 auto;
}

.content-scroll {
    overflow: visible;
    min-height: 0;
    flex: 1 1 auto;
}

.content-x-scroll {
    width: 100%;
    overflow: visible;
}

.offline-mode-banner {
    width: min(100%, var(--content-max-width));
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid #b98924;
    border-radius: 8px;
    background: #fff7df;
    color: #5e420a;
    font-size: 14px;
    line-height: 1.35;
}

.offline-mode-banner strong {
    flex: 0 0 auto;
    font-weight: 700;
}

.offline-mode-banner span {
    min-width: 0;
}

.account-switcher {
    position: relative;
    width: min(100%, var(--topbar-card-width));
    min-width: 0;
}

.account-switcher--contextual {
    width: min(100%, calc(var(--topbar-card-width) * 2 + var(--topbar-card-gap) + 15px));
    max-width: calc(var(--topbar-card-width) * 2 + var(--topbar-card-gap) + 15px);
}

.account-switcher--contextual .account-switcher-card {
    width: min(100%, calc(var(--topbar-card-width) + 15px));
    max-width: calc(var(--topbar-card-width) + 15px);
}

.topbar-context-card {
    cursor: default;
}

.account-switcher-card {
    position: relative;
    justify-content: center;
    padding-right: 58px;
}

.account-switcher-card .topbar-card-copy {
    width: 100%;
    flex: 1 1 100%;
    text-align: center;
}

.switcher-current {
    text-align: center;
}

.switcher-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: max-content;
    min-width: 240px;
    max-width: min(320px, calc(100vw - 32px));
    padding: 8px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 18px 40px rgba(19, 42, 27, 0.08);
    z-index: 140;
}

.account-switcher .switcher-menu {
    left: 0;
    right: auto;
}

.account-switcher.is-open .switcher-menu {
    display: block;
}

.switcher-menu.switcher-menu--accounts {
    min-width: min(380px, calc(100vw - 32px));
    width: min(520px, calc(100vw - 32px));
    max-width: min(520px, calc(100vw - 32px));
}

.switcher-account-table {
    display: grid;
    gap: 6px;
}

.switcher-account-table-head,
.switcher-account-table-row {
    display: grid;
    grid-template-columns: minmax(134px, 1.4fr) repeat(var(--ctx-cols, 1), minmax(0, 1fr));
    gap: 6px;
    align-items: stretch;
}

.switcher-account-table--compact .switcher-account-table-head,
.switcher-account-table--compact .switcher-account-table-row {
    grid-template-columns: minmax(134px, 1.4fr) minmax(120px, 1fr);
}

.switcher-account-head-cell {
    min-height: 22px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #688298;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.switcher-account-head-cell--account {
    justify-content: flex-start;
    padding-left: 12px;
}

.switcher-menu a {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
}

.switcher-menu a:hover {
    background: #f3f9fd;
}

.switcher-menu span {
    color: #5a7183;
    font-size: 0.88rem;
}

.switcher-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid #d0deea;
    background: #fff;
    color: var(--accent-deep);
}

.switcher-toggle:hover {
    background: #edf6fb;
}

.switcher-toggle-icon {
    font-size: 0.9rem;
    line-height: 1;
}

.switcher-menu-action {
    margin-top: 8px;
    justify-content: center !important;
    border: 1px solid #d0deea;
    background: #f4faff;
    font-weight: 700;
}

.switcher-account-row {
    padding: 8px;
    border-radius: 12px;
}

.switcher-account-row.is-active {
    background: #f3f9fd;
}

.switcher-account-row + .switcher-account-row {
    margin-top: 2px;
}

.switcher-menu--accounts .switcher-account-main {
    margin: 0;
}

.switcher-account-main--table {
    min-height: 32px;
    height: 100%;
    padding-left: 16px !important;
}

.switcher-account-main--table strong {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.switcher-account-flag {
    display: inline-flex;
    width: 2em;
    justify-content: flex-start;
    color: #102435;
}

.switcher-account-table-row--compact {
    align-items: center;
}

.switcher-account-table-row.is-active .switcher-account-main--table {
    border: 1px solid #bfd4e3;
    background: #f3f9fd;
}

.switcher-account-contexts {
    display: grid;
    gap: 6px;
    margin-top: 6px;
}

.switcher-menu--accounts .switcher-context-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    height: 100%;
    padding: 0 8px;
    border-radius: 9px;
    border: 1px solid #d0deea;
    background: #f4faff;
    color: #36556c;
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
}

.switcher-menu--accounts .switcher-context-pill:hover {
    background: #e9f4fb;
    border-color: #bdd2e1;
}

.switcher-menu--accounts .switcher-context-pill.is-selected {
    border-color: #5f98b9;
    background: #dceef9;
    color: #143f5b;
}

.switcher-menu--accounts .switcher-context-pill--empty {
    background: transparent;
    border-style: dashed;
    border-color: #dbe7f1;
}

.switcher-row-context-picker {
    position: relative;
    min-width: 0;
}

.switcher-row-context-toggle {
    width: 100%;
    min-height: 32px;
    padding: 0 10px;
    border-radius: 9px;
    border: 1px solid #d0deea;
    background: #f4faff;
    color: #36556c;
    font-size: 0.82rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.switcher-row-context-toggle:hover {
    background: #e9f4fb;
    border-color: #bdd2e1;
}

.switcher-row-context-picker.is-open .switcher-row-context-toggle {
    border-color: #5f98b9;
    background: #dceef9;
    color: #143f5b;
}

.switcher-row-context-caret {
    font-size: 0.78rem;
    line-height: 1;
}

.switcher-row-context-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 120px;
    max-width: 220px;
    padding: 6px;
    border-radius: 10px;
    border: 1px solid #d0deea;
    background: #fff;
    box-shadow: 0 12px 24px rgba(19, 42, 27, 0.12);
    z-index: 20;
}

.switcher-row-context-menu a {
    display: block;
    padding: 7px 8px;
    border-radius: 7px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #36556c;
}

.switcher-row-context-menu a:hover {
    background: #f3f9fd;
}

.switcher-row-context-menu a.is-selected {
    background: #dceef9;
    color: #143f5b;
}

.switcher-account-no-services {
    margin-top: 6px;
    padding: 4px 2px;
    color: #688298;
    font-size: 0.8rem;
}

.switcher-account-no-services--cell {
    margin: 0;
    padding: 0 8px;
    min-height: 32px;
    border-radius: 9px;
    border: 1px dashed #dbe7f1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.muted {
    color: #5a7183;
}

.grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
}

.single-column {
    max-width: 720px;
}

.single-column.wide {
    max-width: 980px;
}

.single-table {
    max-width: 100%;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: var(--panel-padding);
    box-shadow: 0 18px 40px rgba(19, 42, 27, 0.06);
    overflow-x: auto;
    overflow-y: visible;
}

.panel--table {
    overflow: visible;
}

.panel-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.panel-title-row .eyebrow {
    flex: 1 1 auto;
}

.panel :where(h1, h2, h3, h4, p, li, a, span, strong, div, td, th) {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.panel .nowrap {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

.panel.accent {
    background: linear-gradient(135deg, var(--accent-deep) 0%, var(--accent) 100%);
    color: #fff;
}

.panel-accent {
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 44px rgba(16, 36, 53, 0.14);
}

.panel-accent::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.16), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 42%);
    pointer-events: none;
}

.panel-accent > * {
    position: relative;
    z-index: 1;
}

.panel-accent .eyebrow {
    color: rgba(248, 252, 255, 0.92);
    margin-bottom: 14px;
}

.panel-accent .dashboard-offline-snapshot-heading {
    margin-top: -4px;
    margin-bottom: 16px;
    color: rgba(248, 252, 255, 0.86);
    line-height: 1.45;
}

.panel-accent h2 {
    margin-bottom: 18px;
    font-size: clamp(1.6rem, 2.1vw, 2.45rem);
    line-height: 1.1;
}

.panel-accent-facts {
    display: grid;
    gap: 12px;
    max-width: 64ch;
}

.panel-home-intro .panel-accent-facts {
    max-width: none;
}

.panel-accent-facts p {
    margin: 0;
    color: rgba(244, 250, 255, 0.96);
    line-height: 1.55;
}

.panel-accent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.panel-accent-actions a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 700;
}

.panel-accent-actions a:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.34);
}

.panel-account-overview h2 {
    margin-bottom: 20px;
}

.panel-accent-toolbar {
    display: grid;
    gap: 0;
    margin-bottom: 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.panel-accent-toolbar-head {
    display: flex;
    align-items: center;
    min-height: 22px;
    padding: 0 10px;
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.panel-accent-toolbar-title {
    color: rgba(228, 241, 250, 0.86);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.panel-accent-toolbar-actions {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
}

.panel-accent-toolbar-button {
    min-height: 30px;
    width: 100%;
    padding: 0 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(248, 252, 255, 0.96);
    font-weight: 700;
    font-size: 0.82rem;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.panel-accent-toolbar-button:disabled {
    opacity: 0.92;
    cursor: default;
}

.panel-account-overview {
    --account-label-width: 168px;
}

.panel-account-overview .panel-accent-toolbar {
    margin-bottom: 18px;
}

.panel-accent-meta,
.panel-accent-details {
    display: grid;
    grid-template-columns: var(--account-label-width) minmax(0, 1fr);
    column-gap: 18px;
    row-gap: 12px;
    align-items: start;
}

.panel-accent-meta {
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr);
}

.panel-accent-details {
    max-width: 520px;
}

.panel-accent-section {
    display: grid;
    gap: 16px;
}

.panel-account-overview .detail-label {
    color: rgba(228, 241, 250, 0.82);
    font-weight: 700;
}

.panel-account-overview .meta-value,
.panel-account-overview .detail-value {
    color: rgba(250, 252, 255, 0.98);
    min-width: 0;
}

.panel-account-overview .meta-value {
    font-weight: 500;
}

.panel-accent-middle {
    display: grid;
    grid-template-columns: minmax(280px, 460px) minmax(320px, 1fr);
    gap: 24px;
    align-items: start;
}

.panel-accent-middle-main,
.panel-accent-middle-side {
    min-width: 0;
}

.panel-accent-middle-side {
    display: grid;
    gap: 16px;
}

.panel-accent-info-block {
    display: grid;
    gap: 10px;
}

.panel-accent-info-title {
    color: rgba(238, 247, 252, 0.92);
    font-weight: 700;
}

.panel-accent-info-list {
    margin: 0;
    padding-left: 18px;
    color: rgba(250, 252, 255, 0.96);
    display: grid;
    gap: 6px;
}

.panel-accent-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.panel-accent-data-table {
    width: 100%;
    color: rgba(250, 252, 255, 0.96);
    min-width: 100%;
    font-size: inherit;
}

.panel-accent-data-table th,
.panel-accent-data-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    border-left-color: rgba(255, 255, 255, 0.12);
}

.panel-accent-data-table th {
    color: rgba(241, 248, 255, 0.94);
    background: rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.panel-accent-data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.panel-accent-data-table.data-table--no-hover tbody tr:hover {
    background: transparent;
}

.panel-accent-data-table tbody tr:last-child td {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.panel-accent-verify-table {
    display: grid;
    gap: 8px;
    padding-left: 18px;
}

.panel-accent-verify-row {
    display: grid;
    grid-template-columns: minmax(110px, 132px) minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.panel-accent-verify-row:last-child {
    border-bottom: 0;
}

.panel-accent-verify-serial {
    color: rgba(250, 252, 255, 0.98);
    font-weight: 700;
}

.panel-accent-verify-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: rgba(239, 247, 252, 0.92);
}

.panel-accent-verify-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    flex: 0 0 22px;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    color: #fff;
}

.panel-accent-verify-row.is-warning .panel-accent-verify-icon {
    background: #f0ae00;
}

.panel-accent-verify-row.is-danger .panel-accent-verify-icon {
    background: #b23658;
}

.panel-accent-verify-row.is-danger .panel-accent-verify-status {
    color: #ffd9e3;
}

@media (max-width: 980px) {
    .panel-accent-toolbar-actions {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        padding: 8px;
    }

    .panel-accent-toolbar-button {
        min-height: 28px;
        padding: 0 8px;
        font-size: 0.78rem;
    }

    .panel-accent-middle {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }
}

.panel-accent-meter-prompt {
    display: flex;
    justify-content: center;
    gap: 10px;
    align-items: center;
    padding: 4px 0;
    border: 0;
    background: transparent;
}

.panel-accent-meter-prompt.is-success {
    background: transparent;
}

.panel-accent-meter-prompt.is-warning {
    background: transparent;
}

.panel-accent-meter-prompt-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    color: #fff;
}

.panel-accent-meter-prompt.is-success .panel-accent-meter-prompt-icon {
    background: #2e8b6c;
}

.panel-accent-meter-prompt.is-warning .panel-accent-meter-prompt-icon {
    background: #f0ae00;
}

.panel-accent-meter-prompt-text {
    color: rgba(250, 252, 255, 0.98);
    font-weight: 700;
    text-align: center;
}

.panel-accent-meter-prompt-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
}

.panel-accent-meter-prompt-action:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.32);
}

.panel-accent-divider {
    height: 1px;
    margin: 18px 0;
    background: rgba(255, 255, 255, 0.16);
}

.panel-accent-status {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
}

.panel-accent-status .status-label {
    color: rgba(233, 244, 252, 0.9);
    font-weight: 700;
}

.panel-accent-status .status-value {
    color: #fff;
    font-size: 1.15rem;
    line-height: 1;
}

.panel-accent-status-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}

.panel-accent-status .panel-accent-status-pay {
    min-height: 32px;
    padding: 0 10px;
    border-radius: 10px;
    white-space: nowrap;
    color: #1d5b82;
    background: #eef6fc;
    border-color: #c7dcec;
}

.panel-accent-status .panel-accent-status-pay:hover {
    color: #164866;
    background: #e2eff9;
    border-color: #b9d2e6;
}

.panel-accent-status.is-debt {
    background: rgba(255, 255, 255, 0.1);
}

.panel-accent-status.is-credit {
    background: rgba(220, 244, 255, 0.14);
}

.panel-accent-status.is-neutral {
    background: rgba(255, 255, 255, 0.07);
}

.panel-accent-note {
    margin-top: 14px;
    color: rgba(228, 241, 250, 0.72);
    font-size: 0.78rem;
    line-height: 1.45;
    text-align: right;
}

@media (max-width: 640px) {
    .panel-accent-status {
        align-items: flex-start;
    }

    .panel-accent-status-actions {
        flex-direction: column;
        align-items: flex-end;
    }
}

.precalc-total-status {
    margin-top: 10px;
    border-color: #d2e2ee;
    background: #f0f6fb;
}

.precalc-total-status .status-label {
    color: #2f5d7c;
}

.precalc-total-status .status-value {
    color: #0f3856;
}

.precalc-total-main {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.precalc-total-pay {
    margin-left: auto;
}

.precalc-total-note {
    color: var(--accent-deep);
}

.ai-assistant-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-assistant-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ai-assistant-ask-open[disabled] {
    opacity: 0.5;
    pointer-events: none;
}

.ai-assistant-ask-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8fbfe;
}

.ai-assistant-ask-form[hidden] {
    display: none;
}

.ai-assistant-ask-form textarea {
    width: 100%;
    min-height: 92px;
    resize: vertical;
}

.ai-assistant-ask-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.ai-assistant-formalizer-open {
    white-space: normal;
    text-align: left;
    color: #2f80ad !important;
    background: #eef7fd !important;
    border-color: #bcd9eb !important;
}

.ai-assistant-formalizer-open:hover {
    background: #e3f1fa !important;
}

.ai-formalizer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.ai-formalizer[hidden] {
    display: none;
}

.ai-formalizer-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.ai-formalizer-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ai-formalizer-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.ai-formalizer-crumb {
    border: 0;
    background: none;
    color: var(--accent);
    font-weight: 600;
    padding: 0;
    cursor: pointer;
}

.ai-formalizer-crumb:hover {
    text-decoration: underline;
}

.ai-formalizer-sep {
    color: #6d879b;
}

.ai-formalizer-reset {
    color: #2f80ad !important;
    background: #eef7fd !important;
    border-color: #bcd9eb !important;
}

.ai-formalizer-reset:hover {
    background: #e3f1fa !important;
}

.ai-formalizer-reset[disabled] {
    opacity: 0.5;
    pointer-events: none;
}

.ai-formalizer-list {
    display: grid;
    gap: 8px;
}

.ai-formalizer-option {
    width: 100%;
    text-align: left;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #f8fbfe;
    color: var(--ink);
    padding: 10px 12px;
}

.ai-formalizer-option.is-active {
    border-color: #2f80ad;
    background: #eef7fd;
}

.ai-formalizer-params {
    display: grid;
    gap: 8px;
}

.ai-formalizer-param {
    display: grid;
    gap: 6px;
}

.ai-formalizer-period-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ai-formalizer-period-row input,
.ai-formalizer-param select {
    min-height: 40px;
}

.ai-formalizer-preview-wrap {
    display: grid;
    gap: 6px;
}

.ai-formalizer-preview-wrap textarea {
    width: 100%;
    min-height: 72px;
    resize: vertical;
    background: #f4f8fb;
}

.ai-formalizer-actions {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-secondary {
    border: 1px solid #bfd3e3;
    background: #f4f8fb;
    color: #32556d;
}

.btn-secondary:hover {
    background: #eaf3f9;
}

.ai-assistant-ask-actions {
    display: flex;
    justify-content: flex-start;
}

.ai-assistant-ask-actions[hidden] {
    display: none;
}

.ai-assistant-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-assistant-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    background: #fff;
}

.ai-assistant-card-head {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.ai-assistant-card-question {
    font-weight: 700;
    color: var(--accent-deep);
}

.ai-assistant-card-time {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.82rem;
    color: #53758d;
}

.ai-assistant-card-body {
    color: var(--ink);
}

.ai-assistant-card-body .ai-answer-markdown p:first-child {
    margin-top: 0;
}

.ai-assistant-card-body .ai-answer-markdown p:last-child {
    margin-bottom: 0;
}

.ai-assistant-more-wrap {
    padding-top: 4px;
}

.ai-assistant-more[hidden] {
    display: none;
}

.ai-assistant-more {
    color: #2f80ad !important;
    background: #eef7fd !important;
    border-color: #bcd9eb !important;
}

.ai-assistant-more:hover {
    background: #e3f1fa !important;
}

.panel h2,
.panel h3 {
    margin-top: 0;
}

.auth-mode-switch {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: #f7fbfe;
}

.auth-mode-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    color: #3b5970;
    font-weight: 600;
    white-space: nowrap;
}

.auth-mode-link:hover {
    background: #edf6fb;
    border-color: #d4e3ee;
}

.auth-mode-link.is-active {
    background: linear-gradient(135deg, var(--accent) 0%, #3f86af 100%);
    border-color: var(--accent);
    color: #fff;
}

.eyebrow {
    margin-bottom: 10px;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
}

.page-help-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(31, 111, 159, 0.28);
    background: #f4fbff;
    color: var(--accent-deep);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.panel-accent .page-help-button {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.page-help-button:hover,
.page-help-button:focus-visible {
    box-shadow: 0 0 0 3px rgba(31, 111, 159, 0.14);
}

.page-help-layer[hidden] {
    display: none;
}

.page-help-layer {
    --page-help-area-left: 0px;
    --page-help-area-top: 0px;
    --page-help-area-width: 100vw;
    --page-help-area-height: 100vh;
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: grid;
    grid-template-columns:
        minmax(0, var(--page-help-area-left))
        minmax(0, var(--page-help-area-width))
        minmax(0, 1fr);
    place-items: start center;
    padding: calc(var(--page-help-area-top) + 18px) 0 24px;
    overflow: hidden;
}

body.page-help-open,
body.page-help-open .app-body {
    overflow: hidden;
}

.page-help-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 31, 47, 0.36);
}

.page-help-dialog {
    position: relative;
    grid-column: 2;
    display: flex;
    flex-direction: column;
    width: min(760px, calc(var(--page-help-area-width) - 36px));
    max-height: min(760px, calc(var(--page-help-area-height) - 36px));
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid #c9dbe7;
    background: #fff;
    color: var(--text);
    box-shadow: 0 24px 72px rgba(10, 31, 47, 0.28);
    padding: 0;
}

.page-help-close {
    position: sticky;
    top: 18px;
    align-self: flex-end;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 18px 20px -50px 0;
    border-radius: 50%;
    border: 1px solid #d5e3ec;
    background: #f7fbfd;
    color: var(--accent-deep);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.page-help-content {
    min-height: 0;
    overflow: auto;
    padding: 26px 28px;
    scrollbar-gutter: stable;
}

.page-help-content h1 {
    margin: 0 40px 18px 0;
    font-size: 1.45rem;
}

.page-help-content h2 {
    margin: 22px 0 8px;
    font-size: 1.02rem;
}

.page-help-content p,
.page-help-content li {
    line-height: 1.55;
}

.dev-width-mode-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 1px 7px;
    border-radius: 999px;
    border: 1px solid #bfd4e3;
    background: #eef6fb;
    color: #2b5976;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: none;
    vertical-align: middle;
}

.news-item + .news-item {
    border-top: 1px solid var(--line);
    margin-top: 16px;
    padding-top: 16px;
}

.news-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.article-text {
    white-space: pre-line;
    line-height: 1.6;
}

.rich-text {
    line-height: 1.65;
}

.rich-text > :first-child {
    margin-top: 0;
}

.rich-text > :last-child {
    margin-bottom: 0;
}

.rich-text h1,
.rich-text h2,
.rich-text h3 {
    margin: 0 0 14px;
    line-height: 1.2;
}

.rich-text h1 {
    font-size: 1.8rem;
}

.rich-text h2 {
    font-size: 1.45rem;
}

.rich-text h3 {
    font-size: 1.2rem;
}

.rich-text p,
.rich-text ul,
.rich-text ol {
    margin: 0 0 14px;
}

.rich-text ul,
.rich-text ol {
    padding-left: 22px;
}

.rich-text hr {
    margin: 18px 0;
    border: 0;
    border-top: 1px solid var(--line);
}

.rich-text a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.14em;
}

.rich-text .rt-primary {
    color: var(--accent);
}

.rich-text .rt-align-left {
    text-align: left;
}

.rich-text .rt-align-center {
    text-align: center;
}

.rich-text .rt-align-right {
    text-align: right;
}

.rich-text .rt-important {
    color: #b42318;
    font-weight: 700;
}

.rich-text .rt-attention {
    color: #8a5a00;
    font-weight: 700;
}

.rich-text .rt-warning {
    color: #9b2c2c;
    font-weight: 700;
}

.rich-text .rt-success {
    color: #0f6a46;
    font-weight: 700;
}

.rich-editor {
    display: grid;
    gap: 12px;
}

.rich-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    row-gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #f7fbfe;
    align-items: center;
}

.rich-editor-toolbar button,
.rich-editor-toolbar select {
    width: auto;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid #d0deea;
    background: #fff;
}

.rich-editor-toolbar button {
    cursor: pointer;
    font-weight: 600;
    color: var(--accent-deep);
    background: linear-gradient(135deg, #edf6fb 0%, #d9ebf6 100%);
}

.rich-editor-toolbar button:hover {
    border-color: #8eb9d4;
    background: linear-gradient(135deg, #e5f2fa 0%, #cfe5f3 100%);
}

.rich-editor-toolbar select {
    color: var(--ink);
}

.rich-editor-canvas {
    min-height: 320px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    outline: none;
}

.rich-editor-canvas:focus {
    border-color: #8eb9d4;
    box-shadow: 0 0 0 3px rgba(31, 111, 159, 0.12);
}

.rich-editor-note {
    margin: -2px 0 0;
    font-size: 0.92rem;
}

.contact-list,
.plain-list {
    margin: 0;
    padding-left: 18px;
}

.contact-list-compact {
    --contact-compact-label-width: 280px;
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.contact-list-compact li {
    display: grid;
    grid-template-columns: var(--contact-compact-label-width) minmax(0, 1fr);
    column-gap: 12px;
    align-items: start;
}

.contact-list-compact strong {
    color: var(--ink);
    font-weight: 800;
}

.contact-list-compact span {
    min-width: 0;
    color: #334b5c;
    overflow-wrap: normal;
    word-break: normal;
}

@media (max-width: 760px) {
    .contact-list-compact {
        --contact-compact-label-width: 220px;
    }

    .contact-list-compact li {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
    }

    .contact-list-compact span {
        white-space: normal;
    }
}

.contact-cards {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.contact-card {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #f6fbff;
    border: 1px solid #d9e7f0;
}

.profile-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.auth-log-filter-form {
    display: grid;
    gap: 12px;
}

.auth-log-filter-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: stretch;
}

.auth-log-filter-fields {
    display: grid;
    grid-template-columns: minmax(220px, 1.25fr) repeat(6, minmax(110px, 0.8fr));
    gap: 10px 12px;
    align-items: end;
}

.auth-log-filter-group {
    display: grid;
    gap: 6px;
}

.auth-log-filter-group--query {
    min-width: 0;
}

.auth-log-filter-group--query input {
    max-width: 420px;
}

.auth-log-filter-action {
    display: flex;
    align-items: stretch;
}

.auth-log-filter-submit {
    min-width: 142px;
    min-height: 100%;
    align-self: stretch;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    border-radius: 14px;
    font-weight: 700;
    line-height: 1.1;
}

.auth-log-filter-submit-icon {
    font-size: 1rem;
    line-height: 1;
}

.admin-user-logins-results-panel {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 10px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.admin-user-logins-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    align-items: baseline;
}

.admin-user-logins-summary p {
    margin: 0;
}

.admin-user-logins-table-shell {
    height: 100%;
    max-height: none;
    min-height: 260px;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    border: 1px solid rgba(180, 205, 224, 0.65);
    border-radius: 12px;
}

.table-shell--sticky.admin-user-logins-table-shell {
    overflow: auto;
}

.admin-user-logins-table-shell .data-table th {
    top: 0;
}

.admin-user-logins-table {
    border-collapse: separate;
    border-spacing: 0;
}

.admin-user-logins-table.data-table--sticky thead th {
    z-index: 6;
    background: #f7fbfe;
}

body.page-admin-user-logins .app-body {
    overflow: hidden;
}

body.page-admin-user-logins .content-scroll {
    overflow: hidden;
    min-height: 0;
}

body.page-admin-user-logins .content-shell {
    height: 100%;
    min-height: 0;
}

.admin-user-logins-layout {
    height: calc(100vh - var(--header-height) - 14px);
    height: calc(100dvh - var(--header-height) - 14px);
    min-height: 0;
    grid-template-rows: auto auto minmax(0, 1fr);
}

@media (max-width: 1160px) {
    .auth-log-filter-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .auth-log-filter-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .auth-log-filter-group--query {
        grid-column: 1 / -1;
    }

    .auth-log-filter-group--query input {
        max-width: none;
    }

    .auth-log-filter-action {
        justify-content: flex-end;
    }

    .auth-log-filter-submit {
        min-width: 220px;
        min-height: 46px;
        flex-direction: row;
    }
}

@media (max-width: 760px) {
    .auth-log-filter-fields {
        grid-template-columns: minmax(0, 1fr);
    }

    .auth-log-filter-action {
        justify-content: stretch;
    }

    .auth-log-filter-submit {
        width: 100%;
        min-width: 0;
    }

    .admin-user-logins-table-shell {
        min-height: 220px;
    }
}

.auth-log-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.88rem;
    white-space: nowrap;
}

.auth-log-status--success {
    color: #0c5a32;
    background: rgba(102, 187, 106, 0.18);
}

.auth-log-status--error {
    color: #8d233d;
    background: rgba(231, 76, 60, 0.16);
}

.auth-log-status--pending {
    color: #6f5400;
    background: rgba(255, 208, 90, 0.22);
}

.auth-log-status--blocked {
    color: #6d2f9d;
    background: rgba(163, 111, 214, 0.22);
}

.profile-meta {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    column-gap: 16px;
    row-gap: 10px;
    align-items: start;
}

.profile-meta-label {
    font-weight: 700;
    color: var(--text);
}

.profile-meta-value {
    min-width: 0;
    color: var(--text);
}

.admin-controls {
    display: grid;
    gap: 10px;
}

.admin-quick-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.admin-control-section {
    border: 1px solid #d4e2ed;
    border-radius: 12px;
    background: #f7fbff;
    overflow: hidden;
}

.admin-control-section summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    padding: 11px 12px;
    font-weight: 700;
    font-size: calc(1rem + 4px);
    line-height: 1.2;
    color: #2c6188;
    background: #eaf3fa;
}

.admin-control-section summary::before {
    content: "▼";
    display: inline-block;
    width: 1rem;
    font-size: 0.82em;
    line-height: 1;
    color: #2c6188;
    transform: translateY(1px);
}

.admin-control-section:not([open]) summary::before {
    content: "▶";
}

.admin-control-section summary::-webkit-details-marker {
    display: none;
}

.admin-control-summary-title {
    display: inline-block;
    min-width: 0;
}

.admin-control-summary-note {
    display: inline-block;
    font-size: 0.86rem;
    font-weight: 500;
    line-height: 1.25;
    color: #5a7388;
    text-align: left;
    max-width: 100%;
}

.admin-control-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
}

.admin-control-button {
    display: grid;
    align-content: center;
    gap: 2px;
    min-height: 54px;
    width: 100%;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(49, 121, 177, 0.16);
    background: linear-gradient(135deg, rgba(49, 121, 177, 0.08) 0%, rgba(25, 102, 155, 0.14) 100%);
    color: #154f78;
    text-align: left;
    text-decoration: none;
}

.admin-control-button:hover {
    background: linear-gradient(135deg, rgba(49, 121, 177, 0.14) 0%, rgba(25, 102, 155, 0.2) 100%);
}

.admin-control-button--quick {
    min-height: 40px;
    text-align: center;
    justify-items: center;
    font-weight: 700;
    font-size: 1rem;
}

.admin-control-title {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
}

.admin-control-note {
    color: #3f6f93;
    font-size: 12px;
    line-height: 1.2;
}

.admin-status-meta {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    column-gap: 16px;
    row-gap: 10px;
    align-items: start;
}

.admin-status-label {
    font-weight: 700;
    color: var(--text);
}

.admin-status-value {
    color: var(--text);
}

.admin-dashboard-grid {
    gap: 16px;
}

.admin-dashboard-view-tabs {
    margin: 0;
    padding: 8px;
}

.admin-metrics-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.admin-metrics-period-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-metrics-range {
    color: #5a7388;
    font-weight: 600;
    font-size: 0.9rem;
}

.admin-metrics-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.admin-metrics-kpi-grid--secondary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-metrics-paired-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
}

.admin-metrics-pair-row {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) minmax(0, 2fr);
    gap: 10px;
    align-items: stretch;
}

.admin-metrics-pair-row--combo {
    grid-template-columns: minmax(0, 1fr);
}

.admin-metric-combo-card {
    border: 1px solid #d4e2ed;
    border-radius: 12px;
    background: #f7fbff;
    padding: 10px;
    display: grid;
    gap: 8px;
}

.admin-metric-combo-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.admin-metric-combo-head-text {
    display: grid;
    gap: 4px;
}

.admin-metric-combo-body {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
}

.admin-metric-kpi-card--mini,
.admin-metric-chart-card--mini {
    height: 100%;
    margin: 0;
}

.admin-metric-chart-card--mini {
    align-content: stretch;
    grid-template-rows: minmax(0, 1fr);
}

.admin-metric-chart-card--mini .admin-metric-bars {
    height: 100%;
    min-height: 146px;
}

.admin-metric-kpi-card--mini {
    width: 180px;
    max-width: 180px;
    justify-self: start;
}

.admin-metric-kpi-pair--values-only .admin-metric-kpi-pair-item {
    align-content: center;
    min-height: 64px;
}

.admin-metric-kpi-pair--values-only .admin-metric-kpi-value {
    margin: 0;
}

.admin-metric-kpi-pair.admin-metric-kpi-pair--values-only {
    grid-template-columns: 1fr;
}

.admin-metric-kpi-note--inline {
    margin-left: 8px;
    font-weight: 500;
    color: #6a8192;
}

.admin-metric-kpi-card {
    border: 1px solid #d4e2ed;
    border-radius: 12px;
    background: #f7fbff;
    padding: 10px;
    display: grid;
    gap: 6px;
}

.admin-metric-kpi-card--paired,
.admin-metric-chart-card--paired {
    height: 100%;
}

.admin-metric-kpi-title {
    color: #355c7f;
    font-size: 0.84rem;
    font-weight: 700;
}

.admin-metric-kpi-value {
    color: #123a5a;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.1;
}

.admin-metric-kpi-note {
    color: #5a7388;
    font-size: 0.84rem;
}

.admin-metric-kpi-inline {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-metric-kpi-inline .admin-metric-kpi-value,
.admin-metric-kpi-inline .admin-metric-kpi-note {
    margin: 0;
}

.admin-metric-kpi-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.admin-metric-kpi-pair-item {
    display: grid;
    gap: 4px;
    padding: 8px;
    border: 1px solid #dbe7f1;
    border-radius: 10px;
    background: #edf5fc;
}

.admin-metric-kpi-triple {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.admin-metric-kpi-triple-item {
    display: grid;
    gap: 4px;
    padding: 8px;
    border: 1px solid #dbe7f1;
    border-radius: 10px;
    background: #edf5fc;
}

.admin-metric-kpi-triple.admin-metric-kpi-triple--values-only {
    grid-template-columns: 1fr;
}

.admin-metric-kpi-triple--values-only .admin-metric-kpi-triple-item {
    align-content: center;
    min-height: 56px;
}

.admin-metrics-charts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.admin-metric-chart-card {
    border: 1px solid #d4e2ed;
    border-radius: 12px;
    background: #f7fbff;
    padding: 10px;
    display: grid;
    gap: 8px;
    align-content: start;
}

.admin-metric-chart-card--wide {
    grid-column: 1 / -1;
}

.admin-metric-chart-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.admin-metric-chart-head h3 {
    margin: 0;
    font-size: 1rem;
    color: #123a5a;
}

.admin-metric-bars {
    display: grid;
    grid-template-columns: repeat(var(--metric-points, 30), minmax(0, 1fr));
    gap: clamp(1px, 0.25vw, 3px);
    align-items: end;
    height: 146px;
    padding: 8px 8px 6px;
    border-radius: 10px;
    border: 1px solid #dbe8f2;
    background: #eef5fb;
}

.admin-metric-bars--compact {
    height: 90px;
    grid-template-columns: repeat(auto-fit, minmax(5px, 1fr));
    gap: 2px;
}

.admin-metric-bar-col {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: stretch;
    height: 100%;
    min-height: 100%;
}

.admin-metric-bar-track {
    height: 100%;
    display: flex;
    align-items: end;
}

.admin-metric-bar {
    width: 100%;
    min-height: 0;
    border-radius: 3px 3px 0 0;
    background: #2f80ad;
    position: relative;
    overflow: visible;
}

.admin-metric-day {
    display: block;
    margin-top: 4px;
    text-align: center;
    font-size: 0.64rem;
    line-height: 1.1;
    color: #6f8698;
    white-space: nowrap;
}

.admin-metric-day.is-month-boundary {
    font-weight: 700;
    color: #2c5878;
}

.admin-metric-day.is-hidden {
    visibility: hidden;
}

.admin-metric-day.is-hidden-auto {
    visibility: hidden;
}

.admin-metric-bar-value {
    position: absolute;
    left: 50%;
    top: -13px;
    transform: translateX(-50%);
    font-size: 0.62rem;
    line-height: 1;
    color: #4a6780;
    white-space: nowrap;
    pointer-events: none;
}

.admin-metric-bar-value.is-hidden-auto {
    display: none;
}

.admin-metric-bar--meters {
    background: #0b6aa8;
}

.admin-metric-bar--ai {
    background: #4d6ea8;
}

.admin-metric-bar--email {
    background: #4f9cbf;
}

.admin-metric-bar--telegram {
    background: #2d89c8;
}

.admin-metric-bar--push {
    background: #6f8ec7;
}

.admin-metric-channel-grid {
    display: grid;
    gap: 8px;
}

.admin-metric-channel-item {
    border: 1px solid #dbe8f2;
    border-radius: 10px;
    padding: 8px;
    background: #fbfdff;
}

.admin-metric-channel-title {
    font-weight: 700;
    color: #123a5a;
    margin-bottom: 2px;
}

.admin-metric-channel-kpi {
    color: #5a7388;
    font-size: 0.82rem;
    margin-bottom: 6px;
}

.panel-actions {
    margin-top: 10px;
}

body.page-admin-dashboard .content-shell > * {
    width: 100%;
    max-width: none;
    margin: 0;
}

body.page-admin-user-logins .content-shell > * {
    width: 100%;
    max-width: none;
    margin: 0;
}

body.page-admin-user-logins .section-backlink--standalone {
    width: 100%;
    margin: 0 0 8px;
    position: static;
    top: auto;
    backdrop-filter: none;
    background: transparent;
    padding: 0;
}

@media (max-width: 1024px) {
    .admin-metrics-pair-row {
        grid-template-columns: 1fr;
    }

    .admin-metric-combo-body {
        grid-template-columns: 1fr;
    }

    .admin-metric-kpi-card--mini {
        width: auto;
        max-width: none;
        justify-self: stretch;
    }

    .admin-metric-kpi-pair.admin-metric-kpi-pair--values-only {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-metrics-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-metrics-kpi-grid--secondary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-metrics-charts-grid {
        grid-template-columns: 1fr;
    }

    .admin-quick-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-control-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 760px) {
    .admin-metrics-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-metrics-kpi-grid {
        grid-template-columns: 1fr;
    }

    .admin-metrics-kpi-grid--secondary {
        grid-template-columns: 1fr;
    }

    .admin-control-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.admin-ai-filter-form {
    display: grid;
    gap: 12px;
}

.admin-ai-filter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.admin-ai-filter-grid label {
    display: grid;
    gap: 6px;
    font-weight: 700;
    color: #355c7f;
}

.admin-ai-link {
    color: #1f5f95 !important;
}

.admin-ai-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
}

.admin-ai-pagination {
    margin-top: 10px;
}

.admin-ai-inline-form {
    display: inline-flex;
}

.admin-ai-inline-form button {
    min-height: 38px;
    border-radius: 10px;
    padding: 0 12px;
    background: #2f80ad;
    color: #fff;
}

.admin-ai-card {
    display: grid;
    gap: 10px;
}

.admin-ai-card h3 {
    margin: 6px 0 0;
}

.admin-ai-card-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
}

.admin-ai-pre {
    margin: 0;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #d2dfea;
    background: #f7fbff;
    color: #173a56;
    white-space: pre-wrap;
    word-break: break-word;
}

.admin-ai-details {
    border: 1px solid #d2dfea;
    border-radius: 10px;
    background: #fbfdff;
    padding: 8px 10px;
}

.admin-ai-details summary {
    cursor: pointer;
    font-weight: 700;
    color: #355c7f;
}

.offline-exchange-page {
    gap: 12px;
}

.offline-exchange-shell {
    width: min(100%, var(--content-max-width));
    margin: 0 auto;
}

.offline-exchange-tabs {
    margin: 0;
}

.offline-exchange-tab-pane {
    min-width: 0;
}

.offline-exchange-status {
    display: grid;
    gap: 10px;
}

.offline-exchange-status h3 {
    margin: 2px 0 0;
}

.offline-exchange-status-header,
.offline-exchange-panel-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.offline-exchange-meta {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px 14px;
    margin: 0;
    padding: 10px 0 0;
    border-top: 1px solid var(--line);
}

.offline-exchange-meta div {
    min-width: 0;
}

.offline-exchange-meta dt {
    margin: 0 0 2px;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.offline-exchange-meta dd {
    margin: 0;
    color: var(--ink);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.offline-exchange-token-value input {
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.offline-exchange-details {
    border: 0;
    padding: 0;
    background: transparent;
}

.offline-exchange-details summary {
    padding: 4px 0;
}

.offline-exchange-details pre {
    margin: 12px 0 0;
}

@media (max-width: 900px) {
    .admin-ai-filter-grid {
        grid-template-columns: 1fr;
    }

    .admin-ai-card-meta {
        grid-template-columns: 1fr;
    }

    .offline-exchange-meta {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .profile-meta {
        grid-template-columns: 170px minmax(0, 1fr);
        column-gap: 12px;
        row-gap: 8px;
    }
}

@media (max-width: 520px) {
    .profile-meta {
        grid-template-columns: 1fr;
        row-gap: 4px;
    }

    .offline-exchange-status-header,
    .offline-exchange-panel-title {
        display: grid;
    }

    .offline-exchange-meta {
        grid-template-columns: 1fr 1fr;
    }
}

.section-backlink {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.section-backlink--standalone {
    width: min(100%, var(--content-max-width));
    position: sticky;
    top: 8px;
    z-index: 12;
    margin: 0 auto 8px;
    padding: 4px 0;
    background: linear-gradient(180deg, rgba(231, 241, 248, 0.96) 0%, rgba(231, 241, 248, 0.78) 100%);
    backdrop-filter: blur(6px);
}

.section-backlink-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--muted);
}

.table-shell {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: visible;
}

.table-shell--sticky {
    overflow: visible;
}

.table-shell > .data-table {
    min-width: 100%;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    background: transparent;
}

.data-table th,
.data-table td {
    padding: 5px 6px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    line-height: 1.2;
}

.data-table th + th,
.data-table td + td {
    border-left: 1px solid rgba(211, 225, 235, 0.9);
}

.data-table th {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5a7183;
    white-space: nowrap;
    background: #f8fbfe;
}

.data-table tbody tr:hover {
    background: #f6fbff;
}

.data-table--clickable tbody tr:not(.row-description-row):not(.master-detail-row):hover {
    background: #edf7fc;
}

.data-table--no-hover tbody tr:hover {
    background: transparent;
}

.data-table tbody tr.is-selected,
.data-table tbody tr.selected {
    background: #e5f2fa;
}

.data-table tbody tr.admin-row-inactive td {
    color: #6b7f8f;
}

.data-table--sticky thead th {
    position: sticky;
    top: 0;
    z-index: 4;
    background: #f7fbfe;
    box-shadow: inset 0 -1px 0 var(--line);
}

.data-table--compact th,
.data-table--compact td {
    padding: 4px 5px;
}

.data-table td.numeric,
.data-table th.numeric,
.data-table .numeric {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.data-table .nowrap {
    white-space: nowrap;
}

.data-table td.centered,
.data-table th.centered,
.centered {
    text-align: center;
}

.query-cell-link {
    color: inherit;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
}

.query-cell-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 6px;
    border-radius: 999px;
    border: 1px solid rgba(28, 82, 118, 0.2);
    background: rgba(28, 82, 118, 0.08);
    color: #1c5276;
    font-size: 0.72rem;
    line-height: 1;
    vertical-align: middle;
}

.query-cell-link-button:hover {
    background: rgba(28, 82, 118, 0.16);
}

.table-cell-style-warning {
    color: #8c5f00;
    font-weight: 700;
}

.table-cell-style-hard-warning {
    color: #b2384e;
    font-weight: 700;
}

.table-cell-style-success {
    color: #1f7a49;
    font-weight: 700;
}

.table-cell-style-info {
    color: #1f5f8d;
    font-weight: 600;
}

.table-cell-style-muted {
    color: #6a7f92;
}

.table-cell-style-canceled {
    background: rgba(113, 117, 122, 0.9);
    color: #f5f7fa;
    font-weight: 600;
}

.panel-accent-data-table td.table-cell-style-warning {
    color: #ffd86f;
}

.panel-accent-data-table td.table-cell-style-hard-warning {
    color: #ff9eb0;
}

.panel-accent-data-table td.table-cell-style-success {
    color: #aef3c8;
}

.panel-accent-data-table td.table-cell-style-info {
    color: #b6e8ff;
}

.panel-accent-data-table td.table-cell-style-muted {
    color: rgba(227, 241, 250, 0.74);
}

.panel-accent-data-table td.table-cell-style-canceled {
    background: rgba(228, 233, 239, 0.3);
    color: #f7fbff;
}

.panel-accent-data-table .query-cell-link-button {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.16);
    color: rgba(252, 254, 255, 0.96);
}

.panel-accent-data-table .query-cell-link-button:hover {
    background: rgba(255, 255, 255, 0.24);
}

.data-table--clickable tbody tr:not(.row-description-row):not(.master-detail-row) {
    cursor: pointer;
}

.data-table--clickable tbody tr:not(.row-description-row):not(.master-detail-row) > td:first-child {
    position: relative;
}

.data-table--clickable tbody tr:not(.row-description-row):not(.master-detail-row):hover > td:first-child::before,
.data-table--clickable tbody tr.is-selected > td:first-child::before,
.data-table--clickable tbody tr.selected > td:first-child::before {
    content: "";
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 0;
    width: 3px;
    border-radius: 999px;
    background: rgba(31, 111, 159, 0.72);
}

.data-table--clickable tbody tr.is-selected > td:first-child::before,
.data-table--clickable tbody tr.selected > td:first-child::before {
    width: 5px;
    background: var(--accent-deep);
}

.data-table--clickable tbody tr.is-selected,
.data-table--clickable tbody tr.selected {
    background: #dceefa;
}

.data-table--clickable tbody tr.is-selected:hover,
.data-table--clickable tbody tr.selected:hover {
    background: #d4e9f7;
}

.panel-accent-data-table.data-table--clickable tbody tr:not(.row-description-row):not(.master-detail-row):hover {
    background: rgba(255, 255, 255, 0.08);
}

.panel-accent-data-table tbody tr.is-selected,
.panel-accent-data-table tbody tr.selected {
    background: rgba(255, 255, 255, 0.12);
}

.panel-accent-data-table.data-table--clickable tbody tr.is-selected:hover,
.panel-accent-data-table.data-table--clickable tbody tr.selected:hover {
    background: rgba(255, 255, 255, 0.16);
}

.panel-accent-data-table.data-table--clickable tbody tr:not(.row-description-row):not(.master-detail-row):hover > td:first-child::before,
.panel-accent-data-table.data-table--clickable tbody tr.is-selected > td:first-child::before,
.panel-accent-data-table.data-table--clickable tbody tr.selected > td:first-child::before {
    background: rgba(255, 255, 255, 0.72);
}

.panel-accent-data-table.data-table--clickable tbody tr.is-selected > td:first-child::before,
.panel-accent-data-table.data-table--clickable tbody tr.selected > td:first-child::before {
    width: 5px;
    background: rgba(255, 255, 255, 0.94);
}

.data-table--clickable tbody tr:focus-visible {
    outline: 2px solid rgba(31, 111, 159, 0.24);
    outline-offset: -2px;
}

.data-table--clickable tbody tr a {
    position: relative;
    z-index: 1;
}

.data-table tbody tr.row-description-row:hover {
    background: transparent;
}

.data-table tbody tr.row-description-row {
    display: none;
}

.data-table--clickable tbody tr.row-description-row {
    cursor: default;
}

.data-table td.row-description-cell {
    color: var(--accent);
    padding-left: 10px;
}

.master-row-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid #d0deea;
    background: #f4faff;
    color: var(--accent-deep);
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.master-row-toggle:hover {
    background: #edf6fb;
    border-color: #8eb9d4;
}

.master-row-toggle[aria-expanded="true"] {
    background: linear-gradient(135deg, #edf6fb 0%, #d9ebf6 100%);
}

.master-detail-row {
    display: none;
}

.master-detail-row.is-open {
    display: table-row;
}

.master-detail-row > td {
    padding: 0;
    background: #fbfdff;
}

.master-detail-panel {
    padding: 16px;
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 18px;
}

.master-detail-panel > :last-child {
    margin-bottom: 0;
}

.charge-detail-table thead th {
    border-top: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 6;
    background: #f7fbfe;
    box-shadow: inset 0 -1px 0 var(--line);
}

.query-col {
    display: none;
}

.query-caption-short {
    display: none;
}

.table-result-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
}

.table-result-badge--success {
    background: #dff5e7;
    color: #1d7a48;
}

.table-result-badge--danger {
    background: #fbe3e7;
    color: #b2384e;
}

.table-result-badge--info {
    background: #e8f1f8;
    color: #2a678f;
}

.selected {
    background: #f3f9fd;
}

.table-cell-with-hint {
    cursor: help;
    text-decoration: underline dotted rgba(31, 111, 159, 0.45);
    text-underline-offset: 2px;
}

.query-header-with-hint {
    cursor: help;
}

.query-header-with-hint .query-caption-long,
.query-header-with-hint .query-caption-short {
    text-decoration: underline dotted currentColor;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.table-cell-hint-popup {
    position: fixed;
    z-index: 1200;
    max-width: min(420px, calc(100vw - 16px));
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #bcd5e4;
    background: #f4fbff;
    color: var(--accent-deep);
    box-shadow: 0 10px 26px rgba(19, 63, 90, 0.2);
    font-size: 0.88rem;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
}

.tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: #edf3f8;
    color: #4f6678;
    font-size: 0.82rem;
    font-weight: 700;
}

.tag-active {
    background: #dceffc;
    color: #135f89;
}

.tag-primary {
    background: #ddebf5;
    color: #2f6486;
}

.actions-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    background: #f1f7fb;
    border: 1px solid #d0deea;
    font-weight: 600;
    color: var(--ink);
}

.action-link[disabled],
.action-link.action-link--disabled,
.action-link.is-disabled {
    opacity: 0.62;
    cursor: not-allowed;
    pointer-events: none;
}

.danger-link {
    color: #8d1e24;
    background: #fff4f4;
    border-color: #ebc9cb;
}

.form-panel form {
    display: grid;
    gap: 12px;
}

.captcha-image {
    display: block;
    width: 158px;
    height: 50px;
    margin: -2px 0 4px;
    border-radius: 9px;
    user-select: none;
}

.admin-news-toolbar {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 12px;
}

.admin-contacts-toolbar {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 12px;
}

.admin-news-table .admin-news-row {
    cursor: pointer;
}

.admin-news-table .admin-news-row:focus-visible {
    outline: 2px solid #4f8fb3;
    outline-offset: -2px;
}

.admin-contacts-table .admin-contacts-row {
    cursor: pointer;
}

.admin-contacts-table .admin-contacts-row:focus-visible {
    outline: 2px solid #4f8fb3;
    outline-offset: -2px;
}

.news-actions-dialog {
    width: min(92vw, 460px);
}

.contacts-actions-dialog {
    width: min(92vw, 460px);
}

.news-editor-dialog {
    width: min(96vw, 1280px);
    height: min(calc(100vh - 32px), 980px);
    max-height: calc(100vh - 32px);
    margin-top: 16px;
    overflow: auto;
    display: flex;
    flex-direction: column;
}

.contacts-editor-dialog {
    width: min(94vw, 720px);
    max-height: calc(100vh - 32px);
    margin-top: 16px;
    overflow: auto;
    display: flex;
    flex-direction: column;
}

.news-preview-dialog {
    width: min(94vw, 920px);
    max-height: 88vh;
    overflow: auto;
}

.news-preview-body {
    margin-top: 10px;
    max-height: 58vh;
    overflow: auto;
    border: 1px solid #d0deea;
    border-radius: 12px;
    padding: 12px 14px;
    background: #f9fcff;
}

.news-action-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.contacts-action-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.news-action-list button {
    width: 100%;
    text-align: left;
}

.contacts-action-list button {
    width: 100%;
    text-align: left;
}

.news-action-list button[disabled] {
    opacity: 0.56;
    cursor: not-allowed;
}

.news-action-divider {
    border-top: 1px solid #d5e4ee;
    margin: 4px 0;
}

.contacts-action-divider {
    border-top: 1px solid #d5e4ee;
    margin: 4px 0;
}

.news-editor-dialog form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    height: 100%;
}

.contacts-editor-dialog form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
}

.news-editor-dialog .rich-editor {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    flex: 1 1 auto;
}

.news-editor-dialog .rich-editor-toolbar {
    max-height: 168px;
    overflow-y: auto;
    overflow-x: hidden;
}

.news-editor-dialog .rich-editor-canvas {
    min-height: 180px;
    height: auto;
    flex: 1 1 auto;
    max-height: none;
    overflow-y: auto;
}

.news-editor-dialog .actions-cell {
    margin-top: 4px;
}

.contacts-editor-dialog .actions-cell {
    margin-top: 4px;
}

@media (max-width: 680px), (max-height: 760px) {
    .news-editor-dialog .rich-editor-toolbar {
        max-height: 128px;
    }

    .news-editor-dialog .rich-editor-canvas {
        min-height: 140px;
    }
}

input,
button,
select,
textarea {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #c8d9e5;
    background: #fff;
}

button {
    border: 0;
    border-radius: 14px;
    padding: 12px 16px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
}

button.action-link {
    color: var(--ink);
    background: #f1f7fb;
    border: 1px solid #d0deea;
}

.error {
    color: var(--warn);
    font-weight: 700;
}

strong {
    font-weight: 800;
}

.success {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #eef8fd;
    border: 1px solid #c7e0ee;
}

.error-block {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #fff1f1;
    border: 1px solid #ebc9cb;
    color: #8d1e24;
    font-weight: 700;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-content-editor-panel {
    display: flex;
    flex-direction: column;
    height: min(calc(100vh - 150px), 980px);
    min-height: 560px;
    overflow: hidden;
}

.admin-content-editor-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1 1 auto;
    min-height: 0;
}

.admin-content-rich-editor {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.admin-content-rich-toolbar {
    max-height: 168px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 0 0 auto;
}

.admin-content-editor-canvas {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
}

.admin-content-editor-save {
    margin-top: auto;
    flex: 0 0 auto;
}

@media (max-width: 760px), (max-height: 780px) {
    .admin-content-editor-panel {
        height: min(calc(100vh - 124px), 860px);
        min-height: 460px;
    }

    .admin-content-rich-toolbar {
        max-height: 130px;
    }
}

.check-row input {
    width: auto;
}

.meter-submit-form {
    gap: 16px;
}

.meter-entry-table th,
.meter-entry-table td {
    vertical-align: middle;
}

.meter-entry-input {
    width: 84px;
    min-width: 0;
    max-width: 100%;
    padding: 8px 8px;
    text-align: right;
}

.meter-check-date {
    white-space: nowrap;
}

.meter-check-date--warning {
    color: #b27b00;
    font-weight: 700;
}

.meter-check-date--expired {
    color: #b2384e;
    font-weight: 800;
}

.meter-entry-table tfoot th {
    border-top: 2px solid var(--line);
    background: #f7fbfe;
}

body.page-meters .app-body {
    overflow: hidden;
}

body.page-meters .content-shell,
body.page-meters .content-scroll,
body.page-meters .content-x-scroll {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.meters-page {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meters-grid {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
    overflow: hidden;
}

.meter-panel-selector {
    overflow: hidden;
}

.meter-selector-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.meter-selector-head .eyebrow {
    margin-bottom: 0;
}

.meter-selector-title-row {
    flex: 1 1 auto;
    min-width: 0;
}

.meter-view-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.meter-view-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #eef4fb;
    color: #0e4d7f;
    padding: 6px 12px;
    font-weight: 600;
    text-decoration: none;
}

.meter-view-button:hover {
    background: #e5eef8;
}

.meter-view-button.is-active {
    background: #0b6aa8;
    border-color: #0b6aa8;
    color: #fff;
}

@media (max-width: 760px) {
    .meter-selector-head {
        align-items: center;
        gap: 8px;
    }

    .meter-selector-title-row {
        gap: 8px;
    }

    .meter-view-buttons {
        flex: 0 0 auto;
        gap: 6px;
    }

    .meter-view-button {
        width: 34px;
        height: 34px;
        padding: 0;
        border-radius: 50%;
        font-size: 0;
    }

    .meter-view-button::before {
        content: attr(data-short-label);
        font-size: 0.9rem;
        font-weight: 800;
        line-height: 1;
    }
}

.meter-panel-main {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.meter-panel-main .meter-table-shell {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.meter-panel-main .meter-table-shell > .data-table {
    min-width: 100%;
}

.inline-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 16px;
}

.pay-grid {
    align-items: start;
}

.pay-panel h2 {
    margin-top: 0;
    margin-bottom: 10px;
}

.pay-panel {
    position: sticky;
    top: 58px;
    z-index: 8;
}

.pay-form {
    display: grid;
    gap: 10px;
    margin-top: 8px;
    width: 100%;
}

.pay-form label {
    font-weight: 700;
    color: #2b4d64;
}

.pay-doc-card {
    border: 1px solid #d7e5ef;
    border-radius: 12px;
    padding: 12px;
    background: #f9fcff;
    margin-top: 12px;
}

.pay-doc-card h3 {
    margin: 0 0 8px;
    font-size: 1.02rem;
}

.pay-form-inline {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.pay-field {
    display: grid;
    gap: 8px;
    min-width: 220px;
    flex: 1 1 260px;
}

.pay-inline-submit {
    white-space: nowrap;
    min-height: 42px;
}

.pay-period-hint {
    margin: 0;
}

.pay-period-warning {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.35;
}

.pay-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.pay-method-start-form {
    display: none;
}

.pay-method-card {
    min-height: 170px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #35579b;
    background: linear-gradient(180deg, #4968ad 0%, #3f5f9f 100%);
    color: #fff;
    display: grid;
    align-content: stretch;
    justify-items: center;
    gap: 10px;
    text-align: center;
}

.pay-method-card:hover {
    border-color: #6f90c7;
    background: linear-gradient(180deg, #4f6fb8 0%, #4666ab 100%);
}

.pay-method-card:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.pay-method-title {
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: 0.01em;
    align-self: center;
}

.pay-method-logo {
    width: min(100%, 240px);
    max-height: 86px;
    object-fit: contain;
    align-self: center;
}

.pay-method-state {
    color: rgba(255, 255, 255, 0.94);
    font-size: 0.96rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    align-self: end;
}

.pay-method-note {
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.8rem;
    line-height: 1.25;
}

.pay-confirm-modal[hidden] {
    display: none;
}

.pay-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
}

.pay-confirm-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(13, 28, 41, 0.48);
}

.pay-confirm-modal__dialog {
    position: relative;
    width: min(92vw, 440px);
    margin: 14vh auto 0;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid #c8d9e5;
    background: #fff;
    box-shadow: 0 18px 44px rgba(19, 42, 27, 0.24);
}

.pay-confirm-modal__dialog h3 {
    margin: 0 0 10px;
}

.pay-confirm-modal__line {
    margin: 6px 0;
}

.pay-confirm-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

.pay-confirm-modal__actions .action-link {
    color: var(--ink);
    background: #f1f7fb;
    border: 1px solid #d0deea;
}

.pay-confirm-modal__dialog.news-actions-dialog {
    width: min(92vw, 460px);
    margin: 16px auto 0;
}

.pay-confirm-modal__dialog.contacts-actions-dialog {
    width: min(92vw, 460px);
    margin: 16px auto 0;
}

.pay-confirm-modal__dialog.news-editor-dialog {
    width: min(96vw, 1280px);
    height: min(calc(100vh - 32px), 980px);
    max-height: calc(100vh - 32px);
    margin: 16px auto 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
}

.pay-confirm-modal__dialog.contacts-editor-dialog {
    width: min(94vw, 720px);
    max-height: calc(100vh - 32px);
    margin: 16px auto 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
}

.pay-confirm-modal__dialog.news-preview-dialog {
    width: min(94vw, 920px);
    max-height: calc(100vh - 32px);
    margin: 16px auto 0;
    overflow: auto;
}

.notifications-panel .eyebrow {
    margin-bottom: 10px;
}

.notifications-list {
    display: grid;
    gap: 12px;
}

.notification-card {
    border: 1px solid #d3e1eb;
    border-radius: 14px;
    padding: 12px 14px;
    background: #f9fcff;
}

.notification-card--unread {
    border-color: #9ec5dd;
    background: #eef7fd;
}

.notification-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.notification-card-head h3 {
    margin: 0;
    font-size: 1rem;
    color: #12395a;
}

.notification-card-time {
    font-size: 0.78rem;
    color: #5a7183;
    white-space: nowrap;
}

.notification-card-body {
    margin: 0;
    line-height: 1.45;
    white-space: pre-line;
}

.notification-card--collapsed .notification-card-body {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-card-accounts {
    margin-top: 10px;
    display: grid;
    gap: 6px;
}

.notification-card--collapsed .notification-card-accounts {
    display: none;
}

.notification-card-accounts-title {
    font-weight: 700;
    color: #204f72;
}

.notification-card-accounts-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.notification-card-accounts-list--stack {
    display: grid;
    gap: 4px;
}

.notification-card-account-line {
    color: #1e4668;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.notification-card-account-action {
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    color: #1d5f90;
    background: #e9f4fd;
    border: 1px solid #c7deef;
}

.notification-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.notification-card-actions form {
    margin: 0;
}

.notification-card-actions .action-link {
    min-height: 34px;
    color: #1f5f95;
}

.notification-card-toggle {
    color: #17517e;
}

.notifications-more-note {
    margin-top: 12px;
}

@media (max-width: 760px) {
    .notification-card {
        padding: 11px 12px;
    }

    .notification-card-head {
        flex-direction: column;
        gap: 6px;
    }

    .notification-card-time {
        white-space: normal;
    }

    .notification-card-actions .action-link {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

@keyframes topbarQuickPulse {
    0% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.22);
    }
    100% {
        filter: brightness(1);
    }
}

@media (min-width: 1441px) {
    .show-xl {
        display: table-cell;
    }

    .show-desc-xl {
        display: table-row !important;
    }
}

@media (min-width: 1241px) and (max-width: 1440px) {
    .show-lg {
        display: table-cell;
    }

    .show-desc-lg {
        display: table-row !important;
    }
}

@media (max-width: 1440px) {
    :root {
        --content-max-width: 940px;
        --shell-padding-x: 20px;
    }
}

@media (min-width: 1121px) and (max-width: 1240px) {
    .show-md {
        display: table-cell;
    }

    .show-desc-md {
        display: table-row !important;
    }

    :root {
        --sidebar-width: 184px;
        --content-max-width: 880px;
        --shell-padding-x: 16px;
        --shell-padding-bottom: 20px;
        --panel-padding: 22px;
        --topbar-card-width: 220px;
        --topbar-user-card-width: 275px;
        --topbar-gap: 14px;
        --topbar-card-gap: 10px;
        --topbar-logo-width: 152px;
        --topbar-logo-gap: 10px;
        --brand-mark-size: 40px;
        --brand-mark-radius: 12px;
        --brand-name-size: 1.05rem;
        --brand-section-size: 0.78rem;
        --body-font-size: 15px;
        --sidebar-padding-y: 18px;
        --sidebar-padding-x: 14px;
        --sidebar-link-min-height: 46px;
        --sidebar-link-font-size: 0.91rem;
        --sidebar-sublink-min-height: 40px;
        --sidebar-sublink-font-size: 0.86rem;
    }
}

@media (max-width: 760px) {
    .meter-entry-input {
        width: 68px;
        padding: 6px 6px;
    }
}

@media (min-width: 761px) and (max-width: 1120px) {
    .show-sm {
        display: table-cell;
    }

    .show-desc-sm {
        display: table-row !important;
    }

    .query-caption-long {
        display: none;
    }

    .query-caption-short {
        display: inline;
    }

    .topbar {
        gap: 12px;
        padding: 0 12px;
    }

    .topbar-quick {
        overflow: visible;
        padding-bottom: 0;
    }

    .topbar-quick-inner {
        padding: 0 18px;
    }

    .topbar-quick-mobile {
        display: none;
    }

    .topbar-quick-track {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        min-width: 0;
        gap: 7px;
    }

    .topbar-quick-button {
        min-height: 31px;
        padding: 0 8px;
        font-size: 0.78rem;
    }

    .topbar-quick-button--with-icon {
        justify-content: center;
        gap: 5px;
    }

    .topbar-quick-icon {
        width: 20px;
        height: 20px;
        flex: 0 0 20px;
    }

    .qa-label-full {
        display: none;
    }

    .qa-label-md {
        display: inline;
    }

    .content-shell {
        padding: 0 18px 18px;
    }

    .app-sidebar {
        justify-content: flex-start;
    }

    .sidebar-nav {
        flex: 0 0 auto;
        align-content: start;
    }

    :root {
        --header-height: 120px;
        --sidebar-width: 168px;
        --content-max-width: 820px;
        --panel-padding: 20px;
        --topbar-card-width: 200px;
        --topbar-user-card-width: 250px;
        --topbar-logo-width: 132px;
        --topbar-logo-gap: 8px;
        --body-font-size: 14px;
        --brand-name-size: 0.98rem;
        --brand-section-size: 0.74rem;
        --sidebar-link-font-size: 0.88rem;
        --sidebar-sublink-font-size: 0.84rem;
    }
}

@media (max-width: 760px) {
    .show-xs {
        display: table-cell;
    }

    .show-desc-xs {
        display: table-row !important;
    }

    .query-caption-long {
        display: none;
    }

    .query-caption-short {
        display: inline;
    }

    :root {
        --sidebar-width: 72px;
        --header-height: 84px;
        --content-max-width: 760px;
        --shell-padding-x: 14px;
        --panel-padding: 18px;
        --topbar-card-width: 184px;
        --topbar-user-card-width: 232px;
        --topbar-logo-width: var(--sidebar-width);
        --topbar-logo-gap: 8px;
        --body-font-size: 14px;
        --brand-name-size: 0.94rem;
        --brand-section-size: 0.7rem;
    }

    .topbar,
    .topbar.topbar-auth {
        overflow: visible;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .topbar-main {
        gap: 8px;
    }

    .topbar-logo-slot {
        left: 0;
        width: var(--sidebar-width);
    }

    .topbar-auth-body {
        padding: 0 10px;
    }

    .topbar-inline-card {
        padding: 7px 10px;
    }

    .topbar-quick {
        overflow: visible;
        padding-bottom: 0;
    }

    .topbar-quick-inner {
        padding: 0 8px 0 0;
    }

    .topbar-quick-track {
        display: none;
    }

    .topbar-quick-mobile {
        display: block;
        margin-top: 2px;
    }

    .topbar-quick-sheet {
        display: block;
    }

    .topbar-quick-sheet-backdrop {
        background: rgba(13, 28, 41, 0.26);
    }

    .topbar-quick-sheet-panel {
        left: calc(var(--sidebar-width) + 6px);
        right: auto;
        top: calc(var(--header-height) - 2px);
        bottom: auto;
        width: min(var(--content-max-width), calc(100vw - var(--sidebar-width) - 12px));
        max-height: calc(100vh - var(--header-height) - 8px);
        border-radius: 14px;
        border-bottom: 1px solid #c7dae8;
        box-shadow: 0 18px 36px rgba(16, 36, 53, 0.22);
    }

    .topbar-quick-mobile-toggle {
        min-height: 36px;
    }

    .topbar-quick-mobile-notify {
        min-width: 104px;
        min-height: 36px;
        padding: 0 9px;
        font-size: 0.74rem;
    }

    .topbar-quick-mobile-copy strong {
        font-size: 0.86rem;
    }

    .topbar-quick-mobile-copy span {
        display: none;
    }

    .topbar-quick-mobile-copy {
        gap: 0;
    }

    .topbar-quick-mobile-badges {
        display: none;
    }

    .pay-panel {
        top: 52px;
    }

    .pay-form-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .pay-field {
        min-width: 100%;
        flex: 0 0 auto;
    }

    .pay-inline-submit {
        width: 100%;
    }

    .app-sidebar {
        justify-content: flex-start;
        padding-left: 8px;
        padding-right: 8px;
    }

    .sidebar-nav {
        flex: 0 0 auto;
        align-content: start;
    }

    .sidebar-link {
        justify-content: center;
        padding: 0;
        min-height: 44px;
    }

    .sidebar-subnav {
        padding-left: 0;
    }

    .sidebar-auth-entry {
        padding-bottom: 14px;
        margin-bottom: 14px;
    }

    .sidebar-label {
        display: none;
    }

    .sidebar-icon {
        display: inline-block;
        width: auto;
        font-size: 0.94rem;
    }

    .sidebar-copyright {
        display: none;
    }
}

@media (max-width: 760px) {
    :root {
        --sidebar-width: 64px;
        --header-height: 84px;
        --content-max-width: 700px;
        --shell-padding-x: 8px;
        --shell-padding-bottom: 28px;
        --panel-padding: 14px;
        --topbar-card-width: 168px;
        --topbar-user-card-width: 210px;
        --topbar-logo-width: var(--sidebar-width);
        --topbar-logo-gap: 8px;
        --topbar-gap: 10px;
        --topbar-card-gap: 8px;
        --topbar-padding-x: 12px;
        --brand-gap: 10px;
        --brand-mark-size: 36px;
        --brand-mark-radius: 10px;
        --brand-name-size: 0.88rem;
        --brand-section-size: 0.66rem;
        --body-font-size: 13px;
    }

    .switcher-menu {
        min-width: 220px;
    }

    .account-switcher .switcher-backdrop,
    .switcher-backdrop.switcher-backdrop--portal-mobile {
        position: fixed;
        inset: 0;
        background: rgba(13, 28, 41, 0.26);
        z-index: 1210;
    }

    .account-switcher .switcher-backdrop[hidden],
    .switcher-backdrop.switcher-backdrop--portal-mobile[hidden] {
        display: none !important;
    }

    .account-switcher .switcher-menu.switcher-menu--accounts,
    .switcher-menu.switcher-menu--accounts.switcher-menu--portal-mobile {
        position: fixed;
        left: calc(var(--sidebar-width) + 6px);
        right: auto;
        top: calc(var(--header-height) - 2px);
        width: min(520px, calc(100vw - var(--sidebar-width) - 12px));
        max-width: min(520px, calc(100vw - var(--sidebar-width) - 12px));
        max-height: calc(100vh - var(--header-height) - 8px);
        overflow: auto;
        border-radius: 14px;
        border: 1px solid #c7dae8;
        box-shadow: 0 18px 36px rgba(16, 36, 53, 0.22);
        z-index: 1211;
    }

    .content-shell {
        padding: 0 8px 28px 0;
    }

    .topbar-card-label {
        font-size: 0.62rem;
    }

    .sidebar-link,
    .sidebar-sublink {
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    :root {
        --sidebar-width: 56px;
        --header-height: 84px;
        --shell-padding-x: 6px;
        --shell-padding-bottom: 36px;
        --panel-padding: 12px;
        --topbar-card-width: 156px;
        --topbar-user-card-width: 196px;
        --topbar-logo-width: var(--sidebar-width);
        --topbar-logo-gap: 6px;
        --body-font-size: 12px;
    }

    .topbar-auth-body {
        padding: 0 6px;
    }

    .topbar-logo-slot {
        left: 0;
        width: var(--sidebar-width);
    }

    .topbar-quick-button {
        min-height: 33px;
        font-size: 0.72rem;
    }

    .topbar-quick-mobile-notify {
        min-width: 94px;
        min-height: 34px;
        font-size: 0.7rem;
    }

    .topbar-quick-mobile-toggle {
        min-height: 34px;
    }

    .pay-panel {
        top: 48px;
    }

    .content-shell {
        padding: 0 6px 36px 0;
    }

    .topbar-quick-inner {
        padding: 0 6px 0 0;
    }

    .app-sidebar {
        padding-left: 6px;
        padding-right: 6px;
    }

    .sidebar-link {
        min-height: 40px;
        border-radius: 10px;
    }

    .sidebar-icon {
        font-size: 0.88rem;
    }
}
.ai-assistant-ask-open {
  color: #ffffff !important;
  background-color: #2f80ad !important;
  border-color: #2f80ad !important;
}

.ai-assistant-ask-open[disabled] {
  color: #6f7f8f;
  background-color: #e9eef4;
  border-color: #c8d4e2;
}
.ai-assistant-card-head {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "question toggle"
        "meta meta";
    gap: 6px 10px;
    align-items: start;
}

.ai-assistant-card-question {
    grid-area: question;
}

.ai-card-toggle {
    grid-area: toggle;
    color: #1f5f95 !important;
    background: #eaf2f8 !important;
}

.ai-assistant-card-time {
    grid-area: meta;
}

.ai-assistant-card-preview {
    margin-top: 8px;
    color: #355c7f;
    line-height: 1.35;
}

.ai-assistant-card.is-collapsed .ai-assistant-card-body {
    display: none;
}

.ai-assistant-toolbar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ai-assistant-collapse-all {
    color: #1f5f95 !important;
}

.ai-assistant-more,
.ai-assistant-formalizer-open,
.ai-formalizer-reset {
    color: #1f5f95 !important;
}

.admin-formalizer-builder {
    display: grid;
    grid-template-columns: minmax(320px, 40%) 1fr;
    gap: 14px;
}

.admin-formalizer-builder-left,
.admin-formalizer-builder-right {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 10px;
    background: #f6f9fc;
}

.admin-formalizer-builder-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.admin-formalizer-builder-actions .action-link,
.admin-formalizer-builder-right .action-link {
    color: #1f5f95 !important;
}

.admin-formalizer-tree {
    max-height: 65vh;
    overflow: auto;
    border-top: 1px solid var(--line);
    padding-top: 8px;
}

.admin-formalizer-tree-topic,
.admin-formalizer-tree-subtopic,
.admin-formalizer-tree-item {
    margin-bottom: 6px;
}

.admin-formalizer-tree-subtopic {
    margin-left: 16px;
}

.admin-formalizer-tree-item {
    margin-left: 16px;
}

.admin-formalizer-tree-node {
    width: 100%;
    text-align: left;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #fff;
    color: #12395a;
    padding: 7px 10px;
    cursor: pointer;
}

.admin-formalizer-tree-node.is-active {
    border-color: #2f7db3;
    background: #eaf2f8;
}

.admin-formalizer-editor {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
}

.admin-formalizer-field {
    display: grid;
    gap: 6px;
}

.admin-formalizer-field > span {
    font-size: 13px;
    color: #355c7f;
}

.admin-formalizer-field-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #355c7f;
}

.admin-formalizer-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid #7aa4c6;
    color: #1f5f95;
    background: #eef5fb;
    font-weight: 700;
    font-size: 12px;
    cursor: help;
}

.admin-formalizer-help-note {
    margin-top: 6px;
    padding: 8px 10px;
    border: 1px dashed #b9cfe2;
    border-radius: 8px;
    background: #f0f6fb;
    color: #355c7f;
    font-size: 12px;
    line-height: 1.4;
}

.admin-formalizer-field input,
.admin-formalizer-field textarea {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--line);
    padding: 8px 10px;
    font-family: var(--font-body);
}

.admin-formalizer-field textarea.is-error {
    border-color: #ad1e1e;
}

.admin-formalizer-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
    text-align: left;
}

.admin-formalizer-checkbox input[type="checkbox"] {
    width: auto;
    min-width: 16px;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
}

.admin-formalizer-checkbox span {
    display: inline-block;
}

.admin-collapsible {
    margin-top: 16px;
}

.admin-collapsible > summary {
    cursor: pointer;
    font-weight: 700;
    margin: 0 0 10px;
    list-style: none;
}

.admin-collapsible > summary::-webkit-details-marker {
    display: none;
}

.admin-collapsible > summary::before {
    content: "▸";
    display: inline-block;
    margin-right: 8px;
    transition: transform 0.15s ease;
}

.admin-collapsible[open] > summary::before {
    transform: rotate(90deg);
}

.admin-tabs {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
    margin: 10px 0 14px;
    background: #f8fbff;
}

.admin-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.admin-tab-link {
    border: 1px solid var(--line);
    background: #eef4fb;
    color: #0e4d7f;
    border-radius: 999px;
    padding: 6px 12px;
    font-weight: 600;
    cursor: pointer;
}

.admin-tab-link.is-active {
    background: #0b6aa8;
    border-color: #0b6aa8;
    color: #fff;
}

.admin-tab-pane {
    display: none;
}

.admin-tab-pane.is-active {
    display: block;
}

.banners-shell {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: calc(100vh - var(--header-height) - 24px);
    height: calc(100dvh - var(--header-height) - 24px);
    min-height: 0;
    overflow: hidden;
}

.banners-backlink {
    flex: 0 0 auto;
    margin-bottom: 0;
}

.banners-grid {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
}

.banners-panel {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.banners-editor {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.banners-selector-block {
    flex: 0 0 auto;
    position: sticky;
    top: 0;
    z-index: 3;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    background: #f8fbff;
}

.banners-selector-form {
    display: grid;
    gap: 8px;
}

.banners-selector-note {
    margin: 8px 0 0;
}

.banners-editor-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
}

.banners-editor-scroll form {
    display: grid;
    gap: 10px;
}

.banners-form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding-top: 6px;
}

.banners-secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 20px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #eef4fb;
    color: #0e4d7f;
    font-weight: 700;
}

.banners-secondary-link:hover {
    background: #e4eff9;
}

body.page-admin-banners .app-body {
    overflow: hidden;
}

body.page-admin-banners .content-scroll {
    overflow: hidden;
    min-height: 0;
}

body.page-admin-banners .content-shell {
    height: 100%;
    min-height: 0;
}

@media (max-width: 760px) {
    .banners-shell {
        height: calc(100vh - var(--header-height) - 14px);
        height: calc(100dvh - var(--header-height) - 14px);
    }

    .banners-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .banners-form-actions button,
    .banners-secondary-link {
        width: 100%;
    }
}

.notifications-compose-shell {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: calc(100vh - var(--header-height) - 24px);
    height: calc(100dvh - var(--header-height) - 24px);
    min-height: 0;
    overflow: hidden;
}

.notifications-compose-backlink {
    flex: 0 0 auto;
    margin-bottom: 0;
}

.notifications-compose-grid {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
}

.notifications-compose-panel {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notifications-compose-tabs {
    margin: 0;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 12px;
}

.notifications-compose-tabs .admin-tabs-nav {
    flex: 0 0 auto;
    position: sticky;
    top: 0;
    z-index: 3;
    margin-bottom: 10px;
    padding-bottom: 8px;
    background: #f8fbff;
}

.notifications-compose-tabs .admin-tab-pane {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding-right: 4px;
}

.notifications-compose-tabs .admin-tab-pane.is-active {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.compose-wizard {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.compose-wizard-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.compose-step-link {
    border: 1px solid var(--line);
    background: #eef4fb;
    color: #0e4d7f;
    border-radius: 999px;
    padding: 7px 12px;
    font-weight: 700;
    cursor: pointer;
}

.compose-step-link.is-active {
    background: #0b6aa8;
    border-color: #0b6aa8;
    color: #fff;
}

.compose-wizard-form {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.compose-step-pane {
    display: none;
    border: 1px solid #d7e4ee;
    border-radius: 14px;
    background: #fff;
    padding: 12px;
    overflow: auto;
    min-height: 0;
}

.compose-step-pane.is-active {
    display: grid;
    gap: 10px;
    flex: 1 1 auto;
}

.compose-step-pane h3 {
    margin: 0;
}

.compose-summary {
    border: 1px solid #d7e4ee;
    border-radius: 12px;
    background: #f8fbff;
    padding: 12px;
    display: grid;
    gap: 8px;
}

.compose-summary h4 {
    margin: 0;
    font-size: 1rem;
}

.compose-summary p {
    margin: 0;
}

.compose-wizard-footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 10px 0 2px;
    background: linear-gradient(180deg, rgba(248, 251, 255, 0) 0%, rgba(248, 251, 255, 1) 34%);
}

.compose-wizard-footer .button-secondary {
    background: #eef4fb;
    color: #0e4d7f;
    border: 1px solid var(--line);
}

.compose-wizard-footer button {
    width: min(280px, 100%);
    min-width: 280px;
}

@media (max-width: 760px) {
    .notifications-compose-shell {
        height: calc(100vh - var(--header-height) - 14px);
        height: calc(100dvh - var(--header-height) - 14px);
    }

    .notifications-compose-tabs {
        padding: 10px;
    }

    .compose-wizard-footer {
        justify-content: stretch;
    }

    .compose-wizard-footer button {
        min-width: 0;
        width: 100%;
    }
}

body.page-notifications-compose .app-body {
    overflow: hidden;
}

body.page-notifications-compose .content-scroll {
    overflow: hidden;
    min-height: 0;
}

body.page-notifications-compose .content-shell {
    height: 100%;
    min-height: 0;
}

@media (max-width: 1100px) {
    .admin-formalizer-builder {
        grid-template-columns: 1fr;
    }

    .admin-metric-kpi-pair {
        grid-template-columns: 1fr;
    }

    .admin-metric-kpi-triple {
        grid-template-columns: 1fr;
    }
}
