@charset "UTF-8";
/* [PERBAIKAN] Emoji di dalam CSS ditulis sebagai kode escape (\1F3C6 = 🏆, \2713 = ✓)
   supaya tetap tampil benar walaupun server (misalnya Apache/XAMPP) tidak mengirim
   encoding UTF-8 untuk file .css.
   [PERBAIKAN] Lolos validator CSS W3C: properti baru (inset, aspect-ratio,
   backdrop-filter) diganti padanan yang dikenali semua versi validator. */
:root {
  --green-dark: #1a3a1f;
  --green-main: #2d6a35;
  --green-mid: #3d8b47;
  --green-light: #5cb868;
  --green-pale: #a8d5ae;
  --green-ghost: #e8f5e9;
  --green-glow: #c8eac9;
  --bg: #0e1a10;
  --bg2: #141f16;
  --bg3: #1a2a1d;
  --surface: #1f2f22;
  --surface2: #253228;
  --border: #2d4030;
  --border2: #3a5040;
  --text: #e8f5e9;
  --text2: #9dbfa2;
  --text3: #5c7a61;
  --gold: #f0c040;
  --red: #e05050;
  --blue: #4ab0e0;
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;
  --r: 12px;
  --r2: 20px;
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%;font-family:var(--font-body);background:var(--bg);color:var(--text);font-size:15px;line-height:1.6;overflow-x:hidden}
a{color:inherit;text-decoration:none}
button{font-family:var(--font-body);cursor:pointer;border:none;background:none;color:inherit}
input,textarea,select{font-family:var(--font-body);background:var(--surface2);border:1px solid var(--border);color:var(--text);border-radius:var(--r);padding:10px 14px;width:100%;font-size:14px;outline:none;transition:.2s}
input:focus,textarea:focus,select:focus{border-color:var(--green-light);box-shadow:0 0 0 3px rgba(93,184,104,.15)}
h1,h2,h3,h4,h5{font-family:var(--font-head)}

/* ─── LAYOUT ─── */
#app{display:flex;height:100vh;overflow:hidden}
.sidebar{width:240px;background:var(--bg2);border-right:1px solid var(--border);display:flex;flex-direction:column;padding:0;flex-shrink:0;transition:.3s}
.sidebar-logo{padding:24px 20px 16px;border-bottom:1px solid var(--border)}
.logo-mark{display:flex;align-items:center;gap:10px}
.logo-icon{width:36px;height:36px;background:var(--green-main);border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:18px}
.logo-text{font-family:var(--font-head);font-weight:800;font-size:20px;color:var(--text);letter-spacing:-.5px}
.logo-text span{color:var(--green-light)}
.sidebar-nav{flex:1;padding:16px 12px;display:flex;flex-direction:column;gap:4px;overflow-y:auto}
.nav-item{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:var(--r);color:var(--text2);font-size:14px;font-weight:500;cursor:pointer;transition:.15s;position:relative}
.nav-item:hover{background:var(--surface);color:var(--text)}
.nav-item.active{background:var(--green-main);color:#fff}
.nav-item i{font-size:18px;width:20px;text-align:center}
.nav-badge{margin-left:auto;background:var(--green-light);color:var(--green-dark);font-size:11px;font-weight:700;padding:2px 7px;border-radius:20px}
.sidebar-footer{padding:16px 12px;border-top:1px solid var(--border)}
.user-card{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:var(--r);cursor:pointer;transition:.15s}
.user-card:hover{background:var(--surface)}
.avatar{width:36px;height:36px;border-radius:50%;background:var(--green-main);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:14px;font-family:var(--font-head);flex-shrink:0;overflow:hidden}
.avatar img{width:100%;height:100%;object-fit:cover}
.user-info .name{font-size:14px;font-weight:500;color:var(--text)}
.user-info .nim{font-size:12px;color:var(--text2)}

/* ─── MAIN ─── */
.main{flex:1;overflow-y:auto;display:flex;flex-direction:column}
.topbar{padding:16px 28px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;background:var(--bg2);position:sticky;top:0;z-index:10}
.topbar-title{font-family:var(--font-head);font-size:22px;font-weight:700}
.topbar-actions{display:flex;align-items:center;gap:10px}
.content{padding:28px;flex:1}

/* ─── BUTTONS ─── */
.btn{display:inline-flex;align-items:center;gap:8px;padding:10px 18px;border-radius:var(--r);font-size:14px;font-weight:500;transition:.2s;cursor:pointer;border:none}
.btn-primary{background:var(--green-main);color:#fff}.btn-primary:hover{background:var(--green-mid)}
.btn-outline{background:transparent;color:var(--text2);border:1px solid var(--border2)}.btn-outline:hover{background:var(--surface);color:var(--text)}
.btn-ghost{background:transparent;color:var(--text2)}.btn-ghost:hover{color:var(--text)}
.btn-danger{background:rgba(224,80,80,.15);color:var(--red);border:1px solid rgba(224,80,80,.3)}.btn-danger:hover{background:rgba(224,80,80,.25)}
.btn-sm{padding:6px 12px;font-size:13px}
.btn-icon{width:36px;height:36px;padding:0;justify-content:center;border-radius:var(--r)}

/* ─── CARDS ─── */
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r2);padding:20px}
.card-sm{padding:16px;border-radius:var(--r)}

