/* Compact member workspace: denser on desktop, native-app rhythm on phones. */
.member-shell .sidebar {
    width: 228px;
    min-width: 228px;
    padding: 20px 12px 14px;
}

.member-shell .sidebar .brand {
    height: 58px;
    padding: 0 9px 12px;
    margin-bottom: 8px;
}

.member-shell .sidebar .nav-list {
    gap: 3px;
}

.member-shell .sidebar .nav-link,
.member-shell .sidebar-group-toggle {
    min-height: 40px;
    padding: 5px 8px;
    gap: 9px;
    border-radius: 10px;
    font-size: 11px;
}

.member-shell .sidebar .nav-icon {
    width: 29px;
    height: 29px;
    border-radius: 8px;
}

.member-shell .sidebar .nav-icon svg {
    width: 16px;
    height: 16px;
}

.member-shell .sidebar-group-links .nav-link {
    min-height: 36px;
    font-size: 10px;
}

.member-shell .topbar {
    height: 62px;
    padding-inline: clamp(20px, 3vw, 40px);
}

.member-shell .main-column > main {
    padding: 28px clamp(20px, 3vw, 40px) 58px;
}

.member-shell .page-heading,
.member-shell .page-heading.compact {
    margin-bottom: 21px;
}

.member-shell .page-heading h1,
.member-shell .page-heading.compact h1 {
    margin: 8px 0 9px;
    font-size: clamp(30px, 3vw, 43px);
    line-height: 1.05;
}

.member-shell .page-heading p {
    font-size: 12px;
    line-height: 1.55;
}

.member-shell .button {
    min-height: 34px;
    padding-inline: 12px;
    gap: 8px;
    border-radius: 8px;
    font-size: 10px;
}

.member-shell .button-lime {
    box-shadow: 0 6px 18px rgba(54, 255, 22, .13), inset 0 1px rgba(255, 255, 255, .35);
}

.member-shell .icon-button {
    width: 34px;
    height: 34px;
    border-radius: 9px;
}

.member-shell .surface-panel {
    padding: 18px;
    border-radius: 11px;
}

.member-shell .panel-heading {
    margin-bottom: 14px;
}

.member-shell .panel-heading h3,
.member-shell .surface-panel h3 {
    font-size: 17px;
}

.member-shell .section-gap {
    margin-top: 15px;
}

.member-shell .hero-panel {
    min-height: 210px;
    padding: 25px 30px;
    margin-bottom: 15px;
    border-radius: 14px;
}

.member-shell .hero-content h2 {
    font-size: clamp(24px, 2.3vw, 31px);
}

.member-shell .hero-actions {
    margin-top: 17px;
}

.member-shell .metric-grid,
.member-shell .metric-grid.three {
    gap: 10px;
}

.member-shell .metric-card {
    min-height: 112px;
    padding: 15px 16px;
    border-radius: 11px;
}

.member-shell .metric-card strong,
.member-shell .metric-card strong.text-medium {
    margin-top: 7px;
    font-size: 22px;
}

.member-shell .metric-card small {
    font-size: 9px;
}

.member-shell .referral-banner {
    padding: 22px;
    gap: 18px;
}

.member-shell .plan-card,
.member-shell .real-plan-grid .plan-card {
    min-height: 260px;
    padding: 18px;
}

.member-shell .plan-card h3 {
    margin: 13px 0 6px;
    font-size: 18px;
}

.member-shell .plan-card > strong {
    padding-top: 17px;
    font-size: 23px;
}

.member-shell .payment-walkthrough {
    padding: 19px;
}

.member-shell .flow-steps > div {
    min-height: 96px;
    padding: 14px;
}

.member-shell .settings-form,
.member-shell .payment-form {
    gap: 6px;
}

.member-shell .payment-form label,
.member-shell .settings-form label {
    margin-top: 9px;
    font-size: 11px;
}

.member-shell .payment-form input:not([type=checkbox]),
.member-shell .settings-form input,
.member-shell .settings-form textarea,
.member-shell .settings-form select,
.member-shell .filter-bar input,
.member-shell .filter-bar select,
.member-shell .inline-form input,
.member-shell .inline-form select {
    min-height: 39px;
    padding: 9px 11px;
    border-radius: 8px;
    font-size: 13px;
}

.member-shell .payment-form .button,
.member-shell .settings-form .button {
    min-height: 36px;
    margin-top: 9px;
}

.member-shell .table-panel .panel-heading {
    padding: 17px 17px 0;
    margin-bottom: 12px;
}

.member-shell th,
.member-shell td {
    padding: 12px 17px;
}

.member-shell .status-pill {
    padding: 5px 8px;
    font-size: 8px;
}

.member-shell .membership-status-main {
    padding: 24px 26px;
}

.member-shell .membership-status-details {
    padding: 17px 22px;
}

