/* Главная личного кабинета (dashboard/pages/overview.php). Тёмная тема кабинета, акценты как в newHunter.css. */

.hmd {
    --hmd-card: rgba(30, 35, 38, 0.82);
    --hmd-inset: rgba(255, 255, 255, 0.05);
    --hmd-border: rgba(255, 255, 255, 0.08);
    --hmd-text: #E6ECE8;
    --hmd-muted: rgba(230, 236, 232, 0.62);
    --hmd-green: #87997E;
    --hmd-green-dark: #687B5B;
    --hmd-gold: #FFDA75;
    --hmd-amber: #FFA935;
    --hmd-blue: #6FB3D2;
    --hmd-red: #E8697A;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
    color: var(--hmd-text);
}

.hmd *,
.hmd *::before,
.hmd *::after {
    box-sizing: border-box;
}

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

.hmd h2,
.hmd h3 {
    margin: 0;
    color: #fff;
}

.hmd-card {
    background: var(--hmd-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--hmd-border);
    border-radius: 16px;
    padding: 20px 22px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    min-width: 0;
}

.hmd-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.hmd-card-head h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
}

.hmd-muted {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--hmd-muted);
}

.hmd-muted b {
    color: var(--hmd-text);
}

.hmd-muted a,
.hmd-link {
    color: var(--hmd-gold) !important;
}

.hmd-link {
    font-size: 13px;
    font-weight: 600;
}

.hmd-link:hover,
.hmd-muted a:hover {
    text-decoration: underline !important;
}

/* ----- чипы и кнопки ----- */

.hmd-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    background: var(--hmd-inset);
    color: var(--hmd-text);
    border: 1px solid var(--hmd-border);
}

.hmd-chip--ok { background: rgba(135, 153, 126, 0.2); border-color: rgba(135, 153, 126, 0.45); color: #B9CCAE; }
.hmd-chip--wait { background: rgba(255, 169, 53, 0.15); border-color: rgba(255, 169, 53, 0.45); color: var(--hmd-gold); }
.hmd-chip--info { background: rgba(111, 179, 210, 0.15); border-color: rgba(111, 179, 210, 0.45); color: #A9D6EA; }
.hmd-chip--gold { background: rgba(255, 218, 117, 0.15); border-color: rgba(255, 218, 117, 0.45); color: var(--hmd-gold); }
.hmd-chip--bad { background: rgba(232, 105, 122, 0.15); border-color: rgba(232, 105, 122, 0.45); color: #F4A3AE; }

.hmd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 16px;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.hmd-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
}

.hmd-btn--primary {
    background: linear-gradient(135deg, var(--hmd-green-dark), var(--hmd-green));
    border-color: transparent;
}

.hmd-btn--primary:hover {
    background: linear-gradient(135deg, #788C6B, #98AA8E);
}

.hmd-btn .mdi {
    font-size: 16px;
}

/* ----- приветствие ----- */

.hmd-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.hmd-hero-avatar img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid var(--hmd-green);
    display: block;
}

.hmd-hero-main {
    flex: 1 1 320px;
    min-width: 0;
}

.hmd-hero-title {
    font-size: 22px;
    font-weight: 800;
}

.hmd-hero-level {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
    font-size: 14px;
}

.hmd-stars {
    color: var(--hmd-gold);
    letter-spacing: 2px;
}

.hmd-progress {
    height: 8px;
    margin-top: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.hmd-progress-bar {
    height: 100%;
    min-width: 6px;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--hmd-green), var(--hmd-gold));
    box-shadow: 0 0 12px rgba(255, 218, 117, 0.35);
}

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

/* ----- показатели ----- */

.hmd-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.hmd-stat {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}

.hmd-stat::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: rgba(255, 255, 255, 0.15);
}

.hmd-stat--green::before { background: var(--hmd-green); }
.hmd-stat--gold::before { background: var(--hmd-gold); }

.hmd-stat-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--hmd-muted);
}

.hmd-stat-value {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
    word-break: break-word;
}

.hmd-stat--gold .hmd-stat-value {
    color: var(--hmd-gold);
}

.hmd-stat-note {
    font-size: 12px;
    color: var(--hmd-muted);
    cursor: default;
}

.hmd-stat-note.hmd-warn {
    color: var(--hmd-gold);
}

.hmd-stat-link {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--hmd-gold) !important;
}

.hmd-stat-link:hover {
    text-decoration: underline !important;
}

/* ----- сетки ----- */

.hmd-grid {
    display: grid;
    gap: 20px;
}

.hmd-grid--wide {
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
}

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

/* ----- график ----- */

.hmd-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: var(--hmd-muted);
}

.hmd-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.hmd-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    display: inline-block;
}

.hmd-dot--refback,
.hmd-chart-part--refback { background: var(--hmd-green); }
.hmd-dot--insurance,
.hmd-chart-part--insurance { background: var(--hmd-blue); }
.hmd-dot--other,
.hmd-chart-part--other { background: var(--hmd-gold); }

.hmd-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 220px;
    padding-top: 22px;
}

.hmd-chart-col {
    flex: 1;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    cursor: default;
}

.hmd-chart-barwrap {
    position: relative;
    width: 100%;
    max-width: 38px;
    min-height: 3px;
    display: flex;
}

