:root {
    color-scheme: light;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    background-color: #fafaf9;
    color: #1c1c1c;
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; min-height: 100vh; }
a, button { -webkit-tap-highlight-color: transparent; }
.site-header {
    height: 82px;
    width: 100%;
    background: #fff;
    border-bottom: 1px solid #eaeae8;
}
.header-inner {
    height: 100%;
    max-width: 1504px;
    margin: 0 auto;
    padding: 0 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    color: inherit;
    text-decoration: none;
    min-width: 0;
}
.brand-mark {
    display: grid;
    place-items: center;
    position: relative;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 12px;
    background: #232323;
    color: #fff;
    font-weight: 800;
    font-size: 24px;
    letter-spacing: -2.2px;
}
.brand-dot { color: #dce98c; }
.brand-copy { display: flex; flex-direction: column; gap: 5px; }
.brand-name { font-weight: 740; font-size: 14px; letter-spacing: .065em; white-space: nowrap; }
.brand-caption { color: #8a8a89; font-weight: 600; font-size: 10px; letter-spacing: .13em; white-space: nowrap; }
.header-actions { display: flex; gap: 16px; align-items: center; justify-content: flex-end; }
.login-button {
    text-decoration: none;
    color: #fff;
    background: #242424;
    border: 1px solid #242424;
    border-radius: 10px;
    padding: 12px 17px;
    display: inline-flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    font-size: 13px;
    font-weight: 650;
    line-height: 20px;
    transition: background .15s ease, transform .15s ease;
}
.login-button:hover { background: #444; }
.login-button:active { transform: translateY(1px); }
.login-button:focus-visible, .quiet-button:focus-visible, .brand:focus-visible {
    outline: 3px solid #a9b4fc;
    outline-offset: 3px;
}
.profile { display: inline-flex; align-items: center; gap: 10px; }
.avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: #2c302a;
    background: #e9ede0;
    display: inline-grid;
    place-items: center;
    font-size: 13px;
    font-weight: 700;
}
.profile-name { color: #383838; font-size: 13px; font-weight: 600; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-divider { width: 1px; height: 24px; background: #e8e8e5; }
.quiet-button {
    background: #fff;
    border: 1px solid #e5e5e2;
    color: #474747;
    padding: 10px 15px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.quiet-button:hover { background: #f7f7f6; }
.configuration-status { font-size: 12px; color: #888; }
.auth-error { font-size: 12px; color: #a13b3b; }
.empty-workspace { min-height: calc(100vh - 82px); }

@media (max-width: 680px) {
    .site-header { height: 73px; }
    .header-inner { padding: 0 19px; gap: 9px; }
    .brand { gap: 9px; }
    .brand-mark { width: 36px; height: 36px; flex-basis: 36px; border-radius: 10px; font-size: 21px; }
    .brand-name { font-size: 12px; letter-spacing: .025em; }
    .brand-caption { font-size: 9px; letter-spacing: .075em; }
    .header-actions { gap: 7px; }
    .login-button { padding: 10px; font-size: 12px; gap: 6px; }
    .login-button svg { display: none; }
    .profile-name { display: none; }
    .header-divider { height: 20px; }
    .quiet-button { padding: 9px 11px; }
    .configuration-status { max-width: 115px; text-align: right; }
    .auth-error { max-width: 90px; text-align: right; }
    .empty-workspace { min-height: calc(100vh - 73px); }
}
@media (prefers-reduced-motion: reduce) {
    .login-button { transition: none; }
}

/* Кабинет управляющего: навигация и список пользователей. */
.app-shell {
    min-height: calc(100vh - 82px);
    display: grid;
    grid-template-columns: 242px minmax(0, 1fr);
    max-width: 1504px;
    margin: 0 auto;
}
.app-shell:has(.workspace-content:first-child) { grid-template-columns: 1fr; }
.side-navigation {
    background: #fff;
    border-right: 1px solid #eaeae8;
    padding: 35px 18px;
}
.navigation-caption {
    color: #9b9b96;
    letter-spacing: .13em;
    font-size: 10px;
    font-weight: 750;
    padding: 0 15px;
    margin: 0 0 14px;
}
.main-navigation { display: grid; gap: 5px; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #666762;
    font-size: 13px;
    font-weight: 600;
    padding: 13px 14px;
    border-radius: 10px;
    text-decoration: none;
    transition: background .12s ease;
}
.nav-item:hover { color: #20201f; background: #f5f5f2; }
.nav-active, .nav-active:hover { color: #20221b; background: #eef1e4; }
.nav-symbol svg { display: block; width: 20px; height: 20px; }
.nav-symbol {
    width: 20px;
    display: inline-block;
    text-align: center;
    font-size: 20px;
    line-height: 18px;
    font-weight: 500;
}
.workspace-content {
    width: 100%;
    min-width: 0;
    max-width: 1262px;
    padding: 49px 57px 80px;
}
.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 30px;
}
.eyebrow {
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .14em;
    color: #878b7c;
    margin: 0 0 11px;
}
.page-header h1 {
    font-size: clamp(26px, 3vw, 35px);
    letter-spacing: -.038em;
    margin: 0;
    font-weight: 725;
    line-height: 1.2;
}
.page-description { color: #85857f; font-size: 13px; margin: 12px 0 0; }
.count-indicator {
    display: flex;
    align-items: baseline;
    gap: 7px;
    color: #282a25;
    font-size: 28px;
    font-weight: 750;
    letter-spacing: -.045em;
    white-space: nowrap;
}
.count-indicator span { font-size: 12px; letter-spacing: 0; color: #94948e; font-weight: 500; }
.panel {
    background: #fff;
    border: 1px solid #e8e9e4;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgb(0 0 0 / 2%);
    overflow: hidden;
}
.table-scroll { width: 100%; overflow-x: auto; }
.users-table { width: 100%; border-collapse: collapse; text-align: left; }
.users-table th {
    background: #fafaf9;
    border-bottom: 1px solid #eaeae7;
    color: #969690;
    font-weight: 650;
    font-size: 10px;
    letter-spacing: .055em;
    text-transform: uppercase;
    padding: 18px 23px;
    white-space: nowrap;
}
.users-table td {
    padding: 20px 23px;
    border-bottom: 1px solid #f0f0ed;
    color: #575751;
    font-size: 12px;
    vertical-align: middle;
}
.users-table tbody tr:last-child td { border-bottom: 0; }
.users-table tbody tr:hover { background: #fdfdfa; }
.users-table .user-name { font-weight: 700; color: #292a26; font-size: 13px; }
.users-table .telegram-id { color: #777b73; font-variant-numeric: tabular-nums; white-space: nowrap; }
.users-table .date-cell { color: #888a83; white-space: nowrap; font-variant-numeric: tabular-nums; }
.role-list { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.role {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e8e8e3;
    border-radius: 6px;
    padding: 5px 9px;
    background: #f7f7f5;
    color: #696b64;
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
}
.role-manager { background: #eef1e2; border-color: #e2e8d0; color: #626d41; }
.role-none { background: #fafaf9; color: #9d9d98; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; white-space: nowrap; }
.status-dot { border-radius: 50%; width: 6px; height: 6px; background: #81a57a; }
.status-active { color: #587752; }
.status-disabled { color: #a19a94; }
.status-disabled .status-dot { background: #c5bfb8; }
.table-footer {
    min-height: 72px;
    padding: 15px 22px;
    border-top: 1px solid #ecece9;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    align-items: center;
    color: #94948d;
    font-size: 12px;
}
.pagination { display: flex; gap: 9px; }
.page-link {
    text-decoration: none;
    color: #494b44;
    border: 1px solid #e5e5e0;
    border-radius: 8px;
    padding: 9px 15px;
    font-size: 12px;
    font-weight: 650;
}
.page-link:hover { background: #f7f8f3; }
.notice {
    padding: 20px 23px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.6;
}
.notice-error { border: 1px solid #e9cece; background: #fff9f9; color: #914343; }
.empty-list { text-align: center; padding: 72px 24px; }
.empty-list h2 { margin: 8px 0; font-size: 18px; }
.empty-list p { font-size: 13px; color: #888; }
.empty-icon { font-size: 34px; color: #b5b8aa; }
.subtle-link { font-size: 13px; color: #66754e; }
.overview-panel {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 30px;
}
.overview-panel h2 { margin: 0 0 7px; font-size: 16px; }
.overview-panel p { margin: 0; color: #96968f; font-size: 13px; }
.overview-symbol {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 11px;
    background: #eef1e4;
    color: #667452;
    font-size: 26px;
}
.overview-link { margin-left: auto; text-decoration: none; font-size: 13px; font-weight: 700; color: #5d7045; }
.overview-link:hover { text-decoration: underline; }
.nav-item:focus-visible, .page-link:focus-visible, .overview-link:focus-visible {
    outline: 3px solid #a9b4fc;
    outline-offset: 3px;
}
@media (max-width: 880px) {
    .app-shell { grid-template-columns: 190px minmax(0, 1fr); }
    .workspace-content { padding: 34px 25px 65px; }
    .users-table th, .users-table td { padding-left: 14px; padding-right: 14px; }
}
@media (max-width: 680px) {
    .app-shell { display: block; min-height: calc(100vh - 73px); }
    .side-navigation { padding: 10px 17px; border-right: 0; border-bottom: 1px solid #eaeae8; }
    .navigation-caption { display: none; }
    .main-navigation { display: flex; flex-wrap: wrap; gap: 8px; }
    .nav-item { padding: 10px 13px; }
    .workspace-content { padding: 27px 18px 60px; }
    .page-header { align-items: flex-start; }
    .count-indicator { font-size: 22px; }
    .overview-panel { padding: 24px; }
    .overview-link { margin-left: 0; }
}
/* Заявки на вступление в фонд. */
.request-panel { max-width: 610px; margin: 62px auto; padding: 56px 45px; text-align: center; }
.request-panel h1 { margin: 16px 0; font-size: clamp(22px, 3vw, 28px); line-height: 1.3; letter-spacing: -.025em; }
.request-panel p { color: #777b72; font-size: 14px; line-height: 1.8; margin: 0; }
.request-symbol { margin: auto; display: grid; place-items: center; height: 54px; width: 54px; border-radius: 50%; background: #eef1e4; color: #69784c; font-size: 24px; }
.request-symbol-success { background: #e4f0e4; color: #4f8157; }
.approval-button { background: #eef1e4; color: #52653c; border: 1px solid #dde5d1; border-radius: 8px; padding: 9px 12px; white-space: nowrap; font-size: 11px; font-weight: 700; cursor: pointer; }
.approval-button:hover { background: #e2e9d4; }
.approval-button:focus-visible { outline: 3px solid #a9b4fc; outline-offset: 3px; }
.no-action { color: #b7b7b1; }
.notice-success { color: #4f7652; background: #f3f9f0; border: 1px solid #dce8d6; margin-bottom: 17px; }
.notice-error { margin-bottom: 17px; }
@media (max-width: 680px) { .request-panel { margin: 32px auto; padding: 42px 24px; } }
/* Редактирование имени из таблицы пользователей. */
.name-editor { font-size: 11px; font-weight: 500; margin-top: 6px; }
.name-editor > summary { display: inline-block; color: #647650; cursor: pointer; }
.name-editor > summary:hover { text-decoration: underline; }
.name-editor > summary:focus-visible { outline: 2px solid #a9b4fc; outline-offset: 3px; }
.name-edit-form { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.name-edit-input {
    font: inherit; font-size: 12px; font-weight: 400; border: 1px solid #dfe2d9;
    border-radius: 8px; background: #fff; color: #292a26;
    padding: 8px 10px; min-width: 170px; max-width: 250px; width: 100%;
}
.name-edit-input:focus-visible { outline: 2px solid #a9b4fc; outline-offset: 2px; }
/* Личный кабинет инвестора: заглушка раздела паёв. */
.shares-placeholder {
    padding: 56px 38px;
    text-align: center;
}
.shares-placeholder-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    border-radius: 14px;
    background: #eef1e4;
    color: #667452;
    font-size: 29px;
}
.shares-placeholder h2 {
    color: #292a26;
    font-size: 19px;
    letter-spacing: -.025em;
    margin: 0 0 12px;
}
.shares-placeholder p {
    color: #85857f;
    font-size: 13px;
    line-height: 1.7;
    margin: 0;
}
@media (max-width: 680px) {
    .shares-placeholder { padding: 42px 22px; }
}
/* Treasury wallet cards */
.treasury-wallet-panel {
    padding: 24px;
    margin-bottom: 16px;
}
.treasury-wallet-panel h2 {
    margin: 0 0 16px;
}
.treasury-wallet-address {
    margin: 0 0 16px;
    overflow-wrap: anywhere;
}
.treasury-wallet-panel form {
    margin: 0;
}
@media (max-width: 680px) {
    .treasury-wallet-panel { padding: 16px; }
}
/* Явное подтверждение смены адреса: красная зона повышенного риска. */
.wallet-rotation-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 12px;
    border: 1px solid #e8a2a2;
    border-radius: 8px;
    background: #fff3f3;
    color: #991b1b;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}
.wallet-rotation-trigger:hover { background: #ffe4e4; }
.wallet-rotation-trigger:focus-visible,
.wallet-rotation-dialog button:focus-visible,
.wallet-rotation-acknowledgement input:focus-visible {
    outline: 3px solid #b91c1c;
    outline-offset: 3px;
}
.wallet-rotation-dialog {
    width: min(540px, calc(100vw - 24px));
    max-height: min(90vh, 800px);
    overflow-y: auto;
    padding: 28px;
    border: 2px solid #dc2626;
    border-radius: 16px;
    background: #fff;
    color: #252525;
    box-shadow: 0 25px 80px rgb(0 0 0 / 24%);
}
.wallet-rotation-dialog::backdrop { background: rgb(27 12 12 / 70%); }
.wallet-rotation-alert { display: flex; gap: 14px; align-items: flex-start; }
.wallet-rotation-symbol { font-size: 35px; line-height: 1; }
.wallet-rotation-kicker {
    color: #b91c1c;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .07em;
}
.wallet-rotation-dialog h2 {
    margin: 6px 0 12px;
    color: #991b1b;
    font-size: 20px;
    line-height: 1.3;
}
.wallet-rotation-dialog p { font-size: 13px; line-height: 1.6; }
.wallet-rotation-consequences {
    padding: 16px 20px 16px 36px;
    border: 1px solid #f3b9b9;
    border-radius: 10px;
    background: #fff1f1;
    color: #7f1d1d;
    font-size: 12px;
    line-height: 1.65;
}
.wallet-rotation-consequences li + li { margin-top: 10px; }
.wallet-rotation-acknowledgement {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    margin: 19px 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    cursor: pointer;
}
.wallet-rotation-acknowledgement input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    accent-color: #b91c1c;
    margin: 1px 0 0;
}
.wallet-rotation-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.wallet-rotation-actions button { border-radius: 8px; padding: 11px 14px; font-size: 12px; font-weight: 750; cursor: pointer; }
.wallet-rotation-cancel { border: 1px solid #d7d7d7; background: #f5f5f5; color: #333; }
.wallet-rotation-cancel:hover { background: #eaeaea; }
.wallet-rotation-danger-button { border: 1px solid #991b1b; background: #b91c1c; color: white; }
.wallet-rotation-danger-button:hover { background: #991b1b; }
@media (max-width: 680px) {
    .wallet-rotation-dialog { padding: 19px; }
    .wallet-rotation-actions button { flex: 1 1 100%; }
}
/* Подтверждённые on-chain балансы холодных кошельков. */
.treasury-wallet-balances {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}
.treasury-balance {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 17px;
    border: 1px solid #e7e9e2;
    border-radius: 10px;
    background: #f9faf7;
    overflow-wrap: anywhere;
}
.treasury-balance-label { color: #6c7367; font-weight: 650; font-size: 11px; }
.treasury-balance strong { color: #222b1c; font-size: 17px; font-variant-numeric: tabular-nums; }
.treasury-balance-meta { margin: 0 0 18px; font-size: 11px; color: #81887d; }
/* Приветственная страница до подачи заявки. Текст не создаёт запись пользователя. */
.welcome-article {
    width: min(100%, 940px);
    margin: 10px auto 60px;
    overflow: visible;
}
.welcome-content { padding: clamp(28px, 5.2vw, 65px); }
.welcome-content > h1 {
    font-size: clamp(28px, 3.6vw, 42px);
    line-height: 1.16;
    letter-spacing: -.038em;
    margin: 10px 0 30px;
    color: #242923;
}
.welcome-content > p {
    margin: 0 0 22px;
    font-size: clamp(14px, 1.4vw, 16px);
    line-height: 1.85;
    color: #42493f;
}
.welcome-content sup, .welcome-footnotes sup {
    font-size: .7em;
    line-height: 0;
    vertical-align: super;
    font-weight: 750;
    color: #56754d;
}
.welcome-chart-slot {
    margin: 30px 0 34px;
    padding: clamp(15px, 2.7vw, 25px);
    border: 1px solid #e0e7d8;
    border-radius: 13px;
    background: linear-gradient(180deg, #fbfcf9 0%, #f5f8f1 100%);
}
.welcome-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 13px 24px;
}
.welcome-chart-eyebrow {
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .12em;
    color: #7a886d;
}
.welcome-chart-header h2 {
    margin: 7px 0 3px;
    font-size: clamp(18px, 2vw, 22px);
    letter-spacing: -.025em;
    color: #252f24;
}
.welcome-chart-header p {
    margin: 0;
    font-size: 12px;
    color: #778270;
}
.welcome-chart-current {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    font-variant-numeric: tabular-nums;
}
.welcome-chart-current-label {
    color: #849079;
    font-size: 11px;
}
.welcome-chart-current strong {
    color: #283b28;
    font-size: clamp(23px, 3vw, 30px);
    letter-spacing: -.045em;
    white-space: nowrap;
}
.welcome-chart-change {
    min-height: 17px;
    color: #427c51;
    font-size: 12px;
    font-weight: 700;
}
.welcome-chart-change.is-negative { color: #b24e4e; }
.welcome-chart-periods {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 14px;
}
.welcome-chart-periods button {
    padding: 6px 12px;
    color: #75836f;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}
.welcome-chart-periods button:hover { background: #eaf0e4; }
.welcome-chart-periods button[aria-pressed="true"] {
    background: #e4ecdf;
    border-color: #d2e1cd;
    color: #416448;
}
.welcome-chart-periods button:focus-visible {
    outline: 2px solid #58996a;
    outline-offset: 2px;
}
.welcome-chart-canvas { width: 100%; height: clamp(240px, 33vw, 345px); }
.welcome-chart-status {
    margin: -2px 0 15px;
    text-align: center;
    color: #75806f;
    font-size: 12px;
}
.welcome-chart-status[hidden] { display: none; }
.welcome-chart-disclaimer {
    margin: 9px 0 0;
    color: #8a9285;
    font-size: 11px;
    line-height: 1.55;
}
.welcome-content > .welcome-final {
    margin: 32px 0 25px;
    font-size: clamp(17px, 1.7vw, 20px);
    font-weight: 750;
    line-height: 1.5;
    color: #232923;
}
.welcome-apply-form { display: flex; margin: 0 0 12px; }
.welcome-apply-button {
    width: 100%;
    background: #198754;
    color: #fff;
    border: 1px solid #146c43;
    border-radius: 12px;
    padding: 21px 24px;
    font-family: inherit;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.3;
    font-weight: 760;
    cursor: pointer;
    box-shadow: 0 6px 16px rgb(25 135 84 / 14%);
    transition: background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.welcome-apply-button:hover { background: #146c43; box-shadow: 0 8px 20px rgb(25 135 84 / 20%); }
.welcome-apply-button:active { transform: translateY(1px); }
.welcome-apply-button:focus-visible { outline: 3px solid #96e3b8; outline-offset: 3px; }
.welcome-content > .welcome-error { color: #a02020; font-weight: 650; }
.welcome-footnotes {
    border-top: 1px solid #e7e9e3;
    margin-top: 42px;
    padding-top: 24px;
}
.welcome-footnotes h2 {
    font-size: 12px;
    font-weight: 750;
    line-height: 1.65;
    color: #6f7569;
    margin: 0 0 18px;
}
.welcome-footnotes p {
    color: #858b80;
    font-size: 11px;
    line-height: 1.8;
    margin: 0 0 14px;
}
@media (max-width: 680px) {
    .welcome-article { margin: 0 auto 24px; }
    .welcome-content { padding: 24px 19px 29px; }
    .welcome-content > h1 { margin-bottom: 22px; }
    .welcome-content > p { line-height: 1.75; }
    .welcome-apply-button { padding: 18px 13px; }
    .welcome-chart-slot { margin: 20px 0 25px; }
    .welcome-chart-current { align-items: flex-start; }
    .welcome-chart-periods { justify-content: flex-start; }
    .welcome-chart-periods button { padding: 7px 11px; }
}
@media (prefers-reduced-motion: reduce) {
    .welcome-apply-button { transition: none; }
}


/* Стоимость фонда в кабинете Господина Управляющего */
.nav-live-panel {
    padding: 30px 32px 26px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.nav-live-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.nav-live-header h2 {
    margin: 0;
    font-size: 19px;
    line-height: 1.3;
    font-weight: 730;
}
.nav-live-header form { flex-shrink: 0; }
.nav-calculate-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 44px;
    padding: 11px 20px;
    border: 0;
    border-radius: 10px;
    background: #176a43;
    color: white;
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    transition: background .15s ease;
}
.nav-calculate-button:hover { background: #125637; }
.nav-calculate-button:disabled { opacity: .62; cursor: progress; }
.nav-calculate-button:focus-visible { outline: 3px solid #a1debd; outline-offset: 3px; }
.nav-live-result { margin-top: 24px; padding-top: 24px; border-top: 1px solid #edf0e9; }
.nav-live-highlights {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.nav-live-highlight {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px 25px;
    background: #f5f8f3;
    border: 1px solid #edf0e8;
    border-radius: 12px;
}
.nav-live-highlight-price { background: #fafaf8; }
.nav-live-highlight > span, .nav-live-metric > span {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    color: #7b8177;
}
.nav-live-highlight strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: clamp(25px, 3vw, 36px);
    font-weight: 720;
    letter-spacing: -.035em;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    color: #1a4934;
}
.nav-live-highlight strong small {
    font-size: .48em;
    font-weight: 600;
    letter-spacing: 0;
    color: #718477;
}
.nav-live-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    padding: 27px 4px 25px;
}
.nav-live-metric {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.nav-live-metric strong {
    font-size: 16px;
    line-height: 1.35;
    font-weight: 650;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
    color: #2a3029;
}
.nav-live-footer {
    border-top: 1px solid #edf0e9;
    padding-top: 17px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    color: #7b8177;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}
.nav-live-check { color: #8c755e; font-weight: 600; }
.nav-live-check-ok { color: #2a7851; }
.nav-live-empty { padding: 32px 4px 9px; margin: 0; color: #82877e; font-size: 13px; }
.nav-live-error {
    padding: 12px 16px;
    margin: 16px 0 0;
    background: #fff5f4;
    border: 1px solid #f3dcd8;
    border-radius: 9px;
    color: #9e3730;
    font-size: 13px;
    font-weight: 550;
}
@media (max-width: 1100px) {
    .nav-live-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
    .nav-live-panel { padding: 22px 20px 20px; }
    .nav-live-header { align-items: stretch; flex-direction: column; gap: 18px; }
    .nav-live-header form, .nav-calculate-button { width: 100%; }
    .nav-live-highlights { grid-template-columns: 1fr; }
    .nav-live-highlight { padding: 20px; }
    .nav-live-metrics { padding: 24px 2px; gap: 24px 12px; }
    .nav-live-metric strong { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .nav-calculate-button { transition: none; } }

/* Три графика управляющего, в общей сетке и стиле диаграммы приглашения. */
.manager-charts { margin-top: 26px; }
.manager-charts-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 17px;
}
.manager-charts-top h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 730;
    color: #263028;
}
.manager-charts-periods { display: flex; align-items: center; gap: 5px; }
.manager-charts-periods button {
    padding: 7px 13px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 7px;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    color: #75836f;
    cursor: pointer;
}
.manager-charts-periods button:hover { background: #eaf0e4; }
.manager-charts-periods button[aria-pressed="true"] {
    color: #416448;
    border-color: #d2e1cd;
    background: #e4ecdf;
}
.manager-charts-periods button:focus-visible { outline: 2px solid #58996a; outline-offset: 2px; }
.manager-charts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}
.manager-chart-card {
    min-width: 0;
    padding: 23px 26px 17px;
    background: linear-gradient(180deg, #fbfcf9 0%, #f6f8f2 100%);
    border: 1px solid #e0e7d8;
    border-radius: 13px;
}
.manager-chart-card-wide { grid-column: 1 / -1; }
.manager-chart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 24px;
}
.manager-chart-header h3 {
    font-size: 18px;
    line-height: 1.35;
    color: #252f24;
    letter-spacing: -.02em;
    font-weight: 690;
    margin: 0 0 5px;
}
.manager-chart-header p { font-size: 12px; color: #778270; margin: 0; }
.manager-chart-header strong {
    font-size: clamp(20px, 2.3vw, 27px);
    letter-spacing: -.035em;
    font-variant-numeric: tabular-nums;
    color: #283b28;
    overflow-wrap: anywhere;
}
.manager-chart-canvas { width: 100%; height: 290px; margin-top: 12px; }
.manager-chart-card-wide .manager-chart-canvas { height: 340px; }
.manager-charts-status { margin: 12px 0 0; color: #75806f; font-size: 12px; }
.manager-charts-status[hidden] { display: none; }
@media (max-width: 940px) {
    .manager-charts-grid { grid-template-columns: 1fr; }
    .manager-chart-card-wide { grid-column: auto; }
}
@media (max-width: 680px) {
    .manager-chart-card { padding: 19px 17px 10px; }
    .manager-chart-header strong { font-size: 21px; }
    .manager-chart-canvas, .manager-chart-card-wide .manager-chart-canvas { height: 270px; }
}

/* Read-only investor dashboard */
.investor-portfolio-summary { padding: 28px 32px 24px; }
.investor-portfolio-heading {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: center; gap: 14px; margin-bottom: 20px;
}
.investor-portfolio-heading h2 { font-size: 20px; margin: 0; }
.investor-portfolio-heading span { font-size: 12px; color: #7c8776; }
.investor-portfolio-metrics {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
}
.investor-portfolio-metric {
  display: flex; flex-direction: column; gap: 10px;
  min-width: 0; padding: 22px 20px;
  background: #f8faf6; border: 1px solid #e6ede1; border-radius: 12px;
}
.investor-portfolio-value { background: #f2f7f0; }
.investor-portfolio-metric > span { color: #778276; font-size: 12px; }
.investor-portfolio-metric strong {
  color: #1b4631; font-size: clamp(20px, 2.7vw, 30px); font-weight: 720;
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.investor-portfolio-metric small { font-size: .56em; color: #718477; }
.investor-portfolio-footnote {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: 8px 22px; margin-top: 20px; color: #818a7d; font-size: 12px;
}
.investor-portfolio-history { margin-top: 28px; }
.investor-portfolio-history-top {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: center; gap: 16px; margin-bottom: 17px;
}
.investor-portfolio-history-top h2 { font-size: 20px; margin: 0; }
.investor-portfolio-chart { padding: 25px 26px 16px; }
.investor-portfolio-chart .manager-chart-canvas { height: 345px; }
.investor-portfolio-legend { display: flex; gap: 22px; color: #697a6d; font-size: 12px; }
.investor-portfolio-legend span { display: inline-flex; gap: 7px; align-items: center; }
.investor-legend-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.investor-legend-issue { background: #2b976b; }
.investor-legend-redeem { background: #c45e55; }
.investor-portfolio-operations { margin-top: 20px; padding: 23px 27px; }
.investor-portfolio-operations h3 { margin: 0 0 13px; font-size: 16px; }
.investor-event-list { display: flex; flex-direction: column; font-size: 13px; color: #7b8579; }
.investor-event {
  display: grid; grid-template-columns: minmax(65px,.7fr) 1.3fr 1fr .8fr;
  gap: 12px; align-items: center; padding: 12px 1px;
  border-top: 1px solid #edf0eb; color: #586c5c;
}
.investor-event strong { color: #283b28; font-variant-numeric: tabular-nums; }
.investor-event-in { color: #2b976b; font-weight: 700; }
.investor-event-out { color: #c45e55; font-weight: 700; }
.investor-portfolio-unavailable { padding: 24px; font-size: 13px; color: #a02020; }
@media (max-width: 900px) { .investor-portfolio-metrics { grid-template-columns: 1fr; } }
@media (max-width: 650px) {
  .investor-portfolio-summary { padding: 21px 18px; }
  .investor-portfolio-chart { padding: 20px 15px 14px; }
  .investor-portfolio-operations { padding: 20px 16px; }
  .investor-event { grid-template-columns: repeat(2,minmax(0,1fr)); }
}


/* Финансы инвестора: сетка адреса и форм, таблицы операций. */
.finance-notice { padding: 13px 17px; border-radius: 9px; font-size: 13px; line-height: 1.55; margin-bottom: 16px; }
.finance-warning { background: #fff7ed; color: #86521f; border: 1px solid #f0d7b3; }
.finance-error { background: #fff2f2; color: #a33434; border: 1px solid #edc6c6; }
.finance-ok { background: #eef8f1; color: #286848; border: 1px solid #cde5d3; }
.finance-unavailable { padding: 24px; color: #9b3333; }
.finance-wallet, .finance-orders { padding: 28px 32px; }
.finance-section-header {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 10px 20px; margin-bottom: 22px;
}
.finance-section-header h2, .finance-orders h2 { margin: 0; font-size: 20px; color: #26352a; }
.finance-section-header p { margin: 5px 0 0; color: #798576; font-size: 13px; }
.finance-section-header > span, .finance-network { font-size: 12px; font-weight: 650; color: #4e7257; }
.finance-wallet-body {
    display: grid; grid-template-columns: minmax(0,1fr) 198px;
    gap: 28px; align-items: start;
}
.finance-wallet-information { min-width: 0; }
.finance-label, .finance-action-card label { display: block; color: #6b7b6d; font-size: 12px; margin-bottom: 10px; }
.finance-wallet-address {
    display: block; font-size: 15px; letter-spacing: .01em;
    padding: 16px 18px; border-radius: 10px; background: #f4f7f1;
    border: 1px solid #e1e8da; color: #1e4934; overflow-wrap: anywhere;
    user-select: all; margin-bottom: 13px;
}
.finance-wallet-qr {
    padding: 16px 14px; border-radius: 12px; border: 1px solid #e0e9db;
    background: #fff; display: grid; justify-items: center; gap: 10px;
}
.finance-wallet-qr svg { display: block; max-width: 100%; width: 160px; height: auto; }
.finance-wallet-qr > span { color: #788475; font-size: 11px; }
.finance-secondary-button, .finance-primary-button {
    font: inherit; font-size: 13px; font-weight: 650; border-radius: 9px; cursor: pointer;
}
.finance-secondary-button {
    background: #f0f5ec; border: 1px solid #d8e6d2; color: #2a6846;
    padding: 10px 15px; margin-bottom: 23px;
}
.finance-primary-button {
    width: 100%; background: #176a43; color: white; border: none; padding: 13px 18px;
    min-height: 43px; margin-top: 16px;
}
.finance-primary-button:hover { background: #125735; }
.finance-primary-button:disabled { opacity: .48; cursor: not-allowed; }
.finance-secondary-button:focus-visible, .finance-primary-button:focus-visible {
    outline: 2px solid #509768; outline-offset: 2px;
}
.finance-action-grid {
    display: grid; grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 22px; margin-top: 22px;
}
.finance-action-card { padding: 27px 29px; min-width: 0; }
.finance-action-card h2 { margin: 0 0 10px; font-size: 19px; color: #28402f; }
.finance-action-card > p { color: #6e7b6e; font-size: 13px; line-height: 1.65; min-height: 66px; }
.finance-action-card form { display: grid; gap: 6px; margin-top: 18px; }
.finance-action-card input {
    display: block; width: 100%; min-width: 0; min-height: 44px; box-sizing: border-box;
    background: #fcfdfb; border: 1px solid #d6e0d1; border-radius: 9px;
    padding: 10px 14px; color: #223b29; font: inherit;
}
.finance-input-suffix { position: relative; }
.finance-input-suffix input { padding-right: 70px; }
.finance-input-suffix span { position: absolute; right: 14px; top: 12px; color: #778777; font-size: 12px; }
.finance-available { font-size: 12px; color: #7b8578; margin: 0 0 15px; }
.finance-action-footnote { min-height: 0 !important; margin: 11px 0 0; font-size: 11px !important; }
.finance-orders { margin-top: 22px; }
.finance-orders h2 { margin-bottom: 18px; }
.finance-table-scroll { width: 100%; overflow-x: auto; }
.finance-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.finance-table th, .finance-table td { padding: 14px 12px; text-align: left; border-bottom: 1px solid #e8eee6; }
.finance-table th { color: #768373; font-size: 12px; font-weight: 650; white-space: nowrap; background: #f7f9f5; }
.finance-table td { color: #35483a; font-variant-numeric: tabular-nums; }
.finance-table td:first-child { white-space: nowrap; }
.finance-positive { color: #267649 !important; }
.finance-negative { color: #b64e4e !important; }
.finance-empty, .finance-disclaimer { color: #7a8578; font-size: 13px; }
.finance-disclaimer { line-height: 1.65; margin: 15px 3px 0; }
@media (max-width: 950px) {
    .finance-action-grid, .finance-wallet-body { grid-template-columns: 1fr; }
    .finance-wallet-qr { max-width: 200px; }
}
@media (max-width: 650px) {
    .finance-wallet, .finance-orders, .finance-action-card { padding: 22px 19px; }
    .finance-wallet-address { font-size: 12px; }
}

/* Публичные адреса и on-chain остатки в списке пользователей Управляющего. */
.users-table { min-width: 1190px; }
.users-table .wallet-cell { min-width: 350px; width: 350px; }
.directory-wallet-address {
    display: block; font: 12px/1.5 Consolas, "Cascadia Code", monospace;
    color: #2c5037; white-space: nowrap;
    letter-spacing: -.025em; margin-bottom: 13px; user-select: all;
}
.directory-wallet-balances {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px; margin-bottom: 9px;
}
.directory-wallet-balance {
    min-width: 0; display: flex; flex-direction: column; gap: 4px;
    background: #f5f8f3; border: 1px solid #e5ece0;
    border-radius: 8px; padding: 10px 12px;
}
.directory-wallet-balance span {
    color: #7a8678; font-size: 11px; font-weight: 650;
}
.directory-wallet-balance strong {
    color: #26432e; font-size: 13px; font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere; font-weight: 700;
}
.directory-wallet-observed { font-size: 11px; color: #838c80; margin-bottom: 11px; }
.users-table .wallet-cell .wallet-rotation-trigger { margin-top: 7px; }
/* Более свободные карточки системных кошельков в Казначействе. */
.treasury-wallet-panel { padding: 30px 33px; }
.treasury-wallet-balances {
    grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 24px 0;
}
.treasury-balance { padding: 22px 24px; gap: 10px; }
.treasury-balance strong { font-size: 22px; }
.treasury-balance-meta { margin: 0; }
.treasury-wallet-address {
    font: 14px/1.6 Consolas, "Cascadia Code", monospace;
    color: #244c34; background: #f5f8f3;
    padding: 14px 17px; border-radius: 9px; user-select: all;
}
@media (max-width: 900px) {
    .treasury-wallet-balances { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
    .treasury-wallet-panel { padding: 22px 18px; }
    .treasury-balance { padding: 18px; }
}


/* Балансы личного кошелька в Финансах и ссылки на USDT Transfer. */
.finance-wallet-balances {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px; margin: 0 0 23px;
}
.finance-wallet-balance {
    min-width: 0; display: flex; flex-direction: column; gap: 7px;
    padding: 18px 21px; border: 1px solid #e0e9db;
    border-radius: 11px; background: #f5f8f3;
}
.finance-wallet-balance > span { font-size: 12px; font-weight: 650; color: #6a7c70; }
.finance-wallet-balance > strong {
    font-size: clamp(20px, 2.1vw, 28px); line-height: 1.3;
    font-variant-numeric: tabular-nums; color: #1b4932; overflow-wrap: anywhere;
}
.finance-wallet-balance > small { font-size: 11px; color: #7c887e; }
.finance-wallet-counterparty {
    font-size: 11px; color: #375345; overflow-wrap: anywhere;
}
.finance-tx-link { color: #176a43; white-space: nowrap; }
.finance-tx-link:hover { color: #104f32; text-decoration: underline; }
@media (max-width: 650px) {
    .finance-wallet-balances { grid-template-columns: 1fr; }
}
