* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--tg-bg,#f6f7fb);
    font-family: system-ui,-apple-system,"Segoe UI",sans-serif;
    color: #17212b
}

button, input {
    font: inherit
}

button {
    cursor: pointer
}

.shell {
    max-width: 740px;
    margin: 0 auto;
    padding: 16px 12px 70px
}

    .shell header h1 {
        margin: 2px 0;
        font-size: 25px
    }

    .shell header small, .card small {
        color: #697786
    }

.tabs {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 5px;
    margin: 18px 0
}

    .tabs button {
        border: 0;
        background: #dfe7f0;
        padding: 12px 3px;
        border-radius: 12px
    }

    .tabs .active, .primary {
        background: var(--tg-accent,#2481cc) !important;
        color: #fff !important
    }

.card {
    background: white;
    padding: 18px;
    border-radius: 16px;
    margin: 12px 0;
    box-shadow: 0 2px 12px #00000008
}

    .card h2 {
        font-size: 16px;
        margin: 0 0 12px
    }

.big {
    font-size: 28px;
    font-weight: 700
}

.line {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin: 12px 0
}

    .line b {
        text-align: right
    }

.address {
    word-break: break-all;
    font-size: 12px;
    background: #edf1f7;
    padding: 12px;
    border-radius: 9px
}

.primary {
    border: 0;
    border-radius: 12px;
    padding: 13px;
    width: 100%;
    margin-top: 9px
}

.fields {
    display: grid;
    gap: 10px
}

    .fields label {
        display: grid;
        gap: 6px
    }

    .fields input {
        border: 1px solid #cad4df;
        padding: 11px;
        border-radius: 10px;
        min-width: 0
    }

.warning, .notice {
    border-radius: 12px;
    padding: 12px;
    background: #ffebe2
}

.notice {
    background: #e4f1ff
}

.order {
    border-top: 1px solid #e6ebf0;
    padding: 14px 0
}

    .order small {
        display: block;
        margin: 5px 0
    }

.order .order-cancel-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    margin-top: 8px;
    padding: 7px 12px;
    border: 0;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
}

.order .order-cancel-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.tablewrap {
    overflow-x: auto
}

table {
    border-collapse: collapse;
    width: 100%;
    font-size: 13px;
    white-space: nowrap
}

td, th {
    padding: 9px 7px;
    border-bottom: 1px solid #edf0f5;
    text-align: left
}

#blazor-error-ui {
    display: none
}

.shell .motto {
    margin: 3px 0 5px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .07em;
    color: var(--tg-accent,#2481cc)
}

.chart {
    display: block;
    width: 100%;
    max-height: 190px
}

.chart-grid {
    stroke: #e4e9f0;
    stroke-width: 1
}

.chart-label {
    color: #64748b;
    font-size: 10px;
    font-family: system-ui,sans-serif;
    text-align: right;
    white-space: nowrap
}

.chart-line {
    fill: none;
    stroke: #2481cc;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round
}

.manager-dashboard .manager-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 18px 0 12px
}

.manager-section-header h2 {
    font-size: 18px;
    margin: 0
}

.manager-periods {
    display: flex;
    gap: 4px
}

    .manager-periods button {
        border: 0;
        border-radius: 9px;
        padding: 8px 10px;
        background: transparent;
        color: #597365;
        font-size: 12px;
        font-weight: 700
    }

        .manager-periods button.active {
            background: #e0eddf;
            color: #215b39
        }

.manager-chart {
    padding: 17px 14px
}

.manager-chart-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px
}

    .manager-chart-heading h2 {
        margin: 0 0 4px;
        font-size: 14px;
        line-height: 1.3
    }

.manager-chart-value {
    color: #15452f;
    font-size: 19px;
    white-space: nowrap
}

.manager-chart-svg {
    display: block;
    width: 100%;
    height: auto;
    max-height: 240px;
    margin: 14px 0 0
}

.manager-chart-area {
    fill: #438259;
    fill-opacity: .12
}

.manager-chart-line {
    fill: none;
    stroke: #438259;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round
}

.manager-chart-dates {
    display: flex;
    justify-content: space-between;
    padding: 0 10px 0 58px;
    font-size: 10px;
    color: #718476
}

.manager-nav-title {
    margin-bottom: 14px
}

    .manager-nav-title h2 {
        margin-bottom: 4px
    }

.manager-nav-highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px
}

.manager-nav-highlight {
    background: #f2f7f1;
    border-radius: 12px;
    padding: 12px 10px;
    min-width: 0
}

    .manager-nav-highlight small {
        display: block;
        font-size: 11px
    }

    .manager-nav-highlight strong {
        display: block;
        font-size: 19px;
        color: #15452f;
        margin-top: 7px;
        word-break: break-word
    }