.hmd-chart-value {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding-bottom: 4px;
    font-size: 10px;
    color: var(--hmd-muted);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.hmd-chart-col:hover .hmd-chart-value,
.hmd-chart-col:last-child .hmd-chart-value {
    opacity: 1;
}

.hmd-chart-track {
    flex: 1;
    width: 100%;
    min-height: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.hmd-chart-bar {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 6px 6px 2px 2px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    transition: filter 0.2s ease;
}

.hmd-chart-col:hover .hmd-chart-bar {
    filter: brightness(1.2);
}

.hmd-chart-part {
    display: block;
    flex-basis: 0;
    min-height: 2px;
}

.hmd-chart-label {
    font-size: 11px;
    color: var(--hmd-muted);
}

/* ----- списки ----- */

.hmd-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hmd-list li + li {
    border-top: 1px solid var(--hmd-border);
}

.hmd-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
}

a.hmd-list-row {
    margin: 0 -10px;
    padding: 10px;
    border-radius: 10px;
    transition: background 0.2s ease;
}

a.hmd-list-row:hover {
    background: var(--hmd-inset);
}

.hmd-list-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.hmd-list-title {
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hmd-list-meta {
    font-size: 12px;
    color: var(--hmd-muted);
}

.hmd-unread .hmd-list-title::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 7px;
    border-radius: 50%;
    background: var(--hmd-gold);
    vertical-align: middle;
}

.hmd-amount {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.hmd-amount--plus { color: #B9CCAE; }
.hmd-amount--minus { color: var(--hmd-muted); }

/* ----- пустые состояния ----- */

.hmd-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 200px;
    padding: 20px;
    text-align: center;
    color: var(--hmd-muted);
}

.hmd-empty--small {
    min-height: 140px;
}

.hmd-empty .mdi {
    font-size: 34px;
    color: var(--hmd-green);
}

.hmd-empty p {
    max-width: 380px;
    margin: 0;
    font-size: 13px;
}

/* ----- рефералы ----- */

.hmd-ref {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.hmd-ref > div {
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--hmd-inset);
}

.hmd-ref .hmd-muted {
    display: block;
    margin: 0;
}

.hmd-ref-value {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
}

.hmd-copy {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.hmd-copy input {
    flex: 1;
    min-width: 0;
    height: 40px;
    padding: 0 14px;
    border-radius: 40px;
    border: 1px solid var(--hmd-border);
    background: rgba(0, 0, 0, 0.25);
    color: var(--hmd-text);
    font-size: 13px;
}

/* ----- Telegram ----- */

.hmd-tg {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0 0;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
    background: rgba(111, 179, 210, 0.12);
    color: #A9D6EA !important;
}

a.hmd-tg:hover {
    background: rgba(111, 179, 210, 0.2);
}

.hmd-tg--on {
    background: rgba(135, 153, 126, 0.15);
    color: #B9CCAE !important;
}

.hmd-tg .mdi {
    font-size: 18px;
}

/* ----- проекты блога ----- */

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

.hmd-project {
    min-width: 0;
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: var(--hmd-inset);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hmd-project:hover {
    background: rgba(255, 255, 255, 0.09);
    transform: translateY(-2px);
}

.hmd-project-img {
    flex: 0 0 92px;
    height: 70px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.25);
}

.hmd-project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hmd-project-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
}

.hmd-project-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* ----- адаптив ----- */

/* сетки с одной колонкой: minmax(0, 1fr), иначе длинные nowrap-строки распирают колонку */
@media screen and (max-width: 1200px) {
    .hmd-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .hmd-grid--three > :last-child {
        grid-column: 1 / -1;
    }
}

/* график и «В процессе» рядом только на широком экране: с сайдбаром кабинета (280px) колонке иначе тесно */
@media screen and (max-width: 1280px) {
    .hmd-grid--wide,
    .hmd-projects {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media screen and (max-width: 640px) {
    .hmd {
        gap: 14px;
    }

    .hmd-card {
        padding: 16px;
        border-radius: 14px;
    }

    .hmd-grid {
        gap: 14px;
    }

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

    /* приветствие: аватар слева от имени, кнопки сеткой */
    .hmd-hero {
        display: grid;
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 12px 14px;
        align-items: start;
    }

    .hmd-hero-avatar img {
        width: 48px;
        height: 48px;
    }

    .hmd-hero-main {
        min-width: 0;
    }

    .hmd-hero-title {
        font-size: 18px;
        line-height: 1.3;
    }

    .hmd-hero-level {
        gap: 6px 8px;
        font-size: 13px;
    }

    .hmd-hero-main .hmd-muted {
        font-size: 12px;
    }

    .hmd-hero-actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .hmd-hero-actions .hmd-btn {
        width: 100%;
        min-width: 0;
        padding: 0 10px;
        font-size: 12px;
    }

    .hmd-hero-actions .hmd-btn span {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hmd-hero-actions .hmd-btn--primary {
        grid-column: 1 / -1;
        height: 44px;
        font-size: 14px;
    }

    /* показатели — две колонки */
    .hmd-stats {
        gap: 10px;
    }

    .hmd-stat {
        padding: 14px 14px 14px 16px;
        gap: 3px;
    }

    .hmd-stat-label {
        font-size: 10px;
        letter-spacing: 0.3px;
    }

    .hmd-stat-value {
        font-size: 19px;
    }

    .hmd-stat-note,
    .hmd-stat-link {
        font-size: 11px;
        line-height: 1.35;
    }

    /* списки: название переносится на вторую строку вместо обрезки */
    .hmd-list-row {
        align-items: flex-start;
    }

    .hmd-list-title {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        font-size: 13px;
        line-height: 1.35;
    }

    .hmd-list-row .hmd-chip {
        margin-top: 1px;
    }

    .hmd-legend {
        gap: 4px 10px;
        font-size: 11px;
    }

    .hmd-chart {
        gap: 4px;
        height: 170px;
    }

    .hmd-chart-label {
        font-size: 9px;
    }

    .hmd-chart-value {
        display: none;
    }

    .hmd-ref-value {
        font-size: 19px;
    }

    .hmd-copy input {
        font-size: 12px;
    }

    /* проекты блога */
    .hmd-projects {
        gap: 10px;
    }

    .hmd-project {
        min-width: 0;
        gap: 12px;
        padding: 8px;
    }

    .hmd-project-img {
        flex-basis: 76px;
        height: 58px;
    }

    .hmd-project-title {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        font-size: 13px;
        line-height: 1.3;
    }
}

@media screen and (max-width: 360px) {
    .hmd-stats {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* короткие подписи кнопок на телефоне */
.hmd-short {
    display: none;
}

@media screen and (max-width: 640px) {
    .hmd-long {
        display: none;
    }

    .hmd-short {
        display: inline;
    }
}

/* ===== Настройки профиля (settings.php) ===== */

.hms .hmd-card-head h3 .mdi {
    color: var(--hmd-green);
    font-size: 18px;
}

.hms-alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.45;
}

.hms-alert .mdi {
    font-size: 20px;
    line-height: 1;
}

.hms-alert--ok {
    background: rgba(135, 153, 126, 0.18);
    border: 1px solid rgba(135, 153, 126, 0.45);
    color: #CFE0C5;
}

.hms-alert--error {
    background: rgba(232, 105, 122, 0.15);
    border: 1px solid rgba(232, 105, 122, 0.45);
    color: #F8C3CA;
}

/* профиль */
.hms-profile {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

.hms-avatar #avatar {
    position: absolute;
    visibility: hidden;
    width: 0;
    height: 0;
}

.hms-avatar-img {
    position: relative;
    display: block;
    padding: 0;
    border: 0;
    background: none;
    border-radius: 50%;
    cursor: pointer;
}

.hms-avatar-img img {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 2px solid var(--hmd-green);
    display: block;
    object-fit: cover;
}

.hms-avatar-edit {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--hmd-green-dark), var(--hmd-green));
    color: #fff;
    font-size: 15px;
    border: 2px solid #23282B;
}

.hms-profile-main {
    flex: 1 1 280px;
    min-width: 0;
}

.hms-facts {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    font-size: 13px;
    color: var(--hmd-muted);
}

.hms-facts li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    word-break: break-all;
}

.hms-facts .mdi {
    font-size: 16px;
}

.hms-facts .hms-on {
    color: #B9CCAE;
}

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

.hms-btn-ghost {
    background: transparent;
}

.hms-btn-ghost:hover {
    background: rgba(232, 105, 122, 0.12);
    border-color: rgba(232, 105, 122, 0.45);
}

/* колонки */
.hms-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}

.hms-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

/* формы */
.hms-subtitle {
    margin: 18px 0 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--hmd-muted);
}

.hms-form > .hms-subtitle:first-child {
    margin-top: 0;
}

.hms-hint {
    margin: -4px 0 12px;
    font-size: 12px;
    line-height: 1.45;
    color: var(--hmd-muted);
}

.hms-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
}

