.mhrb-app {
    --mhrb-blue: #2563eb;
    --mhrb-navy: #172554;
    --mhrb-green: #16a34a;
    --mhrb-red: #dc2626;
    --mhrb-orange: #ea580c;
    --mhrb-ink: #0f172a;
    --mhrb-muted: #64748b;
    --mhrb-border: #dbe3ee;
    --mhrb-bg: #f1f5f9;
    width: 100%;
    max-width: 1180px;
    margin: 28px auto;
    color: var(--mhrb-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

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

.mhrb-dashboard-shell {
    overflow: hidden;
    border: 1px solid var(--mhrb-border);
    border-radius: 18px;
    background: var(--mhrb-bg);
    box-shadow: 0 16px 45px rgba(15, 23, 42, .12);
}

.mhrb-app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 25px 28px;
    color: #fff;
    background: linear-gradient(135deg, var(--mhrb-navy), var(--mhrb-blue));
}

.mhrb-app-header h1 {
    margin: 4px 0 0;
    color: #fff;
    font-size: clamp(22px, 4vw, 30px);
    line-height: 1.2;
}

.mhrb-eyebrow {
    color: #bfdbfe;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.mhrb-logout {
    flex: 0 0 auto;
    padding: 8px 14px;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    font-weight: 700;
    text-decoration: none !important;
}

.mhrb-app-nav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 10px 16px;
    border-bottom: 1px solid var(--mhrb-border);
    background: #fff;
    scrollbar-width: thin;
}

.mhrb-app-nav a {
    flex: 0 0 auto;
    padding: 9px 14px;
    color: #475569 !important;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
}

.mhrb-app-nav a:hover,
.mhrb-app-nav a.is-active {
    color: #fff !important;
    background: var(--mhrb-blue);
}

.mhrb-app-content {
    padding: 22px;
}

