:root {
    --member-primary: #0ea5e9;
    --member-bg: #f0f9ff;
    --sales-ink: #0c4a6e;
    --sales-accent: #0ea5e9;
    --sales-accent-2: #2dd4bf;
}
body {
    min-height: 100vh;
    background-color: var(--member-bg);
    background-image:
        radial-gradient(circle at 10% -12%, rgba(125, 211, 252, .55), transparent 44%),
        radial-gradient(circle at 100% 0%, rgba(45, 212, 191, .22), transparent 40%);
    color: #0f172a;
}
.navbar {
    min-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    background: #fff !important;
}
.navbar > .container {
    min-height: 0;
    padding-top: .1rem;
    padding-bottom: .1rem;
}
.navbar-brand { letter-spacing: -0.02em; }
a.member-wallet-pill,
a.member-wallet-pill:link,
a.member-wallet-pill:visited {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .4rem .85rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #38bdf8 0%, #2dd4bf 100%);
    color: #fff;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(14, 165, 233, .28);
    transition: transform .15s ease, box-shadow .15s ease, background .2s ease;
    white-space: nowrap;
    line-height: 1.2;
    border: 0;
}
a.member-wallet-pill:hover,
a.member-wallet-pill:focus {
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(14, 165, 233, .32);
}
a.member-wallet-pill .member-wallet-pill-label {
    opacity: .85;
    font-weight: 500;
}
a.member-wallet-pill .bi { font-size: 1rem; }
.member-navbar-actions {
    min-width: 0;
}
a.member-wallet-pill--compact {
    padding: .3rem .55rem;
    gap: .25rem;
    font-size: .75rem;
    box-shadow: 0 2px 10px rgba(14, 165, 233, .22);
    max-width: min(42vw, 10.5rem);
}
a.member-wallet-pill--compact .bi {
    font-size: .9rem;
    flex-shrink: 0;
}
a.member-wallet-pill--compact .js-wallet-balance {
    font-size: inherit;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
a.member-wallet-pill--compact:hover,
a.member-wallet-pill--compact:focus {
    transform: none;
    box-shadow: 0 4px 14px rgba(14, 165, 233, .3);
}
.member-navbar-toggler {
    margin-left: 0 !important;
    padding: .45rem .6rem;
    border-radius: 12px;
    border-color: rgba(14, 165, 233, .22);
}
[data-bs-theme="dark"] a.member-wallet-pill {
    box-shadow: 0 6px 16px rgba(14, 165, 233, .4);
}
.navbar .nav-link {
    font-size: .92rem;
    padding-left: .55rem;
    padding-right: .55rem;
}
.navbar .dropdown-menu {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, .12);
    padding: .45rem;
}
.navbar .dropdown-item {
    border-radius: 12px;
    font-size: .92rem;
    padding: .55rem .7rem;
}
.member-brand {
    display: inline-flex;
    align-items: center;
    gap: 0;
    min-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin: 0;
    line-height: 1;
    min-width: 360px;
    min-height: 72px;
    overflow: visible;
    flex: 0 1 auto;
}
@media (max-width: 991.98px) {
    .navbar > .container {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: .35rem .5rem;
    }
    .member-brand {
        min-width: 0;
        flex: 1 1 auto;
        max-width: calc(100% - 11.5rem);
    }
}
.member-brand-logo {
    width: auto;
    max-width: 220px;
    max-height: 50px;
    object-fit: contain;
    display: block;
    transform: scale(3.05, 2.05);
    transform-origin: left center;
    filter: drop-shadow(0 10px 16px rgba(15, 23, 42, .08));
}
.member-brand-fallback,
.member-login-logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #38bdf8, #2dd4bf);
    color: #fff;
    font-weight: 800;
    border-radius: 16px;
}
.member-brand-fallback {
    width: 104px;
    height: 104px;
    font-size: 1.5rem;
}
.card {
    border: 0;
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .08);
}
.btn-primary {
    background: #0ea5e9;
    border-color: #0ea5e9;
    color: #fff;
}
.btn-primary:hover,
.btn-primary:focus {
    background: #0284c7;
    border-color: #0284c7;
    color: #fff;
}
.member-login {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: #f0f9ff;
    background-image:
        radial-gradient(circle at 15% 10%, rgba(125, 211, 252, .7), transparent 42%),
        radial-gradient(circle at 90% 90%, rgba(45, 212, 191, .28), transparent 46%);
}
.member-login-card { width: min(100%, 420px); }
.member-login-logo-wrap {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: .5rem;
}
.member-login-logo {
    width: auto;
    max-width: min(320px, 100%);
    max-height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 18px 28px rgba(15, 23, 42, .16));
}
.member-login-logo-fallback {
    width: 92px;
    height: 92px;
    font-size: 1.5rem;
    margin: 0 auto .75rem;
}
.stat-card {
    border-radius: 18px;
    background: linear-gradient(135deg, #38bdf8, #2dd4bf);
    color: white;
}
.member-renew-card {
    border-radius: 18px;
    border: 1px solid rgba(255, 193, 7, .45);
    background: rgba(255, 193, 7, .08);
}
[data-bs-theme="dark"] .member-renew-card {
    background: rgba(255, 193, 7, .12);
    border-color: rgba(255, 193, 7, .35);
}
.member-due-countdown {
    margin-top: .35rem;
    padding: .75rem .85rem;
    border-radius: .85rem;
    background: #eef0ff;
    border: 1px solid rgba(115, 103, 240, .18);
}
.member-due-countdown--urgent {
    background: #fff6e5;
    border-color: rgba(255, 193, 7, .45);
}
.member-due-countdown--expired {
    background: #fdecec;
    border-color: rgba(220, 53, 69, .25);
}
.member-conn-hint {
    color: #b45309;
    line-height: 1.4;
}
[data-bs-theme="dark"] .member-conn-hint {
    color: #fbbf24;
}
[data-bs-theme="dark"] .member-due-countdown {
    background: rgba(115, 103, 240, .16);
    border-color: rgba(115, 103, 240, .28);
}
[data-bs-theme="dark"] .member-due-countdown--urgent {
    background: rgba(255, 193, 7, .14);
}
[data-bs-theme="dark"] .member-due-countdown--expired {
    background: rgba(220, 53, 69, .16);
}
.member-due-countdown-label {
    font-size: .75rem;
    color: #6b7280;
    margin-bottom: .45rem;
}
.member-due-units {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .4rem;
    text-align: center;
}
.member-due-units strong {
    display: block;
    font-variant-numeric: tabular-nums;
    font-size: 1.2rem;
    line-height: 1.2;
    letter-spacing: .02em;
}
.member-due-units span {
    font-size: .7rem;
    color: #6b7280;
    text-transform: lowercase;
}
.member-due-expired-msg {
    margin-top: .5rem;
    font-size: .8rem;
    color: #b42318;
}
.usage-card-primary {
    background: linear-gradient(135deg, #2dd4bf, #38bdf8);
    color: white;
}
.support-payment-info {
    white-space: normal;
    line-height: 1.65;
}
.package-choice {
    border: 1px solid rgba(15, 23, 42, .1);
    border-radius: 16px;
    padding: .85rem 1rem;
    background: #fff;
    cursor: pointer;
}
.package-choice:has(input:checked) {
    border-color: var(--member-primary);
    box-shadow: 0 0 0 .2rem rgba(115, 103, 240, .12);
}
.invoice-total { font-size: 1.35rem; font-weight: 800; }
@media (max-width: 575.98px) {
    .navbar {
        padding-top: .35rem;
        padding-bottom: .35rem;
    }
    .navbar > .container {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: .5rem;
        padding-top: .2rem;
        padding-bottom: .2rem;
    }
    .member-brand {
        width: auto;
        min-width: 150px;
        min-height: 62px;
        justify-content: flex-start;
        overflow: visible;
        flex: 0 0 auto;
    }
    .member-brand-logo {
        max-width: 115px;
        max-height: 42px;
        transform: scale(1.9);
        transform-origin: left center;
    }
    .member-navbar-toggler {
        padding: .5rem .65rem;
        background: #fff;
        flex: 0 0 auto;
    }
    a.member-wallet-pill--compact {
        max-width: min(38vw, 9.5rem);
        padding: .28rem .5rem;
        font-size: .72rem;
    }
    .navbar-collapse {
        width: 100%;
        flex-basis: 100%;
        margin-top: .4rem;
        border-top: 1px solid rgba(15, 23, 42, .08);
    }
    .navbar-nav {
        padding-top: .65rem;
        gap: .25rem;
    }
    .navbar .nav-link {
        border-radius: 14px;
        padding: .65rem .75rem;
    }
    .navbar .dropdown-menu {
        box-shadow: none;
        border: 1px solid rgba(15, 23, 42, .08);
        margin: 0 0 .35rem 0;
        padding: .35rem;
        background: #f8fafc;
    }
    .navbar .dropdown-item {
        padding: .6rem .75rem;
    }
}
@media print {
    nav, footer, .no-print { display: none !important; }
    body { background: white; }
    .card { box-shadow: none; border: 1px solid #ddd; }
}

/* Pemakaian: heatmap harian */
.member-heat-cell {
    width: 10px;
    height: 22px;
    border-radius: 4px;
    display: inline-block;
    flex: 0 0 auto;
}
.member-heat-0 { background: rgba(115, 103, 240, 0.12); }
.member-heat-1 { background: rgba(115, 103, 240, 0.28); }
.member-heat-2 { background: rgba(115, 103, 240, 0.45); }
.member-heat-3 { background: rgba(115, 103, 240, 0.65); }
.member-heat-4 { background: rgba(115, 103, 240, 0.88); }

[data-bs-theme="dark"] {
    color-scheme: dark;
}
[data-bs-theme="dark"] body {
    background-color: #0c1a24;
    background-image:
        radial-gradient(circle at 12% -8%, rgba(56, 189, 248, .18), transparent 42%),
        radial-gradient(circle at 100% 0%, rgba(45, 212, 191, .12), transparent 38%);
    color: #e0f2fe;
}
[data-bs-theme="dark"] .navbar {
    background: #111827 !important;
    border-color: rgba(148, 163, 184, 0.15) !important;
}
[data-bs-theme="dark"] .navbar .nav-link {
    color: #e2e8f0;
}
[data-bs-theme="dark"] .card {
    background: #1e293b;
    color: #e2e8f0;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
[data-bs-theme="dark"] .text-muted {
    color: #94a3b8 !important;
}
[data-bs-theme="dark"] .dropdown-menu {
    background: #1e293b;
    border-color: rgba(148, 163, 184, 0.2);
}
[data-bs-theme="dark"] .dropdown-item {
    color: #e2e8f0;
}
[data-bs-theme="dark"] .package-choice {
    background: #0f172a;
    border-color: rgba(148, 163, 184, 0.2);
}
[data-bs-theme="dark"] .member-heat-0 { background: rgba(139, 123, 255, 0.15); }
[data-bs-theme="dark"] .member-heat-1 { background: rgba(139, 123, 255, 0.30); }
[data-bs-theme="dark"] .member-heat-2 { background: rgba(139, 123, 255, 0.48); }
[data-bs-theme="dark"] .member-heat-3 { background: rgba(139, 123, 255, 0.68); }
[data-bs-theme="dark"] .member-heat-4 { background: rgba(167, 156, 255, 0.92); }

/* Floating "Hubungi CS" bubble */
.member-cs-bubble {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1080;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .65rem .85rem .65rem .7rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #fff !important;
    text-decoration: none !important;
    box-shadow: 0 12px 28px rgba(18, 140, 126, .35), 0 4px 8px rgba(0, 0, 0, .15);
    font-weight: 600;
    line-height: 1.15;
    transform-origin: bottom right;
    transition: transform .18s ease, box-shadow .18s ease, opacity .15s ease;
    animation: memberCsBubbleIn .35s ease both;
}
.member-cs-bubble:hover,
.member-cs-bubble:focus {
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(18, 140, 126, .45), 0 6px 12px rgba(0, 0, 0, .18);
}
.member-cs-bubble-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}
.member-cs-bubble-text {
    display: inline-flex;
    flex-direction: column;
    padding-right: .6rem;
}
.member-cs-bubble-title { font-size: .92rem; }
.member-cs-bubble-sub { font-size: .72rem; opacity: .85; font-weight: 500; }
.member-cs-bubble-close {
    appearance: none;
    background: rgba(255, 255, 255, .18);
    border: 0;
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    line-height: 18px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    margin-left: -.25rem;
    opacity: .85;
}
.member-cs-bubble-close:hover { opacity: 1; background: rgba(255, 255, 255, .28); }
@keyframes memberCsBubbleIn {
    from { opacity: 0; transform: translateY(8px) scale(.95); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}
@media (max-width: 575.98px) {
    .member-cs-bubble {
        right: 12px;
        bottom: 12px;
        padding: .55rem .55rem .55rem .5rem;
    }
    .member-cs-bubble-text { display: none; }
    .member-cs-bubble-close {
        position: absolute;
        top: -6px;
        right: -6px;
        background: #1f2937;
    }
}
[data-bs-theme="dark"] .member-cs-bubble {
    box-shadow: 0 14px 32px rgba(0, 0, 0, .55), 0 6px 12px rgba(0, 0, 0, .35);
}

/* WiFi member page */
.member-wifi-tr069 {
    border-radius: .5rem;
}
[data-bs-theme="dark"] .member-wifi-tr069 {
    background: rgba(255, 255, 255, .04) !important;
    border-color: rgba(255, 255, 255, .12) !important;
}

.member-optical {
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: .5rem;
    padding: .65rem .75rem;
    background: rgba(0, 0, 0, .015);
}
[data-bs-theme="dark"] .member-optical {
    border-color: rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .03);
}
.member-optical-track {
    position: relative;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(0, 0, 0, .08);
}
.member-optical-track-zone {
    position: absolute;
    top: 0; bottom: 0;
}
.member-optical-zone-bad   { left: 0%;  width: 13%; background: rgba(220, 53, 69,  .35); }
.member-optical-zone-warn  { left: 13%; width: 10%; background: rgba(255, 193, 7,  .35); }
.member-optical-zone-fair  { left: 23%; width: 13%; background: rgba(255, 193, 7,  .20); }
.member-optical-zone-good  { left: 36%; width: 64%; background: rgba(25,  135, 84, .25); }
.member-optical-track-marker {
    position: absolute;
    top: -3px;
    width: 14px;
    height: 14px;
    margin-left: -7px;
    border-radius: 999px;
    box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(0, 0, 0, .25);
}
[data-bs-theme="dark"] .member-optical-track-marker {
    box-shadow: 0 0 0 2px #1f2937, 0 1px 3px rgba(0, 0, 0, .55);
}

.member-wallet-checkout-spinner {
    width: 3rem;
    height: 3rem;
    margin-left: auto;
    margin-right: auto;
    border: 0.3rem solid rgba(115, 103, 240, 0.2);
    border-top-color: var(--member-primary, #7367f0);
    border-radius: 50%;
    animation: memberWalletSpin 0.75s linear infinite;
}
@keyframes memberWalletSpin {
    to { transform: rotate(360deg); }
}
.member-wallet-checkout-card {
    border: 0;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.member-ajak-banner {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    color: #fff;
    background:
        radial-gradient(680px 260px at 100% -10%, rgba(255, 255, 255, .35), transparent 55%),
        linear-gradient(135deg, #38bdf8 0%, #0ea5e9 42%, #2dd4bf 100%);
    box-shadow: 0 16px 36px rgba(14, 165, 233, .25);
}
.member-ajak-shine {
    pointer-events: none;
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .22) 50%, transparent 62%);
    transform: translateX(-60%);
    animation: memberAjakShine 5.5s ease-in-out infinite;
}
@keyframes memberAjakShine {
    0%, 55% { transform: translateX(-70%); opacity: 0; }
    70% { opacity: .7; }
    100% { transform: translateX(70%); opacity: 0; }
}
.member-ajak-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.25rem 1.35rem;
}
.member-ajak-copy {
    min-width: 0;
    flex: 1 1 auto;
}
.member-ajak-kicker {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .22rem .7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .22);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.member-ajak-title {
    margin: .7rem 0 .45rem;
    font-size: clamp(1.25rem, 2.4vw, 1.7rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.02em;
    max-width: 34rem;
}
.member-ajak-body {
    margin: 0 0 .9rem;
    max-width: 36rem;
    font-size: .95rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, .92);
}
.member-ajak-steps {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}
.member-ajak-steps li {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .32rem .7rem .32rem .35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    font-size: .8rem;
    font-weight: 600;
}
.member-ajak-steps span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    background: #fff;
    color: #0284c7;
    font-size: .72rem;
    font-weight: 800;
}
.member-ajak-progress {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem .85rem;
    margin: -.25rem 0 .85rem;
    font-size: .8rem;
    font-weight: 600;
    color: #ecfeff;
}
.member-ajak-cta {
    background: #fff;
    border: 0;
    color: #0369a1;
    font-weight: 800;
    border-radius: 999px;
    padding: .65rem 1.2rem;
    box-shadow: 0 10px 22px rgba(12, 74, 110, .16);
}
.member-ajak-cta:hover,
.member-ajak-cta:focus {
    background: #ecfeff;
    color: #0c4a6e;
}
.member-ajak-prize {
    flex: 0 0 auto;
    align-self: center;
    min-width: 10.5rem;
    text-align: center;
    padding: 1rem 1.15rem;
    border-radius: 18px;
    background: #fff;
    color: #0369a1;
    box-shadow: 0 12px 28px rgba(12, 74, 110, .14);
    transform: rotate(2deg);
}
.member-ajak-prize-label {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    opacity: .75;
}
.member-ajak-prize-amount {
    font-size: 1.55rem;
    font-weight: 900;
    letter-spacing: -.03em;
    line-height: 1.15;
    margin: .2rem 0 .15rem;
}
.member-ajak-prize-note {
    font-size: .75rem;
    font-weight: 600;
}
.member-ajak-mini {
    outline: 1px solid rgba(14, 165, 233, .28);
}
@media (max-width: 767.98px) {
    .member-ajak-inner {
        flex-direction: column;
        padding: 1.1rem 1.05rem 1.2rem;
    }
    .member-ajak-prize {
        width: 100%;
        transform: none;
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: .5rem;
        text-align: left;
        min-width: 0;
        padding: .75rem 1rem;
    }
    .member-ajak-prize-amount {
        font-size: 1.25rem;
        margin: 0;
    }
    .member-ajak-prize-note {
        margin-left: auto;
    }
    .member-ajak-cta {
        width: 100%;
    }
}
[data-bs-theme="dark"] .member-ajak-banner {
    box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}
[data-bs-theme="dark"] .member-ajak-mini {
    outline-color: rgba(56, 189, 248, .35);
}

.alert-success {
    background: #ecfeff;
    border: 1px solid #67e8f9;
    color: #155e75;
}
.alert-danger {
    background: #fff1f2;
    border: 1px solid #fda4af;
    color: #9f1239;
}
.alert-warning {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #854d0e;
}
