@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --bg-blue: #1e3a8a;
    --primary: #4338ca;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --red: #ef4444;
    --yellow: #f59e0b;
    --purple: #8b5cf6;
    --green: #10b981;
    --bg-gray: #f8fafc;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Plus Jakarta Sans', sans-serif; }

body { background: #cbd5e1; color: var(--text-dark); height: 100dvh; overflow: hidden; display: flex; justify-content: center; }

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-white { color: var(--white); }
.text-primary { color: var(--primary); }
.text-yellow { color: var(--yellow); }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 700; }
.text-sm { font-size: 0.85rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.p-3 { padding: 1rem; }
.px-3 { padding-left: 1rem; padding-right: 1rem; }
.pb-5 { padding-bottom: 5rem; }
.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
.flex-1 { flex: 1; }
.m-0 { margin: 0; }
.bg-light { background: var(--bg-gray); }
.rounded-xl { border-radius: 16px; }

/* Buttons */
.btn { padding: 12px 20px; border: none; font-size: 0.95rem; font-weight: 700; cursor: pointer; transition: 0.2s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-sm { padding: 8px 14px; font-size: 0.8rem; }
.btn-primary { background: var(--primary); color: white; }
.btn-secondary { background: #e2e8f0; color: var(--text-dark); }
.btn-danger { background: var(--red); color: white; }
.btn-block { width: 100%; }
.rounded-pill { border-radius: 50px; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.2); border: none; font-size: 1rem; display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* Form */
.input-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 5px; color: var(--text-dark); }
.form-input { width: 100%; padding: 12px; border: 1px solid #cbd5e1; border-radius: 12px; font-size: 1rem; background: #fff; }
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.1); }

/* App Container */
.app-container {
    width: 100%; max-width: 480px; height: 100dvh;
    background: var(--bg-blue);
    position: relative; box-shadow: 0 0 40px rgba(0,0,0,0.2);
    display: flex; flex-direction: column; overflow: hidden;
}
.hidden { display: none !important; }
.page-content { flex: 1; display: none; flex-direction: column; }
.page-content.active { display: flex; }

/* Login */
.login-screen { justify-content: center; align-items: center; padding: 20px; }
.glass-box { background: white; border-radius: 24px; padding: 30px; width: 100%; box-shadow: 0 20px 40px rgba(0,0,0,0.2); }

/* Header */
.header-bg { position: absolute; top: 0; left: 0; width: 100%; height: 350px; background: linear-gradient(180deg, #1e3a8a 0%, #1e40af 100%); z-index: 0; }
.pattern-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: radial-gradient(rgba(255, 255, 255, 0.1) 2px, transparent 2px); background-size: 30px 30px; opacity: 0.5; }
.topbar { position: relative; z-index: 10; display: flex; justify-content: space-between; align-items: center; padding: 20px 20px 10px 20px; }
.user-greeting { display: flex; align-items: center; gap: 12px; color: white; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--yellow); color: white; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.greeting-text { font-size: 0.8rem; opacity: 0.9; }
.user-name { font-weight: 700; font-size: 1.1rem; }
.main-scroll { position: relative; z-index: 10; flex: 1; overflow-y: auto; }

/* Card */
.arisan-card { background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05)); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.2); border-radius: 20px; padding: 20px; color: white; }
.card-header-flex { display: flex; align-items: center; gap: 15px; }
.card-icon { width: 45px; height: 45px; border-radius: 12px; background: linear-gradient(135deg, var(--yellow), #d97706); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.card-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 1px; opacity: 0.8; }
.card-title { font-size: 1.2rem; font-weight: 800; }
.saldo-section { border-top: 1px solid rgba(255,255,255,0.1); border-bottom: 1px solid rgba(255,255,255,0.1); padding: 15px 0; }
.saldo-label { font-size: 0.85rem; opacity: 0.9; margin-bottom: 5px; }
.saldo-amount { font-size: 1.6rem; font-weight: 800; }
.progress-labels { display: flex; justify-content: space-between; font-size: 0.8rem; margin-bottom: 8px; }
.progress-bar { width: 100%; height: 6px; background: rgba(0,0,0,0.2); border-radius: 10px; }
.progress-fill { height: 100%; background: var(--yellow); border-radius: 10px; }

/* Bottom Sheet */
.bottom-sheet { background: #fff; border-radius: 30px 30px 0 0; padding: 25px 20px 80px 20px; flex: 1; box-shadow: 0 -10px 30px rgba(0,0,0,0.05); }
.min-h-screen { min-height: calc(100vh - 120px); }

/* Squircle Menus */
.quick-menus { display: flex; justify-content: space-between; padding: 10px 5px; }
.menu-item { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; color: inherit; }
.squircle { width: 60px; height: 60px; border-radius: 20px; display: flex; justify-content: center; align-items: center; font-size: 1.5rem; color: white; box-shadow: 0 6px 15px rgba(0,0,0,0.1); }
.bg-red { background: linear-gradient(135deg, #f87171, #dc2626); }
.bg-yellow { background: linear-gradient(135deg, #fbbf24, #d97706); }
.bg-purple { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.bg-green { background: linear-gradient(135deg, #34d399, #059669); }
.menu-item span { font-size: 0.8rem; font-weight: 600; color: #475569; }

/* Table */
.table-responsive { width: 100%; overflow-x: auto; background: white; border-radius: 16px; border: 1px solid #e2e8f0; }
.table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.table th, .table td { padding: 12px; text-align: left; border-bottom: 1px solid #e2e8f0; }
.table th { background: #f8fafc; font-weight: 700; color: var(--text-muted); }
.table tr:last-child td { border-bottom: none; }
.badge { padding: 4px 8px; border-radius: 20px; font-size: 0.7rem; font-weight: 700; }
.badge-active { background: #dcfce7; color: #166534; }
.badge-winner { background: #fef9c3; color: #854d0e; }
.badge-removed { background: #fee2e2; color: #991b1b; }
.btn-icon { width: 30px; height: 30px; padding: 0; display: inline-flex; border-radius: 8px; }

/* Bottom Nav */
.bottom-nav { position: absolute; bottom: 0; left: 0; width: 100%; background: white; border-top-left-radius: 24px; border-top-right-radius: 24px; display: flex; justify-content: space-around; align-items: center; padding: 15px 10px 20px 10px; box-shadow: 0 -5px 20px rgba(0,0,0,0.05); z-index: 50; }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 5px; color: #94a3b8; text-decoration: none; font-size: 0.75rem; font-weight: 600; transition: 0.2s; cursor: pointer; }
.nav-item i { font-size: 1.2rem; margin-bottom: 2px; }
.nav-item.active { color: var(--primary); }
.nav-item.active i { background: #e0e7ff; padding: 10px; border-radius: 12px; margin-top: -10px; }

/* Modal */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.7); z-index: 1000; display: none; justify-content: center; align-items: center; backdrop-filter: blur(5px); }
.modal.active { display: flex; }
.winner-card { background: white; border-radius: 24px; padding: 25px; width: 90%; max-width: 400px; box-shadow: 0 20px 50px rgba(0,0,0,0.3); }

/* Toasts */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { padding: 15px 20px; border-radius: 12px; background: white; color: var(--text-dark); font-weight: 600; box-shadow: 0 10px 25px rgba(0,0,0,0.1); display: flex; align-items: center; gap: 10px; animation: slideIn 0.3s forwards; }
.toast.success i { color: var(--green); }
.toast.error i { color: var(--red); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }


/* DESKTOP RESPONSIVE MODE */

@media (min-width: 768px) {

    body { height: auto; overflow: auto; }

    .app-container { max-width: 1200px; margin: 40px auto; border-radius: 40px; height: auto; min-height: calc(100vh - 80px); overflow: visible; }

    .bottom-nav { display: none; } /* Hide mobile bottom nav */

    .bottom-sheet { padding-bottom: 40px; }

    .d-none { display: none; }

    .d-md-flex { display: flex; }

    .gap-3 { gap: 1rem; }

    .mr-3 { margin-right: 1rem; }

    .text-decoration-none { text-decoration: none; font-weight: 600; opacity: 0.8; transition: 0.2s; }

    .text-decoration-none:hover, .text-decoration-none.active { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

}

@media (max-width: 767px) {

    .d-md-flex { display: none !important; }

}


