:root {
    --brand: #8B1E3F; --brand-dark: #6B1730; --brand-light: #F7E8EC;
    --navy: #0B1F3A; --navy-light: #14315C;
    --green: #8B1E3F; --green-light: #F7E8EC;
    --orange: #FF7A00; --orange-light: #FFF1E6;
    --danger: #E53E3E; --bg: #F5F7FA;
    --card-shadow: 0 4px 20px rgba(11, 31, 58, 0.06);
    --card-shadow-lg: 0 8px 32px rgba(11, 31, 58, 0.10);
    --radius: 18px; --radius-sm: 12px;
}
* { -webkit-tap-highlight-color: transparent; }
body { background: var(--bg); font-family: 'Inter', 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif; color: #16213A; -webkit-font-smoothing: antialiased; }
.navbar-brand { font-weight: 800; letter-spacing: -.2px; }
.bg-navy { background-color: var(--navy) !important; }
.text-navy { color: var(--navy) !important; }
.bg-green { background-color: var(--brand) !important; }
.text-green { color: var(--brand) !important; }
.bg-orange { background-color: var(--orange) !important; }
.text-orange { color: var(--orange) !important; }
.btn { border-radius: 12px; font-weight: 600; transition: transform .12s ease, box-shadow .12s ease; }
.btn:active { transform: scale(0.97); }
.btn-navy { background-color: var(--navy); border-color: var(--navy); color: #fff; }
.btn-navy:hover { background-color: var(--navy-light); border-color: var(--navy-light); color: #fff; }
.btn-green { background-color: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 14px rgba(139,30,63,.28); }
.btn-green:hover { background-color: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-orange { background-color: var(--orange); border-color: var(--orange); color: #fff; }
.btn-orange:hover { background-color: #e06d00; border-color: #e06d00; color: #fff; }
.btn-outline-navy { border-color: var(--navy); color: var(--navy); }
.btn-outline-navy:hover { background-color: var(--navy); color: #fff; }
.card { border: none; border-radius: var(--radius); box-shadow: var(--card-shadow); }
.form-control, .form-select { border-radius: 12px; border-color: #E4E9F0; padding: .65rem .9rem; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(139,30,63,.15); }
.stat-card { border-radius: var(--radius); padding: 1.25rem 1.5rem; background: #fff; box-shadow: var(--card-shadow); transition: transform .15s ease, box-shadow .15s ease; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--card-shadow-lg); }
.stat-card .label { font-size: .78rem; color: #6b7889; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.stat-card .value { font-size: 1.6rem; font-weight: 800; color: var(--navy); }
.status-badge { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .9rem; border-radius: 999px; font-weight: 700; font-size: .82rem; }
.status-playing { background: var(--green-light); color: var(--brand-dark); }
.status-available { background: #eef0f3; color: #5c6773; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.status-dot.available { background: #9AA4B2; }
.status-dot.playing { background: #1DD75B; box-shadow: 0 0 0 0 rgba(29, 215, 91, .6); animation: status-dot-pulse 1.6s cubic-bezier(.4,0,.6,1) infinite; }
@keyframes status-dot-pulse { 0% { box-shadow: 0 0 0 0 rgba(29, 215, 91, .55); } 70% { box-shadow: 0 0 0 9px rgba(29, 215, 91, 0); } 100% { box-shadow: 0 0 0 0 rgba(29, 215, 91, 0); } }
.status-badge-glow { animation: status-badge-glow 2s ease-in-out infinite; }
@keyframes status-badge-glow { 0%, 100% { box-shadow: 0 0 6px rgba(29, 215, 91, .25); } 50% { box-shadow: 0 0 16px rgba(29, 215, 91, .55), 0 0 4px rgba(29, 215, 91, .35); } }
.verify-spinner { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; border: 4px solid var(--green-light); border-top-color: var(--brand); animation: verify-spin 0.9s linear infinite; }
.verify-spinner-sm { width: 14px; height: 14px; border-radius: 50%; display: inline-block; border: 2px solid rgba(255,140,0,.25); border-top-color: var(--orange); animation: verify-spin 0.7s linear infinite; vertical-align: -2px; }
.btn-spinner { width: 14px; height: 14px; border-radius: 50%; display: inline-block; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: verify-spin 0.7s linear infinite; vertical-align: -2px; }
@keyframes verify-spin { to { transform: rotate(360deg); } }
.step-badge { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; flex-shrink: 0; }
.amount-chip { border: 2px solid #E4E9F0; background: #fff; border-radius: 14px; padding: .8rem .5rem; font-weight: 700; color: #16213A; transition: all .12s ease; }
.amount-chip:hover { border-color: var(--brand); }
.amount-chip.active { border-color: var(--brand); background: var(--green-light); color: var(--brand-dark); }
.amount-chip:active { transform: scale(0.96); }
.bonus-chip-badge { position: absolute; top: -8px; right: -6px; background: var(--orange); color: #fff; font-size: .62rem; font-weight: 800; padding: .15rem .4rem; border-radius: 999px; line-height: 1.3; box-shadow: 0 2px 6px rgba(255,122,0,.4); }
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.quick-action { display: flex; flex-direction: column; align-items: center; gap: .5rem; text-decoration: none; color: #16213A; background: #fff; border-radius: var(--radius-sm); padding: 1rem .5rem; box-shadow: var(--card-shadow); transition: transform .12s ease; }
.quick-action:active { transform: scale(0.95); }
.quick-action .icon-circle { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.quick-action span { font-size: .74rem; font-weight: 600; text-align: center; color: #4A5568; }
.txn-list-item { display: flex; align-items: center; gap: .75rem; padding: .75rem 0; border-bottom: 1px solid #F0F2F5; }
.txn-list-item:last-child { border-bottom: none; }
.txn-icon { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 1.05rem; }
.txn-icon.in { background: var(--green-light); color: var(--brand-dark); }
.txn-icon.out { background: var(--orange-light); color: var(--orange); }
.txn-details { flex: 1; min-width: 0; }
.txn-details .title { font-weight: 600; font-size: .88rem; color: #16213A; }
.txn-details .subtitle { font-size: .74rem; color: #8A94A6; }
.txn-amount { font-weight: 700; font-size: .9rem; white-space: nowrap; }
.txn-amount.in { color: var(--brand-dark); }
.txn-amount.out { color: var(--orange); }
.sidebar { background: var(--navy); min-height: 100vh; color: #dfe6f0; }
.sidebar a { color: #c9d4e3; text-decoration: none; display: block; padding: .7rem 1.1rem; border-radius: 10px; margin: .15rem .6rem; font-weight: 500; transition: background .12s ease; }
.sidebar a:hover, .sidebar a.active { background: rgba(255,255,255,.08); color: #fff; }
.bottom-nav { position: fixed; bottom: 12px; left: 12px; right: 12px; background: #fff; border-radius: 20px; box-shadow: 0 8px 28px rgba(11,31,58,.14); display: flex; justify-content: space-around; align-items: center; padding: .6rem 0; z-index: 1030; }
.bottom-nav a { color: #9AA4B2; text-decoration: none; font-size: .68rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .15rem; font-weight: 600; padding: .2rem .5rem; border-radius: 12px; transition: color .12s ease; }
.bottom-nav a.active { color: var(--brand); }
.bottom-nav a i { font-size: 1.25rem; }
.mobile-topbar { background: #fff; display: flex; align-items: center; justify-content: space-between; padding: .85rem 1rem; border-bottom: 1px solid #EEF1F5; }
.mobile-topbar .icon-btn { width: 36px; height: 36px; border-radius: 50%; border: none; background: #F5F7FA; color: #16213A; display: flex; align-items: center; justify-content: center; }
.mobile-topbar .icon-btn:active { background: #E8ECF2; }
@media (max-width: 767px) { .desktop-sidebar { display: none !important; } body { padding-bottom: 92px; } }
@media (min-width: 768px) { .bottom-nav { display: none !important; } }
.auth-wrapper { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(160deg, var(--navy) 0%, var(--navy-light) 55%, var(--brand-dark) 130%); padding: 2rem 1rem; }
.auth-card { max-width: 440px; width: 100%; border-radius: 24px; box-shadow: var(--card-shadow-lg); }
#app-preloader { position: fixed; inset: 0; z-index: 9999; background: var(--navy); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 1rem; transition: opacity .35s ease, visibility .35s ease; }
#app-preloader.hide { opacity: 0; visibility: hidden; pointer-events: none; }
#app-preloader .preloader-logo { font-size: 2.4rem; animation: preloader-pulse 1.1s ease-in-out infinite; }
#app-preloader .preloader-dots { display: flex; gap: .4rem; }
#app-preloader .preloader-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); animation: preloader-bounce 1.2s ease-in-out infinite; }
#app-preloader .preloader-dots span:nth-child(2) { animation-delay: .15s; }
#app-preloader .preloader-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes preloader-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.12); opacity: .8; } }
@keyframes preloader-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-8px); opacity: 1; } }
#nav-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0%; background: var(--brand); z-index: 10000; transition: width .3s ease, opacity .3s ease; }
#nav-progress.active { width: 70%; }
#nav-progress.done { width: 100%; opacity: 0; }
