/* ===== viplotto3689.com UI Refresh ===== */
:root {
    --primary: #0f9d58;
    --primary-strong: #087443;
    --primary-soft: #dcfce7;
    --primary-mist: #f4fff8;
    --accent: #ffd166;
    --accent-strong: #f59e0b;
    --ink: #10231a;
    --muted: #5f6f66;
    --line: rgba(16, 35, 26, 0.1);
    --surface: rgba(255, 255, 255, 0.88);
    --surface-strong: #ffffff;
    --bg: #eef7f1;
    --bg-deep: #dff0e3;
    --danger: #ef4444;
    --success: #16a34a;
    --shadow-sm: 0 10px 30px rgba(13, 56, 32, 0.08);
    --shadow-md: 0 18px 45px rgba(13, 56, 32, 0.12);
    --radius: 18px;
    --radius-lg: 28px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Prompt', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(255, 209, 102, 0.26), transparent 28%),
        radial-gradient(circle at top right, rgba(15, 157, 88, 0.18), transparent 30%),
        linear-gradient(180deg, #f8fff9 0%, var(--bg) 38%, #edf5ef 100%);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    font-size: 14px;
}

a { color: inherit; }

.main-content {
    padding-top: 16px;
    padding-bottom: 105px;
    min-height: 100vh;
    max-width: 540px;
    margin: 0 auto;
}

.app-shell {
    max-width: 540px;
    margin: 0 auto;
    position: relative;
}

.navbar-sl {
    background: transparent;
    padding: 14px 0 0;
    box-shadow: none;
}

.navbar-panel {
    background:
        linear-gradient(135deg, rgba(8, 116, 67, 0.95), rgba(15, 157, 88, 0.88)),
        linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0));
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 0 0 26px 26px;
    padding: 12px 14px;
    backdrop-filter: blur(10px);
    box-shadow: 0 16px 36px rgba(8, 116, 67, 0.18);
}

.brand-chip {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255,255,255,0.26), rgba(255,255,255,0.1));
    color: #fff;
    font-size: 20px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}

.brand-meta {
    color: rgba(255,255,255,0.8);
    font-size: 11px;
    line-height: 1.1;
    letter-spacing: 0.03em;
}

.brand-title {
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    margin-top: 2px;
}

.header-logo {
    display: block;
    height: 60px;
    width: auto;
    max-width: 170px;
    object-fit: contain;
    border-radius: 6px;
}

.balance-badge {
    background: rgba(6, 30, 18, 0.26);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
}

.balance-badge a { color: #fff; }

.turnover-badge {
    background: rgba(255, 193, 7, 0.18);
    border-color: rgba(255, 193, 7, 0.34);
    color: #fff7d1;
    width: clamp(62px, 18vw, 82px);
    padding: 5px 8px;
    gap: 4px;
}

.turnover-mini-label {
    color: rgba(255, 255, 255, 0.72);
    font-size: 9px;
    font-weight: 600;
    white-space: nowrap;
}

.turnover-badge b {
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#headerTurnoverRequired {
    color: #ff5c75;
}

#headerTurnoverProgress {
    color: #4ade80;
}

.header-circle-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(6, 30, 18, 0.22);
    border: 1px solid rgba(255,255,255,0.14);
    text-decoration: none;
}

.guest-header-actions .btn {
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    padding: 7px 12px;
    white-space: nowrap;
}

.bottom-nav {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 18px);
    max-width: 520px;
    height: 76px;
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(16, 35, 26, 0.08);
    backdrop-filter: blur(14px);
    border-radius: 24px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    z-index: 1050;
    box-shadow: 0 18px 35px rgba(15, 28, 20, 0.14);
    padding: 0 8px 8px;
}

.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    text-decoration: none;
    color: #6d7b73;
    font-size: 10px;
    font-weight: 600;
    gap: 2px;
    flex: 1;
    padding: 6px 0 2px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.bottom-nav .nav-item i { font-size: 20px; }

.bottom-nav .nav-item.active {
    color: var(--primary-strong);
}

.bottom-nav .nav-item.active:not(.center-btn) {
    transform: translateY(-2px);
}

.bottom-nav .nav-item.center-btn {
    position: relative;
    margin-top: -30px;
}

.bottom-nav .center-icon {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: #050505;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #10331f;
    font-size: 24px;
    overflow: hidden;
    border: 2px solid rgba(15, 157, 88, 0.38);
    box-shadow: 0 10px 22px rgba(15, 28, 20, 0.18);
}

.bottom-nav .center-logo {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    object-fit: contain;
    border-radius: 50%;
    padding: 4px;
    transform: none;
}

.bottom-nav .center-btn span {
    color: var(--primary-strong);
    font-weight: 800;
    font-size: 10px;
    margin-top: 4px;
}

.page-stack {
    display: grid;
    gap: 14px;
}