.hms-fields--single {
    grid-template-columns: minmax(0, 1fr);
}

.hms-field {
    min-width: 0;
}

.hms-field--full {
    grid-column: 1 / -1;
}

.hms-field label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--hmd-text);
}

.hms .form-control {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border-radius: 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    background: rgba(0, 0, 0, 0.25) !important;
    color: #fff !important;
    font-size: 14px;
    box-shadow: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hms select.form-control {
    padding: 0 10px;
}

.hms .form-control:focus {
    border-color: var(--hmd-green) !important;
    box-shadow: 0 0 0 3px rgba(135, 153, 126, 0.2) !important;
    outline: none;
}

.hms .form-control::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.hms select.form-control option {
    background: #272C30;
    color: #fff;
}

.hms-input-icon {
    position: relative;
}

.hms-input-icon .mdi {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 17px;
    color: var(--hmd-muted);
    pointer-events: none;
}

.hms-input-icon .form-control {
    padding-left: 40px;
    font-family: Consolas, Menlo, monospace;
    font-size: 13px;
}

.hms-submit {
    margin-top: 18px;
}

/* переключатели уведомлений */
.hms-toggles {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--hmd-border);
    border-radius: 12px;
    overflow: hidden;
}

.hms-toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0;
    padding: 11px 14px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: background 0.2s ease;
}

.hms-toggle + .hms-toggle {
    border-top: 1px solid var(--hmd-border);
}

.hms-toggle:hover {
    background: var(--hmd-inset);
}

.hms-toggle input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.hms-switch {
    position: relative;
    flex: 0 0 40px;
    height: 22px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.15);
    transition: background 0.2s ease;
}

.hms-switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s ease;
}

.hms-toggle input:checked + .hms-switch {
    background: var(--hmd-green);
}

.hms-toggle input:checked + .hms-switch::after {
    transform: translateX(18px);
}

.hms-toggle input:focus-visible + .hms-switch {
    box-shadow: 0 0 0 3px rgba(135, 153, 126, 0.35);
}

/* безопасность: раскрывающиеся блоки */
.hms-details {
    border: 1px solid var(--hmd-border);
    border-radius: 12px;
}

.hms-details + .hms-details {
    margin-top: 10px;
}

.hms-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    list-style: none;
    cursor: pointer;
}

.hms-details summary::-webkit-details-marker {
    display: none;
}

.hms-details summary > span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.hms-details summary b {
    font-size: 14px;
}

.hms-details summary .hmd-list-meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hms-details summary .mdi {
    font-size: 20px;
    color: var(--hmd-muted);
    transition: transform 0.2s ease;
}

.hms-details[open] summary .mdi {
    transform: rotate(180deg);
}

.hms-details .hms-form {
    padding: 0 14px 14px;
}

@media screen and (max-width: 1280px) {
    .hms-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media screen and (max-width: 640px) {
    .hms-profile {
        display: grid;
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 12px 14px;
        align-items: center;
    }

    .hms-avatar-img img {
        width: 64px;
        height: 64px;
    }

    .hms-avatar-edit {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .hms-facts {
        flex-direction: column;
        gap: 4px;
        font-size: 12px;
    }

    .hms-profile-actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hms-profile-actions .hmd-btn {
        width: 100%;
        min-width: 0;
        padding: 0 10px;
        font-size: 12px;
    }

    /* на телефоне поля во всю ширину, короткие (имя, фамилия, пол, дата) — парами */
    .hms-fields {
        gap: 12px 10px;
    }

    .hms-field {
        grid-column: 1 / -1;
    }

    .hms-field--half {
        grid-column: auto;
    }

    .hms-toggle {
        font-size: 13px;
        padding: 11px 12px;
    }

    .hms-submit {
        width: 100%;
    }
}

/* ===== Уведомления (plugins/hunter_announcements/user_announcements.php) ===== */

.hma-head {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.hma-head-icon {
    flex: 0 0 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    background: linear-gradient(135deg, var(--hmd-green-dark), var(--hmd-green));
    box-shadow: 0 6px 18px rgba(135, 153, 126, 0.3);
}

.hma-head-main {
    flex: 1 1 260px;
    min-width: 0;
}

.hma-head-main .hmd-muted {
    margin-top: 4px;
    font-size: 14px;
}

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

/* лента */
.hma-feed {
    padding-top: 8px;
    padding-bottom: 8px;
}

.hma-day {
    margin: 12px 0 4px;
    padding: 4px 0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--hmd-muted);
}

.hma-item {
    --hma-tone: var(--hmd-blue);
    display: flex;
    gap: 14px;
    padding: 14px 12px;
    margin: 0 -12px;
    border-radius: 12px;
    transition: background 0.2s ease;
}

.hma-item + .hma-item {
    border-top: 1px solid var(--hmd-border);
}

.hma-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.hma-item--ok { --hma-tone: var(--hmd-green); }
.hma-item--info { --hma-tone: var(--hmd-blue); }
.hma-item--gold { --hma-tone: var(--hmd-gold); }
.hma-item--bad { --hma-tone: var(--hmd-red); }

.hma-item--unread {
    background: rgba(255, 218, 117, 0.05);
    box-shadow: inset 3px 0 0 var(--hmd-gold);
}

.hma-item-icon {
    flex: 0 0 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--hma-tone);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--hmd-border);
}

