.account-tools {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    pointer-events: auto;
}

.site-header > .account-tools {
    position: absolute;
    top: 4.45vh;
    right: 2.9vw;
}

.account-balance-box {
    display: flex;
    width: 245px;
    height: 64px;
    align-items: center;
    justify-content: space-between;
    padding: 0 13px 0 16px;
    border: 1px solid rgba(35,35,35, 0.16);
    border-radius: 10px;
    background: rgba(246,246,246, 0.72);
    backdrop-filter: blur(15px);
}

.account-balance-box > a {
    display: grid;
    min-width: 0;
    gap: 5px;
    color: #232323;
    text-decoration: none;
}

.account-balance-box strong {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.account-balance-box small {
    color: #4f4f4f;
    font-size: 10px;
}

.account-plus {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border: 0;
    border-radius: 8px;
    color: #ed1532;
    background: rgba(186, 11, 33, 0.42);
    cursor: pointer;
    font-size: 27px;
    font-weight: 300;
    line-height: 1;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.account-plus:hover {
    color: #232323;
    background: #e3132d;
    transform: translateY(-1px);
}

.account-profile-button {
    display: flex;
    width: 160px;
    height: 64px;
    align-items: center;
    justify-content: center;
    gap: 13px;
    border: 1px solid rgba(35,35,35, 0.16);
    border-radius: 10px;
    color: #232323;
    background: rgba(246,246,246, 0.72);
    cursor: pointer;
    font-size: 16px;
    backdrop-filter: blur(15px);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.account-profile-button:hover,
.account-profile-button[aria-expanded="true"] {
    border-color: rgba(227, 19, 45, 0.5);
    background: rgba(242,242,242, 0.9);
}

.account-profile-button svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.3;
}

.account-profile-popover {
    position: absolute;
    z-index: 85;
    top: 76px;
    right: 0;
    display: grid;
    gap: 7px;
    width: 238px;
    padding: 19px;
    border: 1px solid rgba(35,35,35, 0.14);
    border-radius: 10px;
    background: rgba(246,246,246, 0.97);
    box-shadow: 0 22px 60px rgba(250,250,250, 0.46);
    backdrop-filter: blur(17px);
}

.account-profile-popover[hidden] {
    display: none;
}

.account-profile-popover > strong {
    overflow: hidden;
    font-size: 15px;
    font-weight: 500;
    text-overflow: ellipsis;
}

.account-profile-popover > span {
    margin-bottom: 8px;
    color: #555555;
    font-size: 10px;
}

.account-profile-popover > a {
    min-height: 34px;
    padding: 10px 11px;
    border-radius: 6px;
    color: #3f3f3f;
    background: rgba(35,35,35, 0.025);
    font-size: 9px;
    text-decoration: none;
}

.account-profile-popover > a:hover {
    color: #232323;
    background: rgba(35,35,35, 0.05);
}

.account-profile-popover form {
    margin-top: 4px;
}

.account-profile-popover form button {
    width: 100%;
    height: 37px;
    border: 1px solid rgba(227, 19, 45, 0.44);
    border-radius: 6px;
    color: #ef3048;
    background: rgba(227, 19, 45, 0.07);
    cursor: pointer;
    font-size: 9px;
}

.tariffs-dialog {
    width: min(1020px, calc(100% - 34px));
    max-height: min(860px, calc(100vh - 34px));
    padding: 0;
    overflow: auto;
    border: 1px solid rgba(35,35,35, 0.14);
    border-radius: 15px;
    color: #232323;
    background: #f4f4f4;
    box-shadow: 0 38px 110px rgba(250,250,250, 0.68);
}

.tariffs-dialog::backdrop {
    background: rgba(249,249,249, 0.82);
    backdrop-filter: blur(7px);
}

.tariffs-shell {
    padding: 30px;
}

.tariffs-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 23px;
    border-bottom: 1px solid rgba(35,35,35, 0.09);
}

.tariffs-heading > span {
    display: grid;
    gap: 7px;
}

.tariffs-heading small {
    color: #ed1532;
    font-size: 9px;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.tariffs-heading strong {
    font-size: clamp(24px, 3vw, 35px);
    font-weight: 400;
    letter-spacing: -0.035em;
}

.tariffs-heading em {
    color: #535353;
    font-size: 11px;
    font-style: normal;
    line-height: 1.55;
}

.tariffs-heading > button {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(35,35,35, 0.11);
    border-radius: 8px;
    color: #494949;
    background: transparent;
    cursor: pointer;
    font-size: 24px;
    font-weight: 300;
}

.tariffs-tabs {
    display: flex;
    gap: 5px;
    margin: 24px 0 20px;
    padding: 4px;
    border: 1px solid rgba(35,35,35, 0.085);
    border-radius: 9px;
    background: rgba(35,35,35, 0.018);
}

.tariffs-tabs button {
    min-height: 41px;
    flex: 1;
    border: 0;
    border-radius: 6px;
    color: #545454;
    background: transparent;
    cursor: pointer;
    font-size: 10px;
}

.tariffs-tabs button.is-active {
    color: #232323;
    background: rgba(227, 19, 45, 0.14);
    box-shadow: inset 0 0 0 1px rgba(227, 19, 45, 0.32);
}

.tariffs-panel[hidden] {
    display: none;
}

.tariff-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.tariff-grid--transport {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tariff-card {
    display: flex;
    min-height: 283px;
    flex-direction: column;
    padding: 20px;
    border: 1px solid rgba(35,35,35, 0.09);
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(35,35,35, 0.026), rgba(35,35,35, 0.008));
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.tariff-card:hover {
    border-color: rgba(227, 19, 45, 0.3);
    transform: translateY(-2px);
}

.tariff-kind {
    color: #ed1532;
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.tariff-card h3 {
    margin: 14px 0 7px;
    font-size: 18px;
    font-weight: 500;
}

.tariff-card > p {
    min-height: 34px;
    margin: 0;
    color: #555555;
    font-size: 9px;
    line-height: 1.55;
}

.tariff-count {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 17px;
}

.tariff-count strong {
    color: #ed1532;
    font-size: 32px;
    font-weight: 400;
}

.tariff-count span,
.tariff-price small {
    color: #555555;
    font-size: 8px;
}

.tariff-price {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin: 8px 0 17px;
}

.tariff-price strong {
    font-size: 14px;
    font-weight: 500;
}

.tariff-card > button {
    width: 100%;
    height: 39px;
    margin-top: auto;
    border: 1px solid rgba(227, 19, 45, 0.48);
    border-radius: 7px;
    color: #232323;
    background: rgba(227, 19, 45, 0.12);
    cursor: pointer;
    font-size: 9px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.tariff-card > button:hover {
    border-color: #ed1532;
    background: #d7132d;
}

.tariff-card dl {
    display: grid;
    gap: 9px;
    margin: 18px 0;
}

.tariff-card dl div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(35,35,35, 0.07);
}

.tariff-card dt,
.tariff-card dd {
    margin: 0;
    font-size: 8px;
}

.tariff-card dt {
    color: #585858;
}

.tariff-card dd {
    color: #232323;
}

.tariff-empty {
    grid-column: 1 / -1;
    padding: 55px 20px;
    color: #575757;
    text-align: center;
}

.tariffs-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(35,35,35, 0.09);
}

.tariffs-footer > span {
    color: #5c5c5c;
    font-size: 8px;
}

.tariffs-footer a {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    color: #232323;
    font-size: 9px;
    text-decoration: none;
}

.tariffs-footer a b {
    color: #ed1532;
    font-size: 17px;
    font-weight: 300;
}

.account-toast {
    position: fixed;
    z-index: 150;
    right: 28px;
    bottom: 27px;
    display: flex;
    max-width: min(410px, calc(100% - 32px));
    min-height: 49px;
    align-items: center;
    padding: 11px 16px;
    border: 1px solid rgba(65, 194, 122, 0.32);
    border-radius: 9px;
    color: #232323;
    background: rgba(14, 53, 32, 0.97);
    box-shadow: 0 18px 55px rgba(250,250,250, 0.45);
    font-size: 10px;
    line-height: 1.45;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease;
}

.account-toast.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.account-toast.is-error {
    border-color: rgba(237, 21, 50, 0.38);
    color: #232323;
    background: rgba(73, 11, 22, 0.98);
}

@media (max-width: 900px) {
    .account-balance-box {
        width: 214px;
    }

    .account-profile-button {
        width: 142px;
    }

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

@media (max-width: 760px) {
    .site-header > .account-tools {
        top: 17px;
        right: 15px;
    }

    .account-tools {
        gap: 7px;
    }

    .account-balance-box {
        width: 184px;
        height: 52px;
        padding: 0 8px 0 11px;
        border-radius: 8px;
    }

    .account-balance-box strong {
        font-size: 11px;
    }

    .account-balance-box small {
        font-size: 8px;
    }

    .account-plus {
        width: 33px;
        height: 33px;
        font-size: 23px;
    }

    .account-profile-button {
        width: 52px;
        height: 52px;
        border-radius: 8px;
    }

    .account-profile-button span {
        display: none;
    }

    .account-profile-button svg {
        width: 25px;
        height: 25px;
    }

    .account-profile-popover {
        top: 62px;
    }

    .tariffs-shell {
        padding: 22px 16px;
    }
}

@media (max-width: 570px) {
    .account-balance-box {
        width: 158px;
    }

    .account-balance-box strong {
        font-size: 9px;
    }

    .tariff-grid,
    .tariff-grid--transport {
        grid-template-columns: 1fr;
    }

    .tariffs-tabs button {
        padding: 0 8px;
        font-size: 8px;
    }

    .tariffs-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 390px) {
    .site-header > .account-tools {
        right: 10px;
    }

    .account-balance-box {
        width: 145px;
    }

    .account-profile-button {
        width: 46px;
    }
}