.member-shell .membership-status-details > div {
    padding: 12px 0;
}

.member-shell .membership-status-main h2 {
    margin: 12px 0 7px;
    font-size: clamp(22px, 2.2vw, 30px);
}

.member-shell .membership-status-actions {
    margin-top: 18px;
}

.member-shell .notification-list,
.member-shell .signal-list {
    gap: 9px;
}

.member-shell .notification-list .surface-panel,
.member-shell .signal-list .surface-panel {
    padding: 16px 18px;
}

.member-shell .network-level {
    padding: 16px;
}

.member-shell .network-member-grid article {
    padding: 10px;
}

.member-tabbar {
    display: none;
}

.member-shell .broker-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

.member-shell .broker-mode-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 220px));
    gap: 4px;
    width: fit-content;
    margin: 0 0 14px;
    padding: 4px;
    background: #152321;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.member-shell .broker-mode-tab {
    min-height: 36px;
    padding: 0 13px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}

.member-shell .broker-mode-tab.is-active {
    background: #2d4934;
    color: var(--lime);
}

.member-shell .broker-flow-panel[hidden] {
    display: none;
}

.member-shell .broker-flow-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 11px;
}

.member-shell .broker-flow-heading h2 {
    margin: 6px 0 0;
    font-size: 19px;
}

.member-shell .broker-flow-heading p {
    margin: 0 0 2px;
    color: var(--muted);
    font-size: 10px;
}

.member-shell .broker-card {
    min-width: 0;
    min-height: 230px;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.member-shell .broker-logo-frame {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    border: 1px solid #d9e2dd;
    border-radius: 10px;
    background: #fff;
    margin: 10px 0 12px;
}

.member-shell .broker-logo {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 7px;
}

.member-shell .broker-logo-frame.logo-harmovest .broker-logo {
    width: 220px;
    max-width: none;
    height: 60px;
    padding: 8px 0 8px 8px;
    object-fit: contain;
    object-position: left center;
}

.member-shell .broker-logo-frame.logo-ec-market .broker-logo {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    padding: 2px;
}

.member-shell .broker-logo-fallback {
    width: 100%;
    color: var(--lime);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
}

.member-shell .broker-card h2 {
    margin: 0 0 7px;
    font-size: 19px;
    line-height: 1.15;
}

.member-shell .broker-card p {
    margin: 0;
    font-size: 11px;
    line-height: 1.5;
}

.member-shell .broker-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: auto;
    padding-top: 14px;
}

.member-shell .broker-card-actions .button {
    width: 100%;
    min-width: 0;
    padding-inline: 8px;
}

.member-shell .broker-card .text-button {
    display: inline-block;
    margin-top: 8px;
}

.member-shell .broker-request-panel h2,
.member-shell .broker-history h2 {
    margin: 0;
    font-size: 19px;
}

.member-shell .broker-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
}

.member-shell .broker-history .table-scroll {
    overflow-x: auto;
}

@media (hover: hover) {
    .member-shell .surface-panel,
    .member-shell .metric-card,
    .member-shell .button {
        transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
    }

    .member-shell .metric-card:hover {
        transform: translateY(-2px);
    }
}

@media (max-width: 900px) {
    .member-shell .sidebar {
        width: min(82vw, 272px);
        min-width: 0;
    }
}