.manager-nav-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 14px;
    row-gap: 16px;
    margin: 20px 0
}

    .manager-nav-metrics small {
        display: block;
        margin-bottom: 6px;
        font-size: 11px
    }

    .manager-nav-metrics b {
        font-size: 14px
    }

.manager-nav-footer {
    border-top: 1px solid #e1e9e0;
    padding-top: 12px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap
}

.manager-verified {
    color: #16804d !important
}

.manager-estimated {
    color: #8b6a24 !important
}

@media(max-width:410px) {
    .manager-chart-heading {
        flex-wrap: wrap
    }

    .manager-chart-value {
        font-size: 17px
    }

    .manager-periods button {
        padding: 8px 7px
    }

    .manager-nav-highlight strong {
        font-size: 16px
    }
}

.welcome h2 { font-size: 23px; margin: 12px 0 18px; }
.welcome p { line-height: 1.62; margin: 17px 0; }
.welcome .welcome-final { font-weight: 700; }
.welcome-footnotes { border-top: 1px solid #e1e8e5; margin-top: 25px; padding-top: 13px; }
.welcome-footnotes h3 { font-size: 14px; }
.welcome-footnotes p { font-size: 12px; }
.welcome button:disabled { opacity: 0.6; cursor: wait; }

.welcome-chart { margin: 22px 0; padding: 13px 10px; border: 1px solid #e0e9e2; border-radius: 13px; background: #f8faf8; }
.welcome-chart h3 { margin: 2px 0 5px; font-size: 17px; }
.welcome-chart-price { display:flex; gap:8px; align-items:baseline; margin:12px 0; flex-wrap:wrap; }
.welcome-chart-price strong { font-size:20px; color:#164b31; }
.welcome-chart-up { color:#16804d; }
.welcome-chart-down { color:#b42318; }
.welcome-chart-periods { display:grid; grid-template-columns:repeat(4,1fr); gap:5px; margin:12px 0; }
.welcome-chart-periods button { border:1px solid #dce6df; background:white; border-radius:9px; padding:8px 2px; }
.welcome-chart-periods button.active { background:#dcebe2; border-color:#93b7a0; font-weight:700; }
.welcome-chart-svg { width:100%; display:block; overflow:visible; }
.welcome-chart-dates { display:flex; justify-content:space-between; margin-left:54px; }

/* Инструкция для первого пополнения, по умолчанию свёрнута. */
.deposit-instruction { padding: 0; overflow: hidden; }
.deposit-instruction-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    list-style: none;
    padding: 18px;
    font-size: 16px;
    font-weight: 700;
}
.deposit-instruction-toggle::-webkit-details-marker { display: none; }
.deposit-instruction-chevron {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .15s ease;
    flex-shrink: 0;
}
.deposit-instruction[open] .deposit-instruction-chevron {
    transform: rotate(225deg);
}
.deposit-instruction-content { padding: 0 18px 18px; }
/* Walt: пошаговая инструкция первого пополнения. */
.deposit-guide {
    max-width: 100%;
    line-height: 1.55;
}
.deposit-guide p {
    margin: 10px 0 16px;
}
.deposit-guide-step {
    padding: 14px 0 22px;
    border-top: 1px solid #dfe8e1;
}
.deposit-guide-step h3 {
    margin: 0 0 10px;
    font-size: 17px;
    line-height: 1.4;
}
.deposit-guide-step img {
    display: block;
    width: auto;
    max-width: min(100%, 360px);
    height: auto;
    margin: 12px auto 0;
    border: 1px solid #e3e6e3;
    border-radius: 12px;
}
.deposit-guide-danger {
    padding: 13px;
    border-left: 4px solid #b54f39;
    background: #fff5ef;
    border-radius: 7px;
}
.deposit-guide-final {
    margin: 18px 0 0;
    border-top: 1px solid #dfe8e1;
    padding-top: 18px;
}
.deposit-guide-copy {
    display: block;
    width: 100%;
    padding: 11px 15px;
    border: 1px solid #aec8b5;
    background: #eef6ef;
    color: #204a32;
    border-radius: 9px;
    font-weight: 700;
    cursor: pointer;
}

/* Один футер для гостя, инвестора и Господина Управляющего. */
.miniapp-site-footer {
    max-width: 740px;
    margin: -42px auto 24px;
    padding: 18px 16px 22px;
    text-align: center;
    border-top: 1px solid #dce2e9;
}
.miniapp-site-footer p {
    margin: 0 0 9px;
    font-size: 12px;
    line-height: 1.5;
    color: #697786;
}
.miniapp-site-footer a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    color: #236b52;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.miniapp-site-footer a:focus-visible {
    outline: 2px solid #236b52;
    outline-offset: 4px;
    border-radius: 4px;
}