/* Action Pills (3 buttons in a row + full-width results) */
.action-pills {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr) minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
}

.pill-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    padding: 11px 12px;
    min-height: 64px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.pill-btn::before {
    content: "";
    position: absolute;
    inset: 1px 1px auto 1px;
    height: 52%;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255,255,255,0.28), rgba(255,255,255,0));
    pointer-events: none;
}

.pill-btn:hover {
    transform: translateY(-2px);
}

.pill-btn:active {
    transform: scale(0.97);
}

.pill-icon {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 16px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}

.pill-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.05;
    position: relative;
    z-index: 1;
}

.pill-title {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.pill-sub {
    font-size: 10px;
    font-weight: 600;
    opacity: 0.9;
    margin-top: 4px;
}

.pill-deposit {
    background: linear-gradient(135deg, #ff5f7a, #ff7f50);
    color: #fff;
    box-shadow: 0 10px 24px rgba(255, 95, 122, 0.28);
}

.pill-deposit .pill-icon {
    background: rgba(255,255,255,0.2);
    color: #fff6db;
}

.pill-bet {
    background: linear-gradient(135deg, #ffd74f, #ffbf1f);
    color: #114324;
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.26);
}

.pill-bet .pill-icon {
    background: rgba(17, 67, 36, 0.12);
    color: #0d7c47;
}

.pill-withdraw {
    background: linear-gradient(135deg, #58a85e, #4a9852);
    color: #fff;
    box-shadow: 0 10px 24px rgba(74, 152, 82, 0.28);
}

.pill-withdraw .pill-icon {
    background: rgba(255,255,255,0.18);
    color: #f8fafc;
}

.pill-results-full {
    background: linear-gradient(135deg, #fff7d6, #fff1a9);
    color: #574109;
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.18);
    width: 100%;
    padding: 14px 16px;
    justify-content: center;
    border: 1px solid rgba(245, 158, 11, 0.18);
}

.pill-results-full .pill-icon {
    background: linear-gradient(135deg, #0f9d58, #0b7b47);
    color: #fff7d6;
}

.pill-results-full .pill-copy {
    align-items: center;
    text-align: center;
}

.pill-results-full .pill-title {
    font-size: 16px;
}

.bank-brand-logo {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #fff;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0;
    box-shadow: 0 10px 20px rgba(15, 157, 88, 0.16);
    overflow: hidden;
}

.bank-brand-logo span {
    display: block;
    padding: 0 6px;
    line-height: 1;
    text-align: center;
}

.bank-brand-image-wrap {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: #ffffff;
    box-shadow: 0 10px 20px rgba(15, 157, 88, 0.12);
    overflow: hidden;
}

.bank-brand-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.bank-brand-kbank { background: linear-gradient(135deg, #08a04b, #006a38); }
.bank-brand-ktb { background: linear-gradient(135deg, #24a6ff, #005bbb); }
.bank-brand-scb { background: linear-gradient(135deg, #6f2dbd, #4c1d95); }
.bank-brand-bbl { background: linear-gradient(135deg, #1b4db3, #12367b); }
.bank-brand-bay { background: linear-gradient(135deg, #f7c400, #d9a200); color: #243145; }
.bank-brand-ttb { background: linear-gradient(135deg, #f36f21, #0b4ea2); }
.bank-brand-gsb { background: linear-gradient(135deg, #ff4fa1, #cc2d7a); }
.bank-brand-baac { background: linear-gradient(135deg, #0f9d58, #0a6b3c); }
.bank-brand-uob { background: linear-gradient(135deg, #e11d48, #1d4ed8); }
.bank-brand-cimb { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.bank-brand-lh { background: linear-gradient(135deg, #7c3aed, #4338ca); }
.bank-brand-icbc { background: linear-gradient(135deg, #dc2626, #7f1d1d); }
.bank-brand-default { background: linear-gradient(135deg, #334155, #0f172a); }

@media (max-width: 420px) {
    .action-pills {
        gap: 8px;
    }

    .pill-btn {
        min-height: 60px;
        padding: 10px 10px;
        gap: 7px;
    }

    .pill-icon {
        width: 32px;
        height: 32px;
        font-size: 15px;
    }

    .pill-title {
        font-size: 14px;
    }

    .pill-sub {
        font-size: 9px;
    }
}

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

.stat-card {
    background: var(--surface);
    border: 1px solid rgba(255,255,255,0.65);
    border-radius: 22px;
    padding: 14px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(12px);
}

.stat-card .icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
    color: var(--primary-strong);
    font-size: 18px;
    margin-bottom: 10px;
}

.stat-card .value {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.1;
}

.stat-card .label {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.quick-actions .btn-action {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 20px;
    padding: 14px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    box-shadow: var(--shadow-sm);
}

.quick-actions .btn-action:hover {
    transform: translateY(-2px);
}

.quick-actions .btn-action i {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    background: rgba(255,255,255,0.18);
}

.btn-deposit { background: linear-gradient(135deg, #ef4444, #fb7185); color: #fff; }
.btn-bet { background: linear-gradient(135deg, #0f9d58, #34d399); color: #fff; }
.btn-withdraw { background: linear-gradient(135deg, #0f172a, #334155); color: #fff; }
.btn-results { background: linear-gradient(135deg, #0ea5e9, #38bdf8); color: #fff; }

.promo-card {
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(255,255,255,0.76));
    box-shadow: var(--shadow-sm);
}

.carousel,
.carousel-inner,
.carousel-item {
    border-radius: inherit;
}

.promo-fallback {
    aspect-ratio: 2 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    background:
        radial-gradient(circle at top right, rgba(255, 209, 102, 0.34), transparent 30%),
        linear-gradient(135deg, #114b2d, #0f9d58 58%, #39c986);
    padding: 20px;
}

.promo-fallback i {
    font-size: 48px;
    margin-bottom: 8px;
}

.carousel-indicators {
    margin-bottom: 8px;
}

.carousel-indicators button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.card-sl {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    background: var(--surface-strong);
}

.card-sl .card-header {
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    border: none;
    padding: 10px 14px;
    font-size: 14px;
}

.form-control,
.form-select,
.input-group-text {
    border-radius: 14px;
    font-size: 14px;
    border-color: rgba(16, 35, 26, 0.12);
    min-height: 46px;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(15, 157, 88, 0.55);
    box-shadow: 0 0 0 0.2rem rgba(15, 157, 88, 0.12);
}

.input-group > .form-control,
.input-group > .form-select {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group > .input-group-text {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    background: #fff;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #22c55e);
    border: none;
    font-weight: 700;
    box-shadow: 0 10px 22px rgba(15, 157, 88, 0.2);
}

.btn-primary:hover { background: linear-gradient(135deg, var(--primary-strong), var(--primary)); }

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top left, rgba(255, 209, 102, 0.22), transparent 24%),
        radial-gradient(circle at bottom right, rgba(15, 157, 88, 0.18), transparent 30%),
        linear-gradient(160deg, #0d6b3c 0%, #15945a 38%, #f2faef 38%, #eef7f1 100%);
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 430px;
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(255,255,255,0.72);
    border-radius: 30px;
    padding: 30px 22px;
    box-shadow: 0 25px 60px rgba(13, 56, 32, 0.16);
    backdrop-filter: blur(16px);
}

.auth-logo {
    text-align: center;
    margin-bottom: 20px;
}

.auth-logo-mark {
    width: 74px;
    height: 74px;
    margin: 0 auto 14px;
    border-radius: 24px;
    background: linear-gradient(135deg, #0f9d58, #34d399);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 18px 30px rgba(15, 157, 88, 0.22);
}

.auth-logo i { font-size: 34px; color: #fff; }
.auth-logo h2 { font-weight: 800; color: var(--ink); margin-top: 6px; font-size: 24px; }

.auth-subtitle {
    color: var(--muted);
    font-size: 13px;
    margin-top: 6px;
}

.auth-support-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

.auth-support-actions a {
    min-height: 42px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.1;
    padding: 9px 10px;
}

.auth-forgot-link {
    color: #0f5132;
    background: rgba(15, 157, 88, 0.1);
    border: 1px solid rgba(15, 157, 88, 0.18);
}

.auth-line-link {
    color: #fff;
    background: #06c755;
    box-shadow: 0 12px 24px rgba(6, 199, 85, 0.22);
}

.auth-support-actions i {
    font-size: 16px;
}

.alert-sl {
    border-radius: 16px;
    border: none;
    font-size: 13px;
    font-weight: 500;
    padding: 12px 14px;
}

.page-header {
    background: linear-gradient(135deg, #0f9d58 0%, #3bc47c 100%);
    color: #fff;
    padding: 16px 18px;
    border-radius: 22px;
    box-shadow: var(--shadow-sm);
}

.page-header h4 {
    font-weight: 700;
    font-size: 16px;
    margin: 0;
}

.table-sl { font-size: 12px; }
.table-sl th { background: var(--primary); color: #fff; font-weight: 600; white-space: nowrap; font-size: 12px; }
.badge-deposit { background: var(--success); }
.badge-withdraw { background: var(--danger); }
.badge-bet { background: var(--primary); }
.badge-win { background: var(--accent); color: var(--ink); }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: #c1cec6; border-radius: 2px; }

@media (max-width: 380px) {
    .main-content {
        padding-top: 78px;
    }

    .hero-title {
        font-size: 21px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .guest-header-actions .btn {
        padding-inline: 10px;
    }
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .bottom-nav { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
    .main-content { padding-bottom: calc(105px + env(safe-area-inset-bottom)); }
}