.hma-item-main {
    flex: 1;
    min-width: 0;
}

.hma-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.hma-item-title {
    margin: 0;
    font-size: 15px !important;
    font-weight: 700;
    line-height: 1.4;
    color: #fff;
    word-break: break-word;
}

.hma-item-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--hmd-muted);
}

.hma-cat {
    font-weight: 600;
    color: var(--hma-tone);
}

.hma-item-body {
    position: relative;
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(230, 236, 232, 0.85);
    word-break: break-word;
}

.hma-item-body p {
    margin: 0 0 8px;
}

.hma-item-body p:last-child {
    margin-bottom: 0;
}

.hma-item-body a {
    color: var(--hmd-gold);
    text-decoration: underline;
}

.hma-item-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.hma-item-body--clamped {
    max-height: 150px;
    overflow: hidden;
}

.hma-item-body--clamped::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 60px;
    background: linear-gradient(rgba(30, 35, 38, 0), rgba(30, 35, 38, 0.95));
}

.hma-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 0;
    border: 0;
    background: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--hmd-gold);
    cursor: pointer;
}

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

/* пагинация */
.hma-pages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.hma-pages .page-numbers {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--hmd-border);
    background: var(--hmd-card);
    color: var(--hmd-text) !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.hma-pages a.page-numbers:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

.hma-pages .page-numbers.current {
    background: linear-gradient(135deg, var(--hmd-green-dark), var(--hmd-green));
    border-color: transparent;
    color: #fff !important;
}

.hma-pages .page-numbers.dots {
    border: 0;
    background: none;
    min-width: 20px;
    padding: 0;
}

@media screen and (max-width: 640px) {
    .hma-head {
        display: grid;
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 12px 14px;
    }

    .hma-head-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
        border-radius: 14px;
    }

    .hma-head-actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    }

    .hma-head-actions .hmd-btn {
        width: 100%;
        min-width: 0;
        padding: 0 10px;
        font-size: 12px;
    }

    .hma-item {
        gap: 12px;
        padding: 12px 10px;
        margin: 0 -10px;
    }

    .hma-item-icon {
        flex-basis: 34px;
        height: 34px;
        font-size: 17px;
        border-radius: 10px;
    }

    .hma-item-title {
        font-size: 14px !important;
    }

    .hma-item-body {
        font-size: 13px;
    }

    .hma-pages .page-numbers {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 13px;
    }
}

/* ===== Программа поощрения (plugins/hunter_bounty_program/user_bounty_program.php) ===== */

.hmb-head {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.hmb-head .hma-head-icon {
    background: linear-gradient(135deg, #FFA935, #FFDA75);
    color: #1E2326;
    box-shadow: 0 6px 18px rgba(255, 169, 53, 0.3);
}

.hmb-status {
    padding: 6px 12px;
    font-size: 12px;
}

.hmb-locked-text {
    margin: 0 0 4px;
    font-size: 14px;
    line-height: 1.55;
}

.hmb-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

/* точки «оплачено из N за день» */
.hmb-dots {
    display: inline-flex;
    gap: 5px;
    margin-top: 6px;
}

.hmb-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}

.hmb-dots span.is-on {
    background: var(--hmd-gold);
    box-shadow: 0 0 8px rgba(255, 218, 117, 0.45);
}

.hmb-history .hmb-dots {
    margin: 0 0 0 auto;
}

/* шаги */
.hmb-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hmb-steps li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.hmb-steps li > span {
    flex: 0 0 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: #1E2326;
    background: var(--hmd-gold);
}

.hmb-steps b {
    font-size: 14px;
}

.hmb-steps p {
    margin: 2px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--hmd-muted);
}

.hmb-note {
    display: flex;
    gap: 6px;
    margin: 16px 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--hmd-inset);
    font-size: 12px;
    line-height: 1.45;
    color: var(--hmd-muted);
}

.hmb-note .mdi {
    font-size: 15px;
}

@media screen and (max-width: 640px) {
    .hmb-head {
        display: grid;
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 12px 14px;
    }

    .hmb-head .hma-head-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
        border-radius: 14px;
    }

    .hmb-status {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .hmb-actions .hmd-btn {
        width: 100%;
    }

    .hmb-history .hmb-dots {
        display: none;
    }
}

/* ===== Партнёрская программа (plugins/hunter_partner/user_get_link.php, user_referrals.php) ===== */

.hmp-head .hma-head-icon {
    background: linear-gradient(135deg, var(--hmd-green-dark), var(--hmd-green));
    color: #fff;
    box-shadow: 0 6px 18px rgba(135, 153, 126, 0.3);
}

.hmp .hmd-card-head h3 .mdi {
    color: var(--hmd-green);
    font-size: 18px;
}

.hmp-head-stats {
    display: flex;
    gap: 10px;
}

.hmp-mini {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 110px;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--hmd-inset);
    border: 1px solid var(--hmd-border);
    transition: background 0.2s ease;
}

a.hmp-mini:hover {
    background: rgba(255, 255, 255, 0.09);
}

.hmp-mini-value {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
}

.hmp-mini-value.hmp-gold,
.hmp-gold {
    color: var(--hmd-gold);
}

.hmp-mini-label {
    font-size: 12px;
    color: var(--hmd-muted);
}

.hmp-field {
    margin-bottom: 14px;
}

.hmp-field .hmd-copy {
    margin-top: 0;
}

.hmp .form-control {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border-radius: 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    background: rgba(0, 0, 0, 0.25) !important;
    color: #fff !important;
}

.hmp .form-control option {
    background: #272C30;
}

.hmp-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    padding-top: 14px;
    border-top: 1px solid var(--hmd-border);
}

.hmp-share .hmd-list-meta {
    margin-right: 4px;
}

.hmp-share .hmd-btn[hidden] {
    display: none;
}

.hmp-refs-btn {
    margin-top: 16px;
}