/* ─── PAGES ─── */
.page{display:none}
.page.active{display:block}

/* ─── LOGIN PAGE ─── */
#page-login{background:var(--bg);min-height:100vh;display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden}
.login-bg-decor{position:absolute;border-radius:50%;opacity:.06;background:var(--green-light)}
.login-box{background:var(--bg2);border:1px solid var(--border);border-radius:24px;padding:48px 40px;width:100%;max-width:420px;position:relative;z-index:1}
.login-logo{text-align:center;margin-bottom:32px}
.login-logo-icon{width:64px;height:64px;background:var(--green-main);border-radius:18px;display:flex;align-items:center;justify-content:center;font-size:30px;margin:0 auto 14px}
.login-title{font-family:var(--font-head);font-size:28px;font-weight:800}
.login-sub{color:var(--text2);font-size:14px;margin-top:4px}
.form-group{margin-bottom:18px}
.form-label{display:block;font-size:13px;font-weight:500;color:var(--text2);margin-bottom:6px}
.input-icon{position:relative}
.input-icon i{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:var(--text3);font-size:16px}
.input-icon input{padding-left:40px}
.login-footer{text-align:center;margin-top:20px;font-size:13px;color:var(--text2)}
.login-footer a{color:var(--green-light);font-weight:500}
.divider{display:flex;align-items:center;gap:12px;margin:20px 0;color:var(--text3);font-size:13px}
.divider::before,.divider::after{content:'';flex:1;height:1px;background:var(--border)}

