:root {
    --bg-color: #f8fafc;
    --primary-color: #2dd4bf;
    /* Teal lembut */
    --secondary-color: #818cf8;
    /* Ungu Indigo lembut */
    --accent-color: #fbbf24;
    /* Kuning ceria */
    --danger-color: #fb7185;
    /* Pink/Merah soft */
    --text-main: #334155;
    --text-muted: #64748b;
    --card-bg: #ffffff;

    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 32px;

    --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.05);
    --shadow-button: 0 4px 14px rgba(45, 212, 191, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Nunito', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    color: var(--text-main);
}

/* Container to simulate mobile app on desktop */
#app-container {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    background-color: var(--bg-color);
    position: relative;
    overflow-x: hidden;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
}

/* Utilities */
.hidden {
    display: none !important;
}

.flex-center {
    display: flex;
    align-items: center;
}

.mr-2 {
    margin-right: 8px;
}

.text-primary {
    color: var(--primary-color);
}

.icon-inline {
    display: inline-block;
    vertical-align: middle;
}

.icon-lg {
    width: 64px;
    height: 64px;
}

.icon-sm {
    width: 16px;
    height: 16px;
}

.icon-tambah {
    color: #10b981;
}

.icon-tarik {
    color: #ef4444;
}

/* =========================================
   LOGIN SCREEN
   ========================================= */
#login-screen {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0f2fe, #f3e8ff);
    padding: 24px;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-icon {
    font-size: 64px;
    margin-bottom: 12px;
    animation: bounce 2s infinite;
}

.login-header h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 600;
}

/* Pin Display */
.pin-display {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.pin-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: white;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.pin-dot.filled {
    background-color: var(--primary-color);
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(45, 212, 191, 0.5);
}

#login-error {
    color: var(--danger-color);
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 16px;
    animation: shake 0.4s;
}

#admin-name-container {
    width: 100%;
    margin-bottom: 24px;
}

#admin-name-container input {
    width: 100%;
    padding: 16px;
    border-radius: var(--radius-md);
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    box-shadow: var(--shadow-soft);
    outline: none;
}

/* Keypad */
.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 320px;
}

.key {
    background-color: white;
    border: none;
    border-radius: var(--radius-lg);
    height: 70px;
    font-size: 28px;
    font-weight: 800;
    color: var(--text-main);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.key:active {
    transform: scale(0.95);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.action-key {
    background-color: #f1f5f9;
    font-size: 24px;
}

/* =========================================
   APP SCREEN (DASHBOARD)
   ========================================= */
#app-screen {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    background: var(--card-bg);
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #e0f2fe;
}

.greeting {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
}

#display-name {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
}

.icon-btn {
    background: #f1f5f9;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.2s;
}

/* Main Content */
.app-content {
    padding: 24px;
    flex-grow: 1;
    overflow-y: auto;
}

#admin-badge {
    background-color: var(--accent-color);
    color: #b45309;
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 16px;
}

/* Balance Card */
.balance-card {
    background: linear-gradient(135deg, var(--primary-color), #4ade80);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    color: white;
    box-shadow: var(--shadow-button);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.balance-card::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.motivation-text {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
    opacity: 0.9;
}

.balance-label {
    font-size: 16px;
    opacity: 0.8;
    margin-bottom: 4px;
    font-weight: 600;
}

.balance-amount {
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.last-update {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.8;
    margin-bottom: 24px;
}

.admin-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    flex: 1;
    padding: 12px;
    border-radius: var(--radius-md);
    border: none;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.1s;
}

.action-btn:active {
    transform: scale(0.95);
}

.action-btn.primary {
    background-color: white;
    color: var(--primary-color);
}

.action-btn.secondary {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Target Section */
.target-section {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-soft);
}

.target-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.target-header h3 {
    font-size: 16px;
    font-weight: 800;
}

.text-btn {
    background: none;
    border: none;
    color: var(--secondary-color);
    font-weight: 800;
    cursor: pointer;
}

.target-info {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 12px;
}

#target-percentage {
    color: var(--primary-color);
}

.progress-bar-container {
    height: 16px;
    background-color: #f1f5f9;
    border-radius: 8px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #fb923c);
    border-radius: 8px;
    width: 0%;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Gamification Section */
.gamification-section {
    margin-bottom: 24px;
}

.gamification-section h3 {
    font-size: 16px;
    margin-bottom: 16px;
    font-weight: 800;
}

.badges-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
}

.badges-container::-webkit-scrollbar {
    display: none;
}

.badge-item {
    min-width: 90px;
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-soft);
    text-align: center;
}