.mhrb-auth-shell {
    display: grid;
    min-height: 560px;
    place-items: center;
    padding: 24px;
    border-radius: 20px;
    background: radial-gradient(circle at top left, #dbeafe, transparent 45%), linear-gradient(145deg, #eff6ff, #eef2ff);
}

.mhrb-auth-card {
    width: min(100%, 440px);
    margin-right: auto;
    margin-left: auto;
    padding: 30px;
    border: 1px solid var(--mhrb-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(30, 64, 175, .13);
}

.mhrb-auth-card h1,
.mhrb-auth-card h2 {
    margin: 8px 0;
    color: var(--mhrb-ink);
}

.mhrb-auth-card > p {
    margin: 0 0 20px;
    color: var(--mhrb-muted);
}

.mhrb-brand-mark {
    display: grid;
    width: 52px;
    height: 52px;
    color: #fff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--mhrb-blue), #7c3aed);
    box-shadow: 0 8px 20px rgba(37, 99, 235, .25);
    font-size: 18px;
    font-weight: 800;
    place-items: center;
}

.mhrb-form {
    display: grid;
    gap: 16px;
}

.mhrb-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.mhrb-form label:not(.mhrb-check-row):not(.mhrb-service-option) {
    display: grid;
    gap: 7px;
}

.mhrb-form label > span {
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.mhrb-form input[type="text"],
.mhrb-form input[type="password"],
.mhrb-form input[type="tel"],
.mhrb-form input[type="number"],
.mhrb-form select {
    width: 100%;
    min-height: 46px;
    margin: 0;
    padding: 10px 12px;
    color: var(--mhrb-ink);
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    outline: none;
    background: #fff;
    font: inherit;
}

.mhrb-form input:focus,
.mhrb-form select:focus {
    border-color: var(--mhrb-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .13);
}

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

.mhrb-check-row input {
    margin: 0;
}

.mhrb-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    color: #fff !important;
    border: 0;
    border-radius: 9px;
    background: var(--mhrb-blue);
    box-shadow: 0 6px 16px rgba(37, 99, 235, .2);
    font: inherit;
    font-weight: 750;
    text-decoration: none !important;
    cursor: pointer;
}

.mhrb-button:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.mhrb-button:disabled {
    opacity: .65;
    cursor: wait;
    transform: none;
}

.mhrb-button-block {
    width: 100%;
}

.mhrb-button-light {
    color: var(--mhrb-blue) !important;
    background: #fff;
    box-shadow: none;
}

.mhrb-balance-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 18px;
    padding: 28px;
    color: #fff;
    border-radius: 16px;
    background: linear-gradient(135deg, #0f766e, #16a34a);
    box-shadow: 0 10px 25px rgba(22, 163, 74, .2);
}

.mhrb-balance-hero::after {
    position: absolute;
    top: -60px;
    right: -50px;
    width: 190px;
    height: 190px;
    border: 28px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
    content: "";
}

.mhrb-balance-hero > span {
    color: #dcfce7;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.mhrb-balance-hero > strong {
    display: block;
    margin: 5px 0 15px;
    color: #fff;
    font-size: clamp(31px, 7vw, 47px);
    line-height: 1.05;
}

.mhrb-balance-hero > div {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-bottom: 20px;
}

.mhrb-balance-hero .mhrb-button {
    position: relative;
    z-index: 1;
}

.mhrb-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.mhrb-stat-grid a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 17px;
    color: var(--mhrb-ink) !important;
    border: 1px solid var(--mhrb-border);
    border-radius: 12px;
    background: #fff;
    text-decoration: none !important;
}

.mhrb-stat-grid span {
    color: var(--mhrb-muted);
    font-weight: 650;
}

.mhrb-stat-grid strong {
    font-size: 25px;
}

.mhrb-panel {
    padding: 22px;
    border: 1px solid var(--mhrb-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .04);
}

.mhrb-panel + .mhrb-panel {
    margin-top: 18px;
}

.mhrb-panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -2px 0 17px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.mhrb-panel-title h2 {
    margin: 0;
    color: var(--mhrb-ink);
    font-size: 20px;
}

.mhrb-panel-title p {
    margin: 3px 0 0;
    color: var(--mhrb-muted);
}

.mhrb-panel-title a {
    color: var(--mhrb-blue);
    font-weight: 700;
}

.mhrb-service-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.mhrb-service-option {
    position: relative;
    cursor: pointer;
}

.mhrb-service-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.mhrb-service-option span {
    display: grid;
    min-height: 60px;
    padding: 10px;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 14px;
    font-weight: 750;
    text-align: center;
    place-items: center;
}

.mhrb-service-option input:checked + span {
    color: #1d4ed8;
    border-color: var(--mhrb-blue);
    background: #eff6ff;
    box-shadow: inset 0 0 0 1px var(--mhrb-blue);
}

.mhrb-operator-field[hidden] {
    display: none !important;
}

.mhrb-help {
    margin: 0;
    padding: 11px 13px;
    color: #475569;
    border-left: 4px solid var(--mhrb-blue);
    border-radius: 5px;
    background: #eff6ff;
    font-size: 13px;
}

.mhrb-notice {
    margin: 14px 22px 0;
    padding: 12px 15px;
    border: 1px solid;
    border-radius: 9px;
    font-weight: 650;
}

.mhrb-auth-card .mhrb-notice {
    margin: 14px 0;
}

.mhrb-notice-success {
    color: #166534;
    border-color: #86efac;
    background: #f0fdf4;
}

.mhrb-notice-error {
    color: #991b1b;
    border-color: #fca5a5;
    background: #fef2f2;
}

.mhrb-filter-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.mhrb-filter-links a {
    padding: 7px 13px;
    color: #475569 !important;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
}

.mhrb-filter-links a.is-active {
    color: #fff !important;
    border-color: var(--mhrb-blue);
    background: var(--mhrb-blue);
}

.mhrb-responsive-table {
    width: 100%;
    overflow-x: auto;
}

.mhrb-responsive-table table {
    width: 100%;
    min-width: 720px;
    margin: 0;
    border: 0;
    border-collapse: collapse;
    background: transparent;
}

.mhrb-responsive-table th,
.mhrb-responsive-table td {
    padding: 12px 10px;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: middle;
}

.mhrb-responsive-table th {
    color: #64748b;
    background: #f8fafc;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.mhrb-responsive-table td {
    color: #334155;
    font-size: 13px;
}

.mhrb-responsive-table td small {
    display: block;
    margin-top: 3px;
    color: var(--mhrb-muted);
}

.mhrb-status {
    display: inline-block;
    min-width: 68px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #334155;
    background: #e2e8f0;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
}

.mhrb-status-pending {
    color: #9a3412;
    background: #ffedd5;
}

.mhrb-status-completed,
.mhrb-status-active {
    color: #166534;
    background: #dcfce7;
}

.mhrb-status-cancelled,
.mhrb-status-blocked {
    color: #991b1b;
    background: #fee2e2;
}

.mhrb-money-credit,
.mhrb-money-refund {
    color: var(--mhrb-green) !important;
    font-weight: 750;
}

.mhrb-money-debit,
.mhrb-money-hold {
    color: var(--mhrb-red) !important;
    font-weight: 750;
}

.mhrb-two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.mhrb-two-column > .mhrb-panel {
    margin: 0;
}

.mhrb-profile-list {
    margin: 0;
}

.mhrb-profile-list > div {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.mhrb-profile-list > div:last-child {
    border-bottom: 0;
}

.mhrb-profile-list dt {
    color: var(--mhrb-muted);
    font-weight: 700;
}

.mhrb-profile-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    .mhrb-app {
        margin: 14px auto;
        font-size: 14px;
    }

    .mhrb-dashboard-shell {
        border-radius: 12px;
    }

    .mhrb-app-header {
        align-items: flex-start;
        padding: 21px 18px;
    }

    .mhrb-app-content {
        padding: 14px;
    }

    .mhrb-form-grid,
    .mhrb-two-column {
        grid-template-columns: 1fr;
    }

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

    .mhrb-stat-grid {
        grid-template-columns: 1fr;
    }

    .mhrb-panel,
    .mhrb-balance-hero {
        padding: 17px;
    }

    .mhrb-notice {
        margin-right: 14px;
        margin-left: 14px;
    }

    .mhrb-responsive-table {
        overflow: visible;
    }

    .mhrb-responsive-table table,
    .mhrb-responsive-table thead,
    .mhrb-responsive-table tbody,
    .mhrb-responsive-table tr,
    .mhrb-responsive-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .mhrb-responsive-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .mhrb-responsive-table tr {
        margin-bottom: 12px;
        padding: 5px 12px;
        border: 1px solid var(--mhrb-border);
        border-radius: 10px;
        background: #fff;
    }

    .mhrb-responsive-table td {
        display: grid;
        grid-template-columns: minmax(90px, 36%) minmax(0, 1fr);
        gap: 10px;
        padding: 9px 0;
        text-align: right;
    }

    .mhrb-responsive-table td::before {
        color: var(--mhrb-muted);
        font-size: 11px;
        font-weight: 800;
        letter-spacing: .03em;
        text-align: left;
        text-transform: uppercase;
        content: attr(data-label);
    }

    .mhrb-responsive-table td small {
        grid-column: 2;
    }
}

@media (max-width: 430px) {
    .mhrb-auth-shell,
    .mhrb-auth-card {
        padding: 18px;
    }

    .mhrb-app-header {
        flex-direction: column;
    }

    .mhrb-service-grid {
        grid-template-columns: 1fr;
    }

    .mhrb-profile-list > div {
        grid-template-columns: 1fr;
        gap: 3px;
    }
}