/* ─── DASHBOARD ─── */
.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:24px}
.stat-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r2);padding:20px;position:relative;overflow:hidden}
.stat-card::before{content:'';position:absolute;right:-20px;top:-20px;width:80px;height:80px;border-radius:50%;opacity:.08;background:var(--green-light)}
.stat-label{font-size:12px;color:var(--text2);font-weight:500;text-transform:uppercase;letter-spacing:.5px;margin-bottom:8px}
.stat-num{font-family:var(--font-head);font-size:32px;font-weight:800;line-height:1;color:var(--text)}
.stat-sub{font-size:12px;color:var(--text2);margin-top:6px}
.stat-icon{position:absolute;right:20px;top:50%;transform:translateY(-50%);font-size:28px;opacity:.2}
.habits-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px}
.habit-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r2);padding:18px;display:flex;flex-direction:column;gap:12px;transition:.2s}
.habit-card:hover{border-color:var(--border2);transform:translateY(-2px)}
.habit-card-head{display:flex;align-items:center;gap:12px}
.habit-icon{width:44px;height:44px;border-radius:14px;display:flex;align-items:center;justify-content:center;font-size:20px;flex-shrink:0}
.habit-name{font-family:var(--font-head);font-weight:700;font-size:15px}
.habit-cat{font-size:12px;color:var(--text2)}
.habit-streak{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--text2)}
.streak-num{font-family:var(--font-mono);font-weight:500;color:var(--gold);font-size:16px}
.habit-progress{height:4px;background:var(--bg3);border-radius:4px;overflow:hidden}
.habit-progress-bar{height:100%;background:var(--green-light);border-radius:4px;transition:.5s}
.habit-card-foot{display:flex;align-items:center;justify-content:space-between}
.checkin-btn{background:var(--green-main);color:#fff;padding:8px 16px;border-radius:var(--r);font-size:13px;font-weight:600;transition:.2s}
.checkin-btn:hover{background:var(--green-mid)}
.checkin-btn.done{background:rgba(93,184,104,.15);color:var(--green-light);cursor:default}
.checkin-btn.done::before{content:'\2713  '}
.tag{display:inline-flex;align-items:center;padding:3px 10px;border-radius:20px;font-size:12px;font-weight:500}
.tag-belajar{background:rgba(74,176,224,.15);color:var(--blue)}
.tag-kesehatan{background:rgba(93,184,104,.15);color:var(--green-light)}
.tag-ibadah{background:rgba(240,192,64,.15);color:var(--gold)}
.tag-sosial{background:rgba(180,120,220,.15);color:#c07ee0}

/* ─── HABITS PAGE ─── */
.search-bar{position:relative;max-width:400px}
.search-bar i{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:var(--text3);font-size:16px}
.search-bar input{padding-left:42px;background:var(--surface)}
.suggestions-dropdown{position:absolute;top:calc(100% + 4px);left:0;right:0;background:var(--surface2);border:1px solid var(--border);border-radius:var(--r);overflow:hidden;z-index:20;display:none}
.suggestion-item{padding:10px 14px;font-size:14px;cursor:pointer;display:flex;align-items:center;gap:10px;transition:.1s}
.suggestion-item:hover{background:var(--surface)}
.habits-table{background:var(--surface);border:1px solid var(--border);border-radius:var(--r2);overflow:hidden}
.table-header{display:grid;grid-template-columns:40px 1fr 120px 100px 80px 100px;gap:0;padding:12px 20px;border-bottom:1px solid var(--border);font-size:12px;color:var(--text3);font-weight:600;text-transform:uppercase;letter-spacing:.5px}
.table-row{display:grid;grid-template-columns:40px 1fr 120px 100px 80px 100px;gap:0;padding:14px 20px;border-bottom:1px solid var(--border);align-items:center;transition:.15s}
.table-row:last-child{border-bottom:none}
.table-row:hover{background:var(--bg3)}

/* ─── MODAL ─── */
.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.75);z-index:100;display:none;align-items:center;justify-content:center}
.modal-overlay.open{display:flex}
.modal{background:var(--bg2);border:1px solid var(--border);border-radius:24px;padding:32px;width:100%;max-width:480px;animation:modalIn .2s ease}
@keyframes modalIn{from{opacity:0;transform:translateY(20px) scale(.96)}to{opacity:1;transform:none}}
.modal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}
.modal-title{font-family:var(--font-head);font-weight:700;font-size:18px}
.modal-close{width:32px;height:32px;border-radius:var(--r);background:var(--surface);display:flex;align-items:center;justify-content:center;color:var(--text2);cursor:pointer}
.modal-close:hover{background:var(--surface2);color:var(--text)}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.form-grid .full{grid-column:1/-1}
.color-picker{display:flex;gap:8px;flex-wrap:wrap}
.color-dot{width:28px;height:28px;border-radius:50%;cursor:pointer;transition:.15s;border:2px solid transparent}
.color-dot.sel{border-color:#fff;transform:scale(1.1)}

/* ─── PROFILE ─── */
.profile-header{background:var(--surface);border:1px solid var(--border);border-radius:var(--r2);padding:32px;display:flex;gap:24px;align-items:flex-start;margin-bottom:24px}
.profile-avatar{width:88px;height:88px;border-radius:24px;background:var(--green-main);display:flex;align-items:center;justify-content:center;font-family:var(--font-head);font-size:36px;font-weight:800;flex-shrink:0}
.profile-name{font-family:var(--font-head);font-size:24px;font-weight:800}
.profile-nim{color:var(--text2);font-size:14px;margin-bottom:12px}
.profile-badges-row{display:flex;gap:8px;flex-wrap:wrap}
.profile-badge{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;border-radius:20px;font-size:12px;font-weight:600;background:rgba(240,192,64,.15);color:var(--gold)}
.profile-stats-mini{display:flex;gap:24px;margin-top:16px}
.p-stat .num{font-family:var(--font-mono);font-size:20px;font-weight:500;color:var(--text)}
.p-stat .lbl{font-size:12px;color:var(--text2)}
.heatmap-wrap{background:var(--surface);border:1px solid var(--border);border-radius:var(--r2);padding:24px;margin-bottom:24px}
.heatmap-title{font-family:var(--font-head);font-weight:700;font-size:16px;margin-bottom:16px;display:flex;align-items:center;justify-content:space-between}
.heatmap-legend{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--text2)}
.heatmap-grid{display:grid;grid-template-columns:repeat(53,1fr);gap:3px;overflow-x:auto}
.hm-cell{height:0;padding-bottom:100%;border-radius:3px;background:var(--bg3);cursor:pointer;transition:.1s}
.hm-cell:hover{opacity:.8;transform:scale(1.3)}
.hm-0{background:var(--bg3)}
.hm-1{background:#1a4d1e}
.hm-2{background:#206b25}
.hm-3{background:#2d8c35}
.hm-4{background:#3db348}
.hm-5{background:#5cb868}
.badges-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:16px;margin-bottom:24px}
.badge-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r2);padding:20px;text-align:center;transition:.2s}
.badge-card:hover{border-color:var(--border2)}
.badge-card.locked{opacity:.4}
.badge-icon{font-size:36px;margin-bottom:10px}
.badge-name{font-family:var(--font-head);font-weight:700;font-size:14px;margin-bottom:4px}
.badge-req{font-size:12px;color:var(--text2)}

/* ─── STATS PAGE ─── */
.charts-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:20px}
.chart-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r2);padding:24px}
.chart-title{font-family:var(--font-head);font-weight:700;font-size:15px;margin-bottom:16px;color:var(--text)}
.chart-container{position:relative;height:240px}