/* баннеры */
.hmp-banners {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.hmp-banner {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border-radius: 14px;
    background: var(--hmd-inset);
    border: 1px solid var(--hmd-border);
}

.hmp-banner:first-child {
    grid-column: 1 / -1;
}

.hmp-banner-preview {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.hmp-banner-preview img {
    max-width: 100%;
    height: auto;
    max-height: 260px;
    width: auto;
    display: block;
}

.hmp-banner-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.hmp-banner-foot .hmd-btn {
    height: 34px;
    padding: 0 12px;
    font-size: 12px;
}

.hmp-banner-code {
    width: 100%;
    height: auto !important;
    min-height: 0;
    padding: 8px 10px !important;
    resize: none;
    font-family: Consolas, Menlo, monospace;
    font-size: 11px !important;
    line-height: 1.4;
    color: var(--hmd-muted) !important;
}

/* рефералы */
.hmp-sort {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 3px;
    border-radius: 12px;
    background: var(--hmd-inset);
    border: 1px solid var(--hmd-border);
}

.hmp-sort-btn {
    padding: 6px 12px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 600;
    color: var(--hmd-muted) !important;
    transition: background 0.2s ease, color 0.2s ease;
}

.hmp-sort-btn:hover {
    color: #fff !important;
}

.hmp-sort-btn.is-active {
    background: linear-gradient(135deg, var(--hmd-green-dark), var(--hmd-green));
    color: #fff !important;
}

.hmp-refs .hmd-list-row {
    gap: 12px;
}

.hmp-avatar {
    flex: 0 0 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: var(--hmd-muted);
    background: var(--hmd-inset);
    border: 1px solid var(--hmd-border);
}

.hmp-avatar.is-active {
    color: #1E2326;
    background: linear-gradient(135deg, var(--hmd-green), #B9CCAE);
    border-color: transparent;
}

.hmp-refs .hmd-list-main {
    flex: 1;
}

.hmp-best {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media screen and (max-width: 640px) {
    .hmp-head .hmd-btn {
        grid-column: 1 / -1;
        width: 100%;
    }

    .hmp-head-stats {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hmp-mini {
        min-width: 0;
    }

    .hmp-share {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hmp-share .hmd-list-meta {
        grid-column: 1 / -1;
    }

    .hmp-share .hmd-btn {
        width: 100%;
        min-width: 0;
        padding: 0 10px;
        font-size: 12px;
    }

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

    .hmp-sort {
        display: flex;
        width: 100%;
    }

    .hmp-sort-btn {
        flex: 1 1 auto;
        text-align: center;
        padding: 6px 8px;
        font-size: 11px;
    }
}

/* ===== Страховка (plugins/insurance_orders/user_insurance_orders.php, user_add_insurance_order.php) ===== */

.hmi-head .hma-head-icon {
    background: linear-gradient(135deg, #4F8DA8, var(--hmd-blue));
    color: #fff;
    box-shadow: 0 6px 18px rgba(111, 179, 210, 0.3);
}

/* шаги и ошибки полей (те же, что в форме RCB на сайте, но для кабинета) */
.hmi .rbc-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--hmd-green-dark), var(--hmd-green));
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.hmi .rbc-field-error {
    margin-top: 5px;
    font-size: 12px;
    color: #FF8A98;
}

.hmi .rbc-field-invalid .form-control,
.hmi .rbc-field-invalid .hmi-drop {
    border-color: rgba(232, 105, 122, 0.8) !important;
}

.hmi-hint {
    margin: 6px 0 0;
}

.hmi-hint a {
    color: var(--hmd-gold);
    text-decoration: underline;
}

/* список */
.hmi-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.hmi .hmi-filters .form-control {
    flex: 1 1 180px;
    width: auto;
    height: 40px;
    padding: 0 10px;
    border-radius: 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    background: rgba(0, 0, 0, 0.25) !important;
    color: #fff !important;
}

.hmi-filters .form-control option {
    background: #272C30;
}

.hmi-orders {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hmi-order {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    padding: 14px 0;
}

.hmi-order + .hmi-order {
    border-top: 1px solid var(--hmd-border);
}

.hmi-order-main {
    flex: 1 1 360px;
    min-width: 0;
}

.hmi-order-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
}

.hmi-order-title b {
    font-size: 15px;
    color: #fff;
}

.hmi-order-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin-top: 8px;
    font-size: 13px;
}

.hmi-order-facts span {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.hmi-order-facts em {
    font-style: normal;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--hmd-muted);
}

.hmi-wallet {
    word-break: break-all;
    font-family: Consolas, Menlo, monospace;
    font-size: 12px;
}

.hmi-order-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    text-align: right;
}

.hmi-paid {
    font-size: 18px;
    font-weight: 800;
    color: var(--hmd-gold);
}

.hmi-comment {
    flex-basis: 100%;
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(232, 105, 122, 0.1);
    border: 1px solid rgba(232, 105, 122, 0.3);
    font-size: 13px;
    line-height: 1.45;
    color: #F8C3CA;
}

/* форма: калькулятор убытка */
.hmi-calc-box {
    margin-top: 16px;
    padding: 14px;
    border-radius: 12px;
    background: var(--hmd-inset);
    border: 1px solid var(--hmd-border);
}

.hmi-bar {
    display: flex;
    height: 14px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
}

.hmi-bar-part {
    display: block;
    width: 0;
    transition: width 0.3s ease;
}

.hmi-bar-part--returned,
.hmi-dot--returned { background: var(--hmd-green); }
.hmi-bar-part--rcb,
.hmi-dot--rcb { background: var(--hmd-gold); }
.hmi-bar-part--loss,
.hmi-dot--loss { background: var(--hmd-red); }

.hmi-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: 8px 0 14px;
    font-size: 12px;
    color: var(--hmd-muted);
}

.hmi-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.hmi .hmi-loss {
    height: 48px;
    font-size: 20px !important;
    font-weight: 800;
    color: #F4A3AE !important;
}

/* скриншот */
.hmi-drop {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 180px;
    margin: 0;
    padding: 18px;
    border-radius: 14px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.2);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.hmi-drop:hover,
.hmi-drop.is-over {
    border-color: var(--hmd-green);
    background: rgba(135, 153, 126, 0.08);
}

.hmi-drop input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.hmi-drop img {
    max-width: 100%;
    max-height: 240px;
    border-radius: 10px;
}

.hmi-drop-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-weight: 400;
}

.hmi-drop-text .mdi {
    font-size: 34px;
    color: var(--hmd-green);
}

.hmi-drop-text b {
    font-size: 14px;
}

.hmi-drop.has-file .hmi-drop-text .mdi,
.hmi-drop.has-file .hmi-drop-text .hmd-list-meta {
    display: none;
}

.hmi-drop.has-file .hmi-drop-text b::after {
    content: " — заменить";
    font-weight: 400;
    color: var(--hmd-muted);
}

/* отправка */
.hmi-rules {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--hmd-muted);
}

.hmi-rules li {
    display: flex;
    gap: 8px;
}

.hmi-rules .mdi {
    font-size: 16px;
    color: var(--hmd-green);
}

.hmi-submit {
    width: 100%;
    height: 48px;
    font-size: 15px;
}

@media screen and (max-width: 640px) {
    .hmi-head .hmd-btn {
        grid-column: 1 / -1;
        width: 100%;
    }

    .hmi-filters .form-control {
        flex-basis: 100%;
    }

    .hmi-filters .hmd-btn {
        flex: 1 1 auto;
    }

    .hmi-order-status {
        flex-basis: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 6px 10px;
        text-align: left;
    }

    .hmi-paid {
        font-size: 16px;
    }
}

/* ===== Заявки на бонус (plugins/refback_orders/user_refback_orders.php, user_add_refback_order.php) ===== */
/* список и форма используют общие классы страховки (.hmi-*) */

.hmr-head .hma-head-icon {
    background: linear-gradient(135deg, #C98A2B, var(--hmd-gold));
    color: #fff;
    box-shadow: 0 6px 18px rgba(255, 169, 53, 0.3);
}

.hmr-actions {
    display: inline-flex;
    gap: 6px;
    margin-top: 2px;
}

.hmr-actions .hmd-btn {
    height: 32px;
    padding: 0 10px;
    font-size: 12px;
}

.hmr-actions .hmd-btn .mdi {
    font-size: 15px;
}

/* калькулятор бонуса */
.hmr-bonus {
    margin-top: 16px;
    padding: 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 169, 53, 0.12), rgba(255, 218, 117, 0.04));
    border: 1px solid rgba(255, 169, 53, 0.3);
}

.hmr-bonus-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.hmr-bonus-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--hmd-gold);
}

.hmr-bonus-parts {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    font-size: 13px;
    color: var(--hmd-muted);
}

.hmr-bonus-parts li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 3px 0;
}

.hmr-bonus-parts b {
    color: #fff;
    font-weight: 600;
}

.hmr-tiers {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.hmr-tiers:empty {
    display: none;
}

.hmr-tier {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 64px;
    padding: 5px 10px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--hmd-border);
    font-size: 11px;
    color: var(--hmd-muted);
}

.hmr-tier b {
    font-size: 14px;
    color: #fff;
}

.hmr-tier.is-active {
    border-color: var(--hmd-gold);
    background: rgba(255, 169, 53, 0.15);
}

.hmr-tier.is-active b {
    color: var(--hmd-gold);
}

.hmr-bonus .hmi-hint {
    margin-top: 10px;
}

.hmd .hmr-review {
    min-height: 120px;
    height: auto;
    padding: 10px 12px;
    resize: vertical;
}

.hmr-review-link {
    margin-top: 12px;
}

.hmr-review-link[hidden] {
    display: none;
}

@media screen and (max-width: 640px) {
    .hmr-head .hmd-btn {
        grid-column: 1 / -1;
        width: 100%;
    }

    .hmr-bonus-value {
        font-size: 24px;
    }

    .hmr-review-link {
        width: 100%;
    }
}

/* ===== История расчётов (plugins/hunter_partner/user_balance_ops_view.php) ===== */

.hmo-head .hma-head-icon {
    background: linear-gradient(135deg, var(--hmd-green-dark), var(--hmd-green));
    color: #fff;
    box-shadow: 0 6px 18px rgba(135, 153, 126, 0.3);
}

.hmo-head--secondary .hma-head-icon {
    background: linear-gradient(135deg, #4F8DA8, var(--hmd-blue));
    box-shadow: 0 6px 18px rgba(111, 179, 210, 0.3);
}

.hmo-head-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    text-align: right;
}

.hmo-balance {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--hmd-gold);
}

.hmo-alert-wait {
    background: rgba(255, 169, 53, 0.12);
    border: 1px solid rgba(255, 169, 53, 0.4);
    color: #FFE3A8;
}