.badge-icon {
    font-size: 32px;
}

.badge-item span {
    font-size: 12px;
    font-weight: 700;
}

.badge-item.locked {
    opacity: 0.5;
    filter: grayscale(100%);
}

/* Transaction History */
.history-header {
    margin-bottom: 16px;
}

.history-header h3 {
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: 800;
}

.history-filters {
    display: flex;
    gap: 8px;
}

.filter-btn {
    padding: 6px 16px;
    border-radius: 20px;
    border: none;
    background-color: var(--card-bg);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.transaction-item {
    display: flex;
    align-items: center;
    background-color: var(--card-bg);
    padding: 16px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    animation: slideUp 0.4s ease forwards;
}

.tx-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 16px;
}

.tx-icon.in {
    background-color: #dcfce7;
    color: #166534;
}

.tx-icon.out {
    background-color: #ffe4e6;
    color: #be123c;
}

.tx-icon.bonus {
    background-color: #f3e8ff;
    color: #7e22ce;
}

.tx-details {
    flex-grow: 1;
}

.tx-title {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 4px;
}

.tx-date {
    font-size: 12px;
    color: var(--text-muted);
}

.tx-amount {
    font-size: 16px;
    font-weight: 800;
}

.tx-amount.in {
    color: #10b981;
}

.tx-amount.out {
    color: #ef4444;
}

.tx-amount.bonus {
    color: #9333ea;
}

.empty-state {
    text-align: center;
    padding: 32px;
    color: var(--text-muted);
    font-weight: 600;
}

/* =========================================
   MODALS
   ========================================= */
#modal-overlay {
    position: fixed;
    /* Diubah dari absolute ke fixed */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0 auto;
    /* Tambahan */
    max-width: 480px;
    /* Tambahan */
    width: 100%;
    /* Tambahan */
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 100;
}

.modal {
    position: fixed;
    /* Diubah dari absolute ke fixed */
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    /* Tambahan */
    max-width: 480px;
    /* Tambahan */
    width: 100%;
    /* Tambahan */
    background: var(--card-bg);
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
    padding: 32px 24px;
    z-index: 101;
    transform: translateY(100%);
    animation: slideUpModal 0.3s forwards;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
}

.close-modal {
    position: absolute;
    top: 24px;
    right: 24px;
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 800;
    color: var(--text-muted);
}