/* ─── CALENDAR ─── */
.cal-nav{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}
.cal-month{font-family:var(--font-head);font-weight:700;font-size:20px}
.cal-grid-head{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;margin-bottom:8px}
.cal-day-head{text-align:center;font-size:12px;color:var(--text3);font-weight:600;padding:8px}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
.cal-day{height:64px;border-radius:var(--r);display:flex;align-items:center;justify-content:center;font-size:14px;cursor:pointer;transition:.15s;position:relative;border:1px solid transparent}
.cal-day:hover{background:var(--surface2)}
.cal-day.other-month{color:var(--text3)}
.cal-day.today{border-color:var(--green-main);color:var(--green-light);font-weight:700}
.cal-day.active{background:var(--green-main);color:#fff;border-color:transparent}
.cal-day.partial{background:rgba(93,184,104,.2);color:var(--green-light)}
.cal-dot{position:absolute;bottom:4px;left:50%;transform:translateX(-50%);width:5px;height:5px;background:var(--green-light);border-radius:50%}
.cal-detail{background:var(--surface);border:1px solid var(--border);border-radius:var(--r2);padding:24px}
.cal-detail-date{font-family:var(--font-head);font-weight:700;font-size:16px;margin-bottom:16px}
.cal-habit-item{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--border)}
.cal-habit-item:last-child{border-bottom:none}
.cal-check{width:24px;height:24px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:13px}