/* откуда доход */
.hmo-tone--refback { background: var(--hmd-gold); }
.hmo-tone--partner { background: var(--hmd-green); }
.hmo-tone--bounty { background: var(--hmd-blue); }
.hmo-tone--interest { background: #B48EDB; }

.hmo-bar {
    display: flex;
    height: 14px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
}

.hmo-bar-part {
    display: block;
    min-width: 3px;
}

.hmo-legend {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px 20px;
    font-size: 13px;
}

.hmo-legend li {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.hmo-legend span {
    flex: 1;
    color: var(--hmd-muted);
}

.hmo-legend em {
    font-style: normal;
    font-size: 12px;
    color: var(--hmd-muted);
    min-width: 34px;
    text-align: right;
}

.hmo-dot {
    flex: 0 0 10px;
    height: 10px;
    border-radius: 50%;
}

/* проценты */
.hmo-interest {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.hmo-interest .mdi {
    font-size: 22px;
    color: var(--hmd-blue);
}

.hmo-interest p {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--hmd-muted);
}

.hmo-interest b {
    color: #fff;
}

.hmo-interest a {
    color: var(--hmd-gold);
    text-decoration: underline;
}

/* лента операций */
.hmo-filter {
    max-width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
}

.hmo-filter .hmp-sort-btn {
    white-space: nowrap;
}

.hmo-op {
    padding-top: 10px;
    padding-bottom: 10px;
    align-items: center;
}

.hmo-op .hma-item-icon {
    flex-basis: 36px;
    height: 36px;
    font-size: 18px;
    border-radius: 10px;
}

.hmo-op-title {
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: #fff;
    word-break: break-word;
}

.hmo-op .hmd-amount {
    font-size: 15px;
}

.hmo-op .hmi-wallet {
    word-break: break-all;
}

.hmo-switch {
    margin-top: 4px;
    align-self: flex-start;
}

@media screen and (max-width: 640px) {
    .hmo-head-side {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        padding: 12px 14px;
        border-radius: 12px;
        background: var(--hmd-inset);
        text-align: left;
    }

    .hmo-head-side .hmd-stat-label {
        flex-basis: 100%;
    }

    .hmo-balance {
        font-size: 26px;
    }

    .hmo-head-side .hmd-btn {
        flex: 1 1 auto;
        max-width: 160px;
    }

    .hmo-op .hma-item-icon {
        display: none;
    }

    .hmo-switch {
        width: 100%;
    }
}

/* ===== Вывод средств (plugins/hunter_partner/user_balance_withdrawal.php) ===== */

.hmw-amount,
.hmw-code {
    display: flex;
    gap: 8px;
}

.hmw-amount .form-control,
.hmw-code .form-control {
    flex: 1 1 auto;
    min-width: 0;
}

.hmd .hmw-amount .form-control {
    height: 48px;
    font-size: 20px !important;
    font-weight: 800;
    color: var(--hmd-gold) !important;
}

.hmd .hmw-code .form-control {
    height: 44px;
    font-size: 18px !important;
    font-weight: 700;
    letter-spacing: 4px;
}

.hmw-amount .hmd-btn,
.hmw-code .hmd-btn {
    flex: 0 0 auto;
    height: auto;
}

.hmw-code .hmd-btn[disabled] {
    opacity: 0.6;
    cursor: default;
}

.hmw-ok { color: #B9CCAE !important; }
.hmw-bad { color: #F4A3AE !important; }

.hmw .hms-alert {
    margin-bottom: 14px;
}

.hmw .hms-alert a {
    color: var(--hmd-gold);
    text-decoration: underline;
}

.hmw-summary-rows {
    list-style: none;
    margin: 0 0 6px;
    padding: 0;
    font-size: 14px;
}

.hmw-summary-rows li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
}

.hmw-summary-rows li + li {
    border-top: 1px solid var(--hmd-border);
}

.hmw-summary-rows span {
    color: var(--hmd-muted);
}

.hmw-summary-rows b {
    min-width: 0;
    text-align: right;
    word-break: break-all;
    color: #fff;
}

#hmwSumAmount {
    color: var(--hmd-gold);
}

.hmw-summary .hmi-hint {
    min-height: 1em;
    margin-bottom: 12px;
}

.hmw-summary .hmi-submit[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

@media screen and (max-width: 640px) {
    .hmw-code {
        flex-wrap: wrap;
    }

    .hmw-code .hmd-btn {
        flex: 1 1 100%;
        height: 42px;
    }
}

/* ===== Подключение Telegram-бота (themes/Hunter-Money-New/add-telegram-bot.php) ===== */

.hmt {
    padding-top: 20px;
}

.hmt-hero {
    display: flex;
    align-items: center;
    gap: 24px;
    background: linear-gradient(135deg, rgba(42, 171, 238, 0.16), rgba(30, 35, 38, 0.82) 60%);
    border-color: rgba(42, 171, 238, 0.3);
}

.hmt-hero-main {
    flex: 1 1 auto;
    min-width: 0;
}

.hmt-hero .hmd-muted {
    max-width: 560px;
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.5;
}

.hmt-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(42, 171, 238, 0.18);
    color: #8FD3F7;
    font-size: 12px;
    font-weight: 700;
}

.hmt-badge .mdi {
    font-size: 15px;
}

.hmt-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    font-size: 14px;
    color: var(--hmd-muted);
}

.hmt-status-dot {
    position: relative;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--hmd-amber);
}

.hmt-status-dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: inherit;
    animation: hmt-pulse 1.6s ease-out infinite;
}

.hmt-status.is-on {
    color: #CFE0C5;
    font-weight: 600;
}

.hmt-status.is-on .hmt-status-dot {
    background: var(--hmd-green);
}

.hmt-status.is-on .hmt-status-dot::after {
    animation: none;
}

@keyframes hmt-pulse {
    from { transform: scale(1); opacity: 0.7; }
    to { transform: scale(2.6); opacity: 0; }
}

.hmt-actions {
    margin-top: 16px;
}

.hmt-main-btn {
    height: 48px;
    padding: 0 22px;
    font-size: 15px;
}

.hmt-main-btn[hidden] {
    display: none;
}

#hmtOpen {
    background: linear-gradient(135deg, #229ED9, #2AABEE);
    box-shadow: 0 6px 18px rgba(42, 171, 238, 0.3);
}

.hmt-qr {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    max-width: 190px;
    text-align: center;
}

.hmt-qr canvas {
    display: block;
    width: 168px;
    height: 168px;
    border-radius: 12px;
    background: #fff;
}

.hmt-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.hmt-steps li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    border-radius: 12px;
    background: var(--hmd-inset);
    border: 1px solid var(--hmd-border);
}

.hmt-steps .rbc-step {
    flex: 0 0 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--hmd-green-dark), var(--hmd-green));
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.hmt-steps div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    font-size: 14px;
}

.hmt-warning {
    margin-top: 14px;
}

.hmt-note {
    margin: 0;
    font-size: 14px;
    color: var(--hmd-muted);
}

.hmt-note a {
    color: var(--hmd-gold);
    text-decoration: underline;
}

@media screen and (max-width: 900px) {
    .hmt-steps {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media screen and (max-width: 640px) {
    .hmt-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .hmt-main-btn {
        width: 100%;
    }

    /* на телефоне QR не нужен — бот открывается кнопкой */
    .hmt-qr {
        display: none;
    }
}

/* ===== Вход, регистрация, восстановление пароля (user-login.php, registration.php, user-resetpass.php) ===== */

.hmd.hmauth {
    min-height: 100vh;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 16px 40px;
}

.hmauth-inner {
    width: 100%;
    max-width: 440px;
}

.hmauth-inner--wide {
    max-width: 480px;
}

.hmauth-logo {
    display: block;
    width: 88px;
    margin: 0 auto 18px;
}

.hmauth-logo img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.hmauth-card {
    padding: 28px;
}

.hmauth-title {
    margin: 0;
    font-size: 24px !important;
    font-weight: 800;
    color: #fff;
    text-align: center;
}

.hmauth-sub {
    margin: 6px 0 18px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--hmd-muted);
    text-align: center;
}

.hmauth-sub b {
    color: #fff;
}

.hmauth .hms-alert {
    margin-bottom: 16px;
}

.hmauth .hms-alert a {
    color: var(--hmd-gold);
    text-decoration: underline;
}

.hmauth-alert-info {
    background: rgba(111, 179, 210, 0.12);
    border: 1px solid rgba(111, 179, 210, 0.4);
    color: #CFE8F4;
}

/* вкладки */
.hmauth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-bottom: 18px;
    padding: 4px;
    border-radius: 12px;
    background: var(--hmd-inset);
    border: 1px solid var(--hmd-border);
}