@media (max-width: 690px) {
    .member-shell .topbar {
        height: 52px;
        padding-inline: 12px;
    }

    .member-shell .menu-toggle.icon-button,
    .member-shell .notification-button.icon-button {
        width: 32px;
        height: 32px;
    }

    .member-shell .avatar {
        width: 30px;
        height: 30px;
        border-radius: 8px;
    }

    .member-shell .main-column > main {
        padding: 17px 13px calc(82px + env(safe-area-inset-bottom));
    }

    .member-shell .page-heading,
    .member-shell .page-heading.compact {
        margin-bottom: 15px;
    }

    .member-shell .page-heading h1,
    .member-shell .page-heading.compact h1,
    .member-shell .academy-page .page-heading.compact h1 {
        margin: 6px 0;
        font-size: clamp(23px, 6.7vw, 27px);
    }

    .member-shell .page-heading p,
    .member-shell .academy-page .page-heading.compact p {
        font-size: 10.5px;
        line-height: 1.5;
    }

    .member-shell .page-heading .button {
        width: auto;
        min-height: 34px;
        margin-top: 10px;
    }

    .member-shell .button {
        min-height: 35px;
        padding-inline: 12px;
        gap: 7px;
        font-size: 10px;
    }

    .member-shell .surface-panel,
    .member-shell .payment-walkthrough,
    .member-shell .referral-banner,
    .member-shell .mtf-hero {
        padding: 13px;
        border-radius: 11px;
    }

    .member-shell .panel-heading {
        margin-bottom: 11px;
    }

    .member-shell .panel-heading h3,
    .member-shell .surface-panel h3 {
        font-size: 15px;
    }

    .member-shell .section-gap {
        margin-top: 11px;
    }

    .member-shell .broker-mode-switch {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-bottom: 11px;
    }

    .member-shell .broker-mode-tab {
        min-height: 34px;
        padding-inline: 7px;
        font-size: 9px;
    }

    .member-shell .broker-flow-heading {
        display: block;
        margin-bottom: 9px;
    }

    .member-shell .broker-flow-heading h2 {
        font-size: 17px;
    }

    .member-shell .broker-flow-heading p {
        margin-top: 5px;
        font-size: 10px;
    }

    .member-shell .broker-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .member-shell .broker-card {
        min-height: 0;
        padding: 13px;
    }

    .member-shell .broker-logo-frame {
        width: 52px;
        height: 52px;
        margin: 8px 0 10px;
    }

    .member-shell .broker-logo-frame.logo-harmovest .broker-logo {
        width: 190px;
        height: 52px;
        padding: 7px 0 7px 7px;
    }

    .member-shell .broker-logo-frame.logo-ec-market .broker-logo {
        padding: 1px;
    }

    .member-shell .broker-card h2 {
        font-size: 17px;
    }

    .member-shell .broker-card-actions {
        gap: 7px;
        padding-top: 11px;
    }

    .member-shell .broker-card-actions .button {
        min-height: 34px;
        font-size: 9px;
    }

    .member-shell .broker-request-panel h2,
    .member-shell .broker-history h2 {
        font-size: 17px;
    }

    .member-shell .broker-form-grid {
        grid-template-columns: 1fr;
    }

    .member-shell .broker-history table,
    .member-shell .broker-history tbody,
    .member-shell .broker-history tr,
    .member-shell .broker-history td {
        display: block;
        min-width: 0;
        width: 100%;
    }

    .member-shell .broker-history table {
        text-align: right;
    }

    .member-shell .broker-history thead {
        display: none;
    }

    .member-shell .broker-history tr {
        padding: 8px 13px;
        border-top: 1px solid var(--line);
    }

    .member-shell .broker-history td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 7px 0;
        border: 0;
        white-space: normal;
        font-size: 10px;
    }

    .member-shell .broker-history td::before {
        color: var(--muted);
        font-size: 9px;
        text-align: left;
    }

    .member-shell .broker-history td:nth-child(1)::before { content: 'Broker'; }
    .member-shell .broker-history td:nth-child(2)::before { content: 'Permintaan'; }
    .member-shell .broker-history td:nth-child(3)::before { content: 'Status'; }
    .member-shell .broker-history td:nth-child(4)::before { content: 'Dikirim'; }

    .member-shell .hero-panel {
        min-height: 0;
        padding: 15px;
        margin-bottom: 11px;
        border-radius: 12px;
    }

    .member-shell .hero-content h2 {
        margin: 7px 0;
        font-size: 20px;
    }

    .member-shell .hero-content p {
        font-size: 10.5px;
        line-height: 1.5;
    }

    .member-shell .hero-actions {
        display: flex;
        margin-top: 13px;
    }

    .member-shell .hero-actions .button {
        width: auto;
    }

    .member-shell .metric-grid,
    .member-shell .metric-grid.three {
        gap: 8px;
    }

    .member-shell .metric-card {
        min-height: 88px;
        padding: 11px;
        border-radius: 10px;
    }

    .member-shell .metric-card strong,
    .member-shell .metric-card strong.text-medium {
        margin-top: 5px;
        font-size: clamp(16px, 4.8vw, 19px);
        overflow-wrap: anywhere;
    }

    .member-shell .metric-card > span {
        font-size: 10px;
    }

    .member-shell .metric-card small {
        font-size: 8px;
    }

    .member-shell .membership-strip {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: start;
        gap: 10px;
    }

    .member-shell .membership-strip > div span {
        min-height: 24px;
        margin-bottom: 4px;
        font-size: 8px;
        line-height: 1.35;
    }

    .member-shell .membership-strip > div strong {
        font-size: 11px;
        overflow-wrap: anywhere;
    }

    .member-shell .membership-strip .button {
        grid-column: 1 / -1;
        width: 100%;
    }

    .member-shell .real-plan-grid {
        margin: 11px 0;
        gap: 9px;
    }

    .member-shell .plan-card,
    .member-shell .real-plan-grid .plan-card {
        min-height: 0;
        padding: 14px;
        border-radius: 11px;
    }

    .member-shell .plan-card h3 {
        margin: 9px 0 5px;
        font-size: 16px;
    }

    .member-shell .plan-card > strong {
        padding-top: 13px;
        font-size: 20px;
    }

    .member-shell .plan-select {
        margin-top: 11px;
        padding-top: 11px;
    }

    .member-shell .membership-status-card {
        margin-bottom: 17px;
    }

    .member-shell .membership-status-main {
        padding: 17px 15px;
    }

    .member-shell .membership-status-main h2 {
        margin: 10px 0 6px;
        font-size: 20px;
    }

    .member-shell .membership-status-actions {
        gap: 7px;
        margin-top: 14px;
    }

    .member-shell .membership-status-details {
        padding: 4px 15px 8px;
    }

    .member-shell .membership-status-details > div,
    .member-shell .membership-status-details > div:first-child,
    .member-shell .membership-status-details > div:last-child {
        padding: 9px 0;
    }

    .member-shell .membership-status-details strong {
        font-size: 12px;
    }

    .member-shell .flow-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .member-shell .flow-steps > div {
        min-height: 84px;
        padding: 11px;
    }

    .member-shell .flow-steps strong {
        margin: 8px 0 4px;
    }

    .member-shell .table-panel .panel-heading {
        padding: 13px 13px 0;
        margin-bottom: 10px;
    }

    .member-shell th,
    .member-shell td {
        padding: 10px 12px;
        font-size: 9.5px;
    }

    .member-shell .settings-form,
    .member-shell .payment-form {
        gap: 4px;
    }

    .member-shell .payment-form label,
    .member-shell .settings-form label {
        margin-top: 7px;
        font-size: 10px;
    }

    .member-shell .payment-form input:not([type=checkbox]),
    .member-shell .settings-form input,
    .member-shell .settings-form textarea,
    .member-shell .settings-form select,
    .member-shell .filter-bar input,
    .member-shell .filter-bar select,
    .member-shell .inline-form input,
    .member-shell .inline-form select {
        min-height: 40px;
        padding: 9px 11px;
        font-size: 16px;
    }

    .member-shell .payment-form .button,
    .member-shell .settings-form .button {
        min-height: 37px;
        margin-top: 8px;
    }

    .member-shell .network-level {
        padding: 12px;
    }

    .member-shell .network-member-grid {
        gap: 7px;
    }

    .member-shell .network-member-grid article {
        padding: 9px;
    }

    .member-shell .rank-current {
        gap: 13px;
    }

    .member-shell .rank-badge {
        width: 54px;
        height: 54px;
        border-radius: 13px;
        font-size: 22px;
    }

    .member-shell .achievement-card {
        padding: 11px;
        gap: 10px;
    }

    .member-shell .achievement-icon {
        width: 34px;
        height: 34px;
    }

    .member-tabbar {
        position: fixed;
        right: 8px;
        bottom: max(8px, env(safe-area-inset-bottom));
        left: 8px;
        z-index: 18;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        min-height: 58px;
        padding: 5px 5px;
        border: 1px solid rgba(93, 255, 42, .2);
        border-radius: 17px;
        background: rgba(12, 22, 24, .94);
        box-shadow: 0 15px 42px rgba(0, 0, 0, .45), inset 0 1px rgba(255, 255, 255, .035);
        backdrop-filter: blur(18px);
    }

    .member-tabbar a {
        position: relative;
        display: flex;
        min-width: 0;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        border-radius: 12px;
        color: #789087;
        font-size: 7px;
        font-weight: 700;
        line-height: 1;
        text-decoration: none;
        transition: color .18s ease, background .18s ease;
    }

    .member-tabbar a .nav-icon {
        width: 25px;
        height: 25px;
        border: 0;
        border-radius: 8px;
        background: transparent;
        box-shadow: none;
        color: inherit;
    }

    .member-tabbar a .nav-icon svg {
        width: 18px;
        height: 18px;
    }

    .member-tabbar a.active {
        color: var(--lime);
        background: linear-gradient(180deg, rgba(54, 255, 22, .13), rgba(54, 255, 22, .035));
    }

    .member-tabbar a.active::before {
        content: "";
        position: absolute;
        top: 0;
        width: 18px;
        height: 2px;
        border-radius: 0 0 3px 3px;
        background: var(--lime);
        box-shadow: 0 0 10px rgba(93, 255, 42, .55);
    }

    .member-tabbar a:focus-visible {
        outline: 2px solid var(--lime);
        outline-offset: -2px;
    }
}

@media (max-width: 370px) {
    .member-shell .main-column > main {
        padding-inline: 11px;
    }

    .member-shell .metric-card {
        padding: 10px;
    }

    .member-shell .metric-card strong,
    .member-shell .metric-card strong.text-medium {
        font-size: 15px;
    }

    .member-tabbar {
        right: 6px;
        left: 6px;
    }

    .member-tabbar a {
        font-size: 6.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .member-shell .surface-panel,
    .member-shell .metric-card,
    .member-shell .button,
    .member-tabbar a {
        transition: none;
    }
}