/* ─── CHALLENGE ─── */
.challenge-header-card{background:linear-gradient(135deg,#1a3a1f,#2d6a35);border:none;border-radius:var(--r2);padding:28px;margin-bottom:24px;position:relative;overflow:hidden}
.challenge-header-card::after{content:'\1F3C6';position:absolute;right:24px;bottom:-10px;font-size:80px;opacity:.15}
.challenge-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px}
.challenge-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r2);padding:20px}
.challenge-vs{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.challenger{flex:1;text-align:center}
.challenger .av{width:44px;height:44px;border-radius:50%;background:var(--green-main);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:16px;margin:0 auto 6px}
.vs-badge{background:var(--bg3);border-radius:var(--r);padding:6px 10px;font-family:var(--font-mono);font-size:12px;font-weight:500;color:var(--text2)}
.duel-bar{height:8px;background:var(--bg3);border-radius:4px;overflow:hidden;margin-bottom:8px;position:relative}
.duel-a{height:100%;background:var(--green-light);border-radius:4px;transition:.5s}
.duel-b{position:absolute;right:0;top:0;height:100%;background:var(--blue);border-radius:4px;transition:.5s}
.ch-meta{display:flex;justify-content:space-between;font-size:12px;color:var(--text2);margin-bottom:14px}
.status-pill{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;border-radius:20px;font-size:12px;font-weight:600}
.status-active{background:rgba(93,184,104,.15);color:var(--green-light)}
.status-win{background:rgba(240,192,64,.15);color:var(--gold)}
.status-pending{background:rgba(74,176,224,.15);color:var(--blue)}

/* ─── REGISTER ─── */
#page-register{min-height:100vh;display:flex;align-items:center;justify-content:center}

/* ─── TOAST ─── */
.toast-wrap{position:fixed;bottom:28px;right:28px;z-index:200;display:flex;flex-direction:column;gap:8px}
.toast{background:var(--surface2);border:1px solid var(--border);border-radius:var(--r);padding:12px 16px;font-size:14px;display:flex;align-items:center;gap:10px;animation:toastIn .3s ease;min-width:220px;box-shadow:0 8px 24px rgba(0,0,0,.4)}
.toast.success{border-left:3px solid var(--green-light)}
.toast.error{border-left:3px solid var(--red)}
@keyframes toastIn{from{opacity:0;transform:translateX(20px)}to{opacity:1;transform:none}}
@keyframes toastOut{to{opacity:0;transform:translateX(20px)}}

/* ─── STREAK FREEZE BADGE ─── */
.freeze-badge{background:rgba(74,176,224,.12);color:var(--blue);border:1px solid rgba(74,176,224,.25);font-size:12px;padding:3px 10px;border-radius:20px;font-weight:500}

/* ─── EMPTY STATE ─── */
.empty-state{text-align:center;padding:60px 20px;color:var(--text2)}
.empty-state i{font-size:48px;opacity:.3;margin-bottom:16px}
.empty-state p{font-size:15px}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar{width:6px;height:6px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}
::-webkit-scrollbar-thumb:hover{background:var(--border2)}

/* ─── SECTION TITLES ─── */
.section-title{font-family:var(--font-head);font-size:16px;font-weight:700;margin-bottom:16px;display:flex;align-items:center;gap:8px}
.section-title::after{content:'';flex:1;height:1px;background:var(--border);margin-left:8px}

/* ─── WELCOME STRIP ─── */
.welcome-strip{background:var(--surface);border:1px solid var(--border);border-left:3px solid var(--green-light);border-radius:var(--r2);padding:20px 24px;margin-bottom:24px;display:flex;align-items:center;justify-content:space-between}
.welcome-msg{font-size:14px;color:var(--text2)}
.welcome-title{font-family:var(--font-head);font-size:20px;font-weight:700;margin-bottom:2px}
.today-date{font-family:var(--font-mono);font-size:13px;color:var(--text3)}

/* ─── TWO COL ─── */
.two-col{display:grid;grid-template-columns:2fr 1fr;gap:20px}
.three-col{display:grid;grid-template-columns:1fr 1fr 1fr;gap:20px}

@media(max-width:900px){
  .sidebar{width:64px}
  .sidebar .logo-text,.sidebar .nav-item span,.sidebar .user-info,.sidebar .nav-badge{display:none}
  .sidebar .logo-mark{justify-content:center}
  .sidebar .logo-icon{margin:0}
  .nav-item{justify-content:center}
  .stats-grid{grid-template-columns:repeat(2,1fr)}
  .charts-grid{grid-template-columns:1fr}
  .two-col,.three-col{grid-template-columns:1fr}
}

/* [FITUR BARU] Banner pengingat harian */
.notif-banner{background:rgba(240,192,64,.12);border:1px solid var(--gold);border-radius:var(--r2);padding:14px 20px;margin-bottom:16px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.notif-text{font-family:var(--font-head);font-weight:700;color:var(--gold);font-size:15px}

/* [PERUBAHAN] Emoji sebagai ikon menu (pengganti fa-swords yang hanya ada di Font Awesome Pro) */
.nav-item i.nav-emoji{font-style:normal;font-size:16px}
.empty-emoji{font-size:40px;display:block;margin-bottom:8px}

/* [PERUBAHAN] Kotak habit di "Habit Saya" bisa diklik */
.habit-card.clickable{cursor:pointer}
.habit-status{font-size:12px;font-weight:600;padding:4px 10px;border-radius:20px}
.habit-status.done{background:rgba(93,184,104,.15);color:var(--green-light)}
.habit-status.todo{background:rgba(240,192,64,.12);color:var(--gold)}

/* [PERUBAHAN] Pop-up detail habit */
.detail-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:20px}
.detail-stat{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:12px;text-align:center}
.detail-stat .num{font-family:var(--font-mono);font-size:22px;font-weight:600}
.detail-stat .lbl{font-size:12px;color:var(--text3);margin-top:2px}