.hmauth-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--hmd-muted);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.hmauth-tab:hover {
    color: #fff;
}

.hmauth-tab.is-active {
    background: linear-gradient(135deg, var(--hmd-green-dark), var(--hmd-green));
    color: #fff;
}

.hmauth-tab[data-tab="telegram"].is-active {
    background: linear-gradient(135deg, #229ED9, #2AABEE);
}

.hmauth-pane {
    display: none;
}

.hmauth-pane.is-active {
    display: block;
}

/* поля */
.hmauth-field {
    margin-bottom: 14px;
}

.hmauth-field label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--hmd-text);
}

.hmd .hmauth-field .form-control {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    background: rgba(0, 0, 0, 0.28) !important;
    color: #fff !important;
    font-size: 15px;
    box-shadow: none;
}

.hmd .hmauth-field .form-control:focus {
    border-color: var(--hmd-green) !important;
    box-shadow: 0 0 0 3px rgba(135, 153, 126, 0.25);
}

.hmauth-optional {
    font-size: 12px;
    font-weight: 400;
    color: var(--hmd-muted);
}

.hmauth-forgot {
    font-size: 12px;
    font-weight: 600;
    color: var(--hmd-gold) !important;
}

.hmauth-hint {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--hmd-muted);
}

.hmauth-note {
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--hmd-muted);
}

.hmauth-note--after {
    margin: 16px 0 0;
}

.hmauth-note a {
    color: var(--hmd-gold);
    text-decoration: underline;
}

.hmauth-status {
    min-height: 1em;
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--hmd-muted);
}

.hmauth-pass {
    position: relative;
}

.hmd .hmauth-pass .form-control {
    padding-right: 46px;
}

.hmauth-eye {
    position: absolute;
    top: 0;
    right: 0;
    width: 46px;
    height: 46px;
    border: 0;
    background: transparent;
    color: var(--hmd-muted);
    font-size: 18px;
    cursor: pointer;
}

.hmauth-eye:hover {
    color: #fff;
}

.hmauth-meter {
    height: 4px;
    margin-top: 8px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.hmauth-meter span {
    display: block;
    width: 0;
    height: 100%;
    transition: width 0.25s ease, background 0.25s ease;
}

.hmauth-meter .is-bad { background: var(--hmd-red); }
.hmauth-meter .is-mid { background: var(--hmd-amber); }
.hmauth-meter .is-good { background: var(--hmd-green); }

.hmauth-pass-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-top: 8px;
}

.hmauth-pass-tools .hmd-btn {
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
}

.hmauth-pass-tools .hmd-btn[hidden] {
    display: none;
}

.hmauth-pass-tools .hmauth-hint {
    margin: 0;
}

.hmauth .hmw-code .form-control {
    letter-spacing: 4px;
    font-weight: 700;
}

.hmauth .hmw-code .hmd-btn {
    border-radius: 12px;
}

.hmauth-captcha {
    display: flex;
    justify-content: center;
    margin: 4px 0 14px;
    min-height: 78px;
    overflow: hidden;
}

.hmauth-save {
    font-size: 13px !important;
}

.hmauth-submit {
    width: 100%;
    height: 48px;
    font-size: 15px;
}

.hmauth-submit[disabled] {
    opacity: 0.6;
    cursor: wait;
}

.hmauth-or {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    font-size: 12px;
    color: var(--hmd-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hmauth-or::before,
.hmauth-or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--hmd-border);
}

.hmauth-tg {
    width: 100%;
    height: 46px;
    background: rgba(42, 171, 238, 0.14) !important;
    border: 1px solid rgba(42, 171, 238, 0.4) !important;
    color: #8FD3F7 !important;
}

.hmauth-tg:hover {
    background: rgba(42, 171, 238, 0.24) !important;
}

.hmauth-foot {
    margin: 18px 0 0;
    font-size: 14px;
    color: var(--hmd-muted);
    text-align: center;
}

.hmauth-foot a {
    font-weight: 700;
    color: var(--hmd-gold) !important;
}

@media screen and (max-width: 480px) {
    .hmauth {
        padding-top: 28px;
    }

    .hmauth-card {
        padding: 20px 16px;
    }

    .hmauth-title {
        font-size: 21px !important;
    }

    .hmauth .hmw-code {
        flex-wrap: wrap;
    }

    .hmauth .hmw-code .hmd-btn {
        flex: 1 1 100%;
        height: 42px;
    }

    /* reCAPTCHA фиксированной ширины 304px — немного уменьшаем на узких экранах */
    .hmauth-captcha .g-recaptcha {
        transform: scale(0.92);
        transform-origin: center top;
    }
}

.hms-alert[hidden] {
    display: none;
}

/* ===== Повышение уровня аккаунта (plugins/hunter_partner/user_account_level_up.php) ===== */

.hml-head .hma-head-icon {
    background: linear-gradient(135deg, var(--hmd-amber), var(--hmd-gold));
    color: #1E2326;
    box-shadow: 0 6px 18px rgba(255, 169, 53, 0.3);
}

.hml-stars {
    display: flex;
    gap: 2px;
    font-size: 24px;
    color: var(--hmd-gold);
}

.hml-levels {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.hml-level {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--hmd-border);
    font-size: 13px;
    color: var(--hmd-muted);
}

.hml-level b {
    font-size: 15px;
    color: #fff;
}

.hml-level-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-bottom: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    font-weight: 800;
    color: #fff;
}

.hml-level-bonus {
    font-weight: 700;
    color: var(--hmd-green);
}

.hml-level.is-done .hml-level-num {
    background: var(--hmd-green-dark);
}

.hml-level.is-current {
    border-color: var(--hmd-gold);
    box-shadow: 0 0 0 1px var(--hmd-gold) inset;
}

.hml-level.is-current .hml-level-num {
    background: linear-gradient(135deg, var(--hmd-amber), var(--hmd-gold));
    color: #1E2326;
}

.hml-progress-row {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    font-size: 13px;
    color: var(--hmd-muted);
}

.hml-progress-row b,
.hml .hmw-summary-rows .hml-pay {
    color: var(--hmd-gold);
}

@media (max-width: 900px) {
    .hml-levels {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