.modal h2 {
    margin-bottom: 24px;
    font-size: 20px;
    font-weight: 800;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.form-group input {
    width: 100%;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 2px solid #e2e8f0;
    font-size: 16px;
    font-weight: 600;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: var(--primary-color);
}

.submit-btn {
    width: 100%;
    padding: 16px;
    border-radius: var(--radius-md);
    border: none;
    background-color: var(--primary-color);
    color: white;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    margin-top: 8px;
}

.submit-btn.danger {
    background-color: var(--danger-color);
}

/* Toast */
.toast {
    position: fixed;
    /* Diubah dari absolute ke fixed */
    top: 24px;
    left: 0;
    right: 0;
    margin: 0 auto;
    /* Tambahan */
    max-width: 432px;
    /* (480px maksimal dikurang margin) */
    width: calc(100% - 48px);
    /* Tambahan */
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 200;
    animation: slideDownToast 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-icon {
    font-size: 32px;
}

.toast-content h4 {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 4px;
}

.toast-content p {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    /* Diubah dari absolute ke fixed */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0 auto;
    /* Tambahan agar tetap di tengah */
    max-width: 480px;
    /* Tambahan */
    width: 100%;
    /* Tambahan */
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    z-index: 300;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 5px solid #e0f2fe;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

#loading-overlay p {
    font-weight: 700;
    color: var(--text-main);
}

/* Animations */
@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUpModal {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

@keyframes slideDownToast {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Gamification UI Styles */

/* Dashboard Top & Mascot */
.dashboard-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
}

.streak-badge {
    background: linear-gradient(135deg, #ff9a9e, #fecfef);
    color: #e11d48;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: var(--shadow-soft);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(225, 29, 72, 0.2);
    }

    50% {
        box-shadow: 0 0 15px rgba(225, 29, 72, 0.6);
    }
}

.mascot-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.chat-bubble {
    position: absolute;
    right: 55px;
    bottom: 10px;
    background: white;
    padding: 12px 16px;
    border-radius: 20px;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-size: 13px;
    font-weight: 800;
    width: max-content;
    max-width: 200px;
    color: var(--text-main);
    animation: slideInChat 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

@keyframes slideInChat {
    from {
        opacity: 0;
        transform: translateX(20px) scale(0.8);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.mascot-character {
    width: 48px;
    height: 48px;
    background: #fef08a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    color: #ca8a04;
}

.mascot-character.happy {
    animation: bounceMascot 2s infinite;
}

.mascot-character.sad {
    background: #e2e8f0;
    color: #64748b;
}

.mascot-character.excited {
    background: #fbcfe8;
    color: #db2777;
    animation: bounceMascot 0.5s infinite;
}

@keyframes bounceMascot {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

/* Weekly Event */
.event-section {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-soft);
    border: 2px dashed #a7f3d0;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.event-header h3 {
    font-size: 16px;
    font-weight: 800;
}

.event-reward {
    background: #fef3c7;
    color: #d97706;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
}

.event-desc {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 12px;
}

.event-status {
    font-size: 12px;
    font-weight: 800;
    color: var(--primary-color);
    margin-top: 8px;
    text-align: right;
}

/* Timeline */
.timeline-section {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 24px;
}

.timeline-header h3 {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 20px;
}

.timeline-container {
    position: relative;
    padding-left: 20px;
    border-left: 3px solid #f1f5f9;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
    animation: slideUp 0.5s ease forwards;
    opacity: 0;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -29px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #94a3b8;
    border: 4px solid var(--card-bg);
    z-index: 2;
}

.timeline-dot.active {
    background: var(--primary-color);
}

.timeline-dot.milestone {
    background: var(--accent-color);
    transform: scale(1.2);
}

.timeline-content {
    background: #f8fafc;
    padding: 16px;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.timeline-content h4 {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 4px;
}

.timeline-content p {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

/* Mystery Box */
.mystery-box-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 50;
    cursor: pointer;
}

.mystery-box {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 10px 25px rgba(236, 72, 153, 0.4);
    animation: floatBox 3s ease-in-out infinite, glowBox 2s infinite alternate;
    transition: transform 0.2s;
}

.mystery-box:active {
    transform: scale(0.9);
}

.mystery-box .box-icon {
    margin-bottom: 2px;
}

.mystery-box .box-label {
    font-size: 10px;
    font-weight: 800;
}

@keyframes floatBox {

    0%,
    100% {
        transform: translateY(0) rotate(0);
    }

    25% {
        transform: translateY(-10px) rotate(5deg);
    }

    75% {
        transform: translateY(-10px) rotate(-5deg);
    }
}

@keyframes glowBox {
    from {
        box-shadow: 0 0 10px rgba(236, 72, 153, 0.4);
    }

    to {
        box-shadow: 0 0 25px rgba(236, 72, 153, 0.8), 0 0 15px rgba(168, 85, 247, 0.6);
    }
}

.box-opening {
    animation: popOut 0.6s ease forwards;
}

@keyframes popOut {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.8;
    }

    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* Phase 2: Advanced Gamification */

/* Themes */
body {
    transition: background-color 0.5s ease;
}

[data-theme="blue"] {
    --primary-color: #3b82f6;
    --bg-color: #eff6ff;
    --accent-color: #f59e0b;
}

[data-theme="purple"] {
    --primary-color: #a855f7;
    --bg-color: #faf5ff;
    --accent-color: #f472b6;
}

[data-theme="yellow"] {
    --primary-color: #eab308;
    --bg-color: #fefce8;
    --accent-color: #f97316;
}

[data-theme="green"] {
    --primary-color: #4ade80;
    --bg-color: #f0fdf4;
    --accent-color: #eab308;
}

.theme-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.theme-btn {
    border: 2px solid #e2e8f0;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 800;
    font-size: 14px;
}

.theme-btn:active,
.theme-btn.active {
    border-color: var(--primary-color);
    background: #f8fafc;
    transform: scale(0.95);
}

.theme-color {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Spin Banner */
.spin-banner {
    background: linear-gradient(135deg, #fbcfe8, #fbcfe8);
    border: 2px dashed #f9a8d4;
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: var(--shadow-soft);
}

.spin-banner:active {
    transform: scale(0.98);
}

.spin-banner-content h3 {
    font-size: 16px;
    font-weight: 900;
    color: #be185d;
    margin-bottom: 4px;
}

.spin-banner-content p {
    font-size: 13px;
    color: #db2777;
    font-weight: 700;
}

.spin-banner-icon {
    width: 44px;
    height: 44px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #be185d;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(190, 24, 93, 0.2);
}

/* Spin Wheel */
.spin-wheel-container {
    position: relative;
    width: 250px;
    height: 250px;
    margin: 0 auto;
    margin-top: 16px;
}

.spin-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%) rotate(180deg);
    z-index: 10;
    font-size: 40px;
    color: #ef4444;
    filter: drop-shadow(0 -4px 6px rgba(0, 0, 0, 0.2));
}

.spin-wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 8px solid var(--card-bg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
    transition: transform 4s cubic-bezier(0.1, 0.7, 0.1, 1);
}

.wheel-inner {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 50%;
    background: conic-gradient(#fb7185 0deg 60deg, #38bdf8 60deg 120deg, #a855f7 120deg 180deg,
            #4ade80 180deg 240deg, #facc15 240deg 300deg, #fb923c 300deg 360deg);
}

.wheel-seg {
    position: absolute;
    top: 0;
    left: 50%;
    transform-origin: center bottom;
    margin-left: -30px;
    width: 60px;
    height: 125px;
    font-weight: 900;
    color: white;
    text-align: center;
    padding-top: 15px;
    font-size: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.wheel-seg:nth-child(1) {
    transform: rotate(30deg);
}

.wheel-seg:nth-child(2) {
    transform: rotate(90deg);
}

.wheel-seg:nth-child(3) {
    transform: rotate(150deg);
}

.wheel-seg:nth-child(4) {
    transform: rotate(210deg);
}

.wheel-seg:nth-child(5) {
    transform: rotate(270deg);
}

.wheel-seg:nth-child(6) {
    transform: rotate(330deg);
}

.win-glow {
    animation: winGlow 1s ease 3;
}

@keyframes winGlow {
    50% {
        box-shadow: 0 0 40px var(--accent-color);
    }
}

/* Trophy Room */
.trophy-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding-bottom: 24px;
}

.trophy-item {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 20px 12px;
    text-align: center;
    border: 2px solid transparent;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.trophy-item.locked {
    filter: grayscale(1);
    opacity: 0.6;
}

.trophy-item.unlocked {
    border-color: var(--accent-color);
    background: #fefce8;
}

.trophy-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: var(--text-muted);
}

.trophy-icon svg {
    width: 32px;
    height: 32px;
}

.trophy-item.unlocked .trophy-icon {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 8px 16px rgba(250, 204, 21, 0.4);
}

.trophy-item h4 {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 6px;
}

.trophy-item p {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Daily Rewards System */
.rewards-section {
    margin-bottom: 24px;
}

.rewards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.reward-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 16px 8px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    border: 2px solid transparent;
}

.reward-card:active {
    transform: scale(0.95);
    border-color: var(--primary-color);
}

.reward-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e0f2fe;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reward-icon svg {
    width: 24px;
    height: 24px;
}

.reward-card:active .reward-icon {
    transform: scale(1.1);
}

.reward-info h4 {
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 4px;
    line-height: 1.2;
}

.reward-info p {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
}

/* Claimed State */
.reward-card.claimed {
    filter: grayscale(1);
    opacity: 0.6;
    pointer-events: none;
    border: 2px dashed #cbd5e1;
    box-shadow: none;
}

.reward-card.claimed .reward-icon {
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
}

/* =========================================
   CHILD MODE ACTIONS
   ========================================= */
.child-actions {
    display: flex;
    gap: 12px;
}

.action-btn.secondary {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

/* =========================================
   WITHDRAWAL RECEIPT MODAL (STRUK)
   ========================================= */
.receipt-container {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.receipt-header {
    text-align: center;
    padding: 8px 0 20px;
}

.receipt-check-icon {
    width: 64px;
    height: 64px;
    background: #fef3c7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.receipt-check-icon svg {
    width: 32px;
    height: 32px;
    color: #f59e0b;
}

.receipt-header h2 {
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 4px;
    color: var(--text-main);
}

.receipt-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

.receipt-divider {
    border-top: 2px dashed #e2e8f0;
    margin: 12px 0;
}

.receipt-body {
    padding: 0 4px;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.receipt-row:last-child {
    border-bottom: none;
}

.receipt-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

.receipt-value {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-main);
    text-align: right;
    max-width: 60%;
    word-break: break-all;
}

.receipt-txid {
    font-size: 11px;
    font-family: monospace;
    color: var(--text-muted);
}

.receipt-footer {
    text-align: center;
    padding: 16px 0 4px;
}

.mt-4 {
    margin-top: 16px;
}

/* =========================================
   STATUS BADGES
   ========================================= */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
}

.status-badge.pending {
    background: #fef3c7;
    color: #d97706;
    border: 1.5px solid #fde68a;
}

.status-badge.success {
    background: #dcfce7;
    color: #15803d;
    border: 1.5px solid #bbf7d0;
}

.status-badge svg {
    width: 14px;
    height: 14px;
}

/* =========================================
   PENDING TRANSACTION ITEMS
   ========================================= */
.tx-pending {
    border: 2px dashed #fde68a !important;
    background: #fffbeb !important;
}

.tx-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 800;
    vertical-align: middle;
    margin-left: 4px;
}

.tx-status-badge.pending {
    background: #fef3c7;
    color: #d97706;
}

.tx-status-badge svg {
    width: 10px;
    height: 10px;
}

.tx-admin-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.btn-approve-inline,
.btn-reject-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 20px;
    border: none;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
}

.btn-approve-inline {
    background: #dcfce7;
    color: #15803d;
}

.btn-reject-inline {
    background: #ffe4e6;
    color: #be123c;
}

.btn-approve-inline:active,
.btn-reject-inline:active {
    transform: scale(0.95);
    opacity: 0.8;
}

.btn-approve-inline svg,
.btn-reject-inline svg {
    width: 12px;
    height: 12px;
}

/* =========================================
   PENDING APPROVAL POPUP (ADMIN)
   ========================================= */
.pending-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 50vh;
    overflow-y: auto;
}

.pending-card {
    background: #fffbeb;
    border: 2px solid #fde68a;
    border-radius: var(--radius-md);
    padding: 16px;
}

.pending-card-info {
    margin-bottom: 12px;
}

.pending-amount {
    font-size: 22px;
    font-weight: 900;
    color: var(--text-main);
    margin-bottom: 4px;
}

.pending-note {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.pending-date {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.pending-txid {
    font-size: 10px;
    color: #94a3b8;
    font-family: monospace;
    margin-top: 4px;
}

.pending-card-actions {
    display: flex;
    gap: 10px;
}

.btn-approve,
.btn-reject {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border-radius: var(--radius-md);
    border: none;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
}

.btn-approve {
    background: #10b981;
    color: white;
}

.btn-reject {
    background: #f43f5e;
    color: white;
}

.btn-approve:active,
.btn-reject:active {
    transform: scale(0.95);
    opacity: 0.85;
}

.btn-approve svg,
.btn-reject svg {
    width: 16px;
    height: 16px;
}

/* Text muted utility */
.text-muted {
    color: var(--text-muted);
}

.mb-4 {
    margin-bottom: 16px;
}

/* =========================================
   CLICKABLE TRANSACTION CARD
   ========================================= */
.tx-clickable {
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s;
}

.tx-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.tx-clickable:active {
    transform: scale(0.98);
}

/* =========================================
   TRANSACTION DETAIL MODAL EXTRAS
   ========================================= */
.txd-status-area {
    margin-top: 8px;
}

.txd-admin-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

/* Rejected status badge */
.status-badge.rejected {
    background: #ffe4e6;
    color: #be123c;
    border: 1.5px solid #fecdd3;
}

.mt-2 {
    margin-top: 8px;
}

/* =========================================
   TAMBAHAN WARNA UNTUK PENDING APPROVAL
   ========================================= */
.pending-card-tambah {
    border-color: #a7f3d0 !important;
    background-color: #f0fdf4 !important;
}

.pending-card-tarik {
    border-color: #fde68a !important;
    background-color: #fffbeb !important;
}

.text-green {
    color: #10b981;
}

.text-red {
    color: #ef4444;
}

/* =========================================
   RESPONSIVE & MOBILE OPTIMIZATIONS
   (Menyesuaikan tampilan untuk layar HP kecil)
   ========================================= */
@media screen and (max-width: 480px) {
    /* Kurangi padding di seluruh aplikasi agar konten lebih lega */
    .app-header { 
        padding: 16px; 
    }
    .app-content { 
        padding: 16px; 
    }

    /* Sesuaikan ukuran Header (Avatar & Nama) */
    .avatar { 
        width: 46px; 
        height: 46px; 
    }
    .user-info {
        gap: 12px;
    }
    #display-name { 
        font-size: 18px; 
        line-height: 1.2; 
    }
    .greeting { 
        font-size: 12px; 
    }
    
    /* Sesuaikan tombol ikon di header */
    .icon-btn { 
        width: 38px; 
        height: 38px; 
        font-size: 18px; 
    }
    .icon-btn.mr-2 { 
        margin-right: 8px; 
    }

    /* Rapikan bagian atas (Streak & Mascot) */
    .dashboard-top { 
        margin-bottom: 16px; 
        align-items: center; /* Pastikan posisinya sejajar secara vertikal */
    }
    .streak-badge { 
        padding: 6px 14px; 
        font-size: 12px; 
    }
    .mascot-character { 
        width: 42px; 
        height: 42px; 
    }

    /* Sesuaikan Kartu Saldo Utama */
    .balance-card { 
        padding: 20px 16px; 
        margin-bottom: 20px; 
    }
    .balance-amount { 
        font-size: 30px; 
        margin-bottom: 4px; 
    }
    .last-update { 
        margin-bottom: 16px; 
    }
    
    /* Tombol Aksi (Minta Tambah & Minta Tarik) */
    .action-btn { 
        padding: 10px; 
        font-size: 14px; 
        gap: 6px; 
    }
    .child-actions { 
        gap: 8px; 
    }
    .admin-actions { 
        gap: 8px; 
    }

    /* Sesuaikan ukuran Target & Hadiah */
    .target-section { 
        padding: 16px; 
        margin-bottom: 20px; 
    }
    .rewards-section { 
        margin-bottom: 20px; 
    }
    .reward-card { 
        padding: 12px 4px; 
    }
    .reward-icon { 
        width: 36px; 
        height: 36px; 
        margin-bottom: 8px; 
    }
    .reward-info h4 { 
        font-size: 11px; 
    }

    /* List Transaksi */
    .transaction-item { 
        padding: 12px; 
    }
    .tx-icon { 
        width: 40px; 
        height: 40px; 
        font-size: 18px; 
        margin-right: 12px; 
    }
    .tx-title { 
        font-size: 13px; 
    }
    .tx-amount { 
        font-size: 14px; 
    }
}