html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* RESET */
*{
  margin:0;
  padding:0;
  box-sizing: border-box;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto;
}

/* ✅ UPGRADE: Hardware Accelerated Transitions */
button, .menu-item, .card, .modal, .toast, .swipe-content {
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s ease, box-shadow 0.25s ease;
  will-change: transform, opacity; /* Memberi tahu browser untuk optimasi element ini */
}

body{
  background:#eaf1f7;
  -webkit-tap-highlight-color: transparent;
}

/* HOME */
.home{
  min-height:100vh;
  background:linear-gradient(180deg,#0f5ea8,#1d9bf0);
  color:white;
  padding-bottom:90px;
}

/* HEADER */
.header{padding:20px;}
.header h2{font-size:14px;opacity:0.8;}
.header h1{font-size:20px;margin-top:4px;font-weight:600;}

/* CARD */
.card{
  margin:0 20px;
  background:rgba(255,255,255,0.25);
  backdrop-filter:blur(30px);
  border-radius:22px;
  padding:20px;
  position:relative;
  box-shadow:0 15px 40px rgba(0,0,0,0.25);
  border:1px solid rgba(255,255,255,0.25);
}

/* SALDO */
.saldo{
  font-size:32px;
  font-weight:700;
  letter-spacing:0.5px;
}

.eye{
  position:absolute;
  right:20px;
  top:20px;
  cursor:pointer;
  opacity:0.8;
}

/* MENU */
.menu{
  margin:20px;
  display:flex;
  gap:15px;
  overflow-x:auto;
}

.menu::-webkit-scrollbar{display:none;}

.menu-item{
  position:relative;
  overflow:hidden;
  min-width:90px;
  background:rgba(255,255,255,0.9);
  backdrop-filter:blur(20px);
  color:#0f172a;
  border-radius:20px;
  padding:14px 10px;
  text-align:center;
  font-size:12px;
  font-weight:600;
  box-shadow:0 8px 25px rgba(0,0,0,0.08);
  border:1px solid rgba(255,255,255,0.6);
  transition:all 0.2s ease;
}

.menu-item:active .icon{
  transform:scale(0.85) rotate(-6deg);
}

.menu-item:active .icon::before{
  opacity:0.5;
  filter:blur(20px);
}

/* pulse glow */
.menu-item .icon::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:18px;
  background:radial-gradient(circle, rgba(255,255,255,0.6), transparent);
  opacity:0;
}

.menu-item:active .icon::after{
  animation:pulseGlow 0.4s ease;
}

@keyframes pulseGlow{
  0%{opacity:0.8; transform:scale(0.8);}
  100%{opacity:0; transform:scale(1.4);}
}

.menu-item:active{
  transform:scale(0.95);
  box-shadow:0 4px 12px rgba(0,0,0,0.1);
}

.menu-item:hover .icon{
  transform:translateY(-4px);
  box-shadow:
    0 12px 30px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.4);
}

.menu-item:nth-child(1) .icon::before{ background:linear-gradient(135deg,#22c55e,#4ade80);}
.menu-item:nth-child(2) .icon::before{ background:linear-gradient(135deg,#3b82f6,#60a5fa);}
.menu-item:nth-child(3) .icon::before{ background:linear-gradient(135deg,#f59e0b,#fbbf24);}
.menu-item:nth-child(4) .icon::before{ background:linear-gradient(135deg,#ef4444,#f87171);}
.menu-item:nth-child(5) .icon::before{ background:linear-gradient(135deg,#8b5cf6,#a78bfa);}
.menu-item:nth-child(6) .icon::before{ background:linear-gradient(135deg,#0ea5e9,#38bdf8);}

.icon{
  width:58px;
  height:58px;
  border-radius:18px;
  margin:0 auto 10px;

  display:flex;
  align-items:center;
  justify-content:center;

  position:relative;
  overflow:hidden;
  background:linear-gradient(145deg, rgba(255,255,255,0.25), rgba(255,255,255,0.05));
  backdrop-filter:blur(20px);
  box-shadow:
    0 8px 25px rgba(0,0,0,0.12),
    inset 0 1px 0 rgba(255,255,255,0.4);

  border:1px solid rgba(255,255,255,0.3);
}

.icon::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:18px;

  background:linear-gradient(135deg,#1d9bf0,#6366f1,#22c55e);
  opacity:0.25;

  filter:blur(10px);
}

.ripple{
  position:absolute;
  border-radius:50%;
  transform:scale(0);
  animation:ripple 0.6s linear;
  background:rgba(255,255,255,0.5);
  pointer-events:none;
}

@keyframes ripple{
  to{
    transform:scale(4);
    opacity:0;
  }
}

/* LIST */
.list{margin:20px;}

.item{
  background:white;
  color:black;
  padding:12px;
  border-radius:12px;
  margin-bottom:10px;
  display:flex;
  justify-content:space-between;
  box-shadow:0 4px 12px rgba(0,0,0,0.06);
  animation:fadeIn 0.25s ease;
}

.masuk{color:#16a34a;}
.keluar{color:#dc2626;}

/* 🔥 BACKDROP FIX (PENTING BANGET) */
.backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.35);
  display:none;
  z-index:998;
}

.backdrop.active{
  display:block;
}

/* BUTTON */
button{
  width:100%;
  padding:14px;
  border:none;
  border-radius:12px;
  background:linear-gradient(135deg,#1d9bf0,#0f5ea8);
  color:white;
  font-weight:600;
  font-size:14px;
}

button:active{
  transform:scale(0.96);
}

/* ============================= */
/* MODAL V2 (UPGRADE) */
/* ============================= */

.modal{
  position:fixed;
  bottom:-100%;
  width:100%;
  max-height:90vh;
  overflow-y:auto;
  background:rgba(255,255,255,0.85);
  backdrop-filter:blur(25px);
  padding:20px;
  border-radius:28px 28px 0 0;
  transition:0.35s cubic-bezier(.22,.61,.36,1);
  box-shadow:0 -20px 60px rgba(0,0,0,0.25);
  z-index:999;
}

.modal.active{
  bottom:0;
}

/* handle atas */
.modal-handle{
  width:50px;
  height:5px;
  background:#cbd5e1;
  border-radius:10px;
  margin:0 auto 12px;
  cursor:pointer;
  transition:all 0.2s ease;
}

.modal-handle:active{
  transform:scale(0.9);
  background:#94a3b8;
}

/* header */
.modal-header{
  font-size:18px;
  font-weight:600;
  margin-bottom:12px;
}

/* input modern */
.modal input{
  width:100%;
  padding:14px;
  margin-bottom:12px;
  border-radius:14px;
  border:none;
  background:#f1f5f9;
  font-size:14px;
}

.modal input:focus{
  background:#e2e8f0;
}

/* Kategori Grid & Item */
.kategori-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.kategori-item {
  padding: 12px;
  border-radius: 14px;
  background: #ffffff;
  border: 1.5px solid #f1f5f9;
  text-align: center;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.kategori-item:hover {
  border-color: #cbd5e1;
}

.kategori-item.active {
  background: #1d9bf0 !important;
  color: white !important;
  border-color: #1d9bf0 !important;
  box-shadow: 0 4px 12px rgba(29, 155, 240, 0.3);
  transform: scale(0.97);
}

/* Agar teks label ikut berubah menjadi putih saat aktif */
.kategori-item.active div:last-child {
  color: white !important;
}

/* FILTER MODERN */
.filter-modern{
  margin-top:10px;
}

/* bulan scroll */
.month-scroll{
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding-bottom:6px;
}

.month-item{
  min-width:70px;
  padding:8px;
  text-align:center;
  border-radius:12px;
  background:#f1f5f9;
  font-size:12px;
}

.month-item.active{
  background:#1d9bf0;
  color:white;
}

/* tahun */
.year-list{
  display:flex;
  gap:8px;
  margin-top:10px;
}

.year-item{
  flex:1;
  padding:10px;
  border-radius:12px;
  background:#f1f5f9;
  text-align:center;
}

.year-item.active{
  background:#0f5ea8;
  color:white;
}

/* SELECT */
.select{
  background:#f1f5f9;
  padding:14px;
  border-radius:12px;
  margin-bottom:10px;
  cursor:pointer;
  font-size:14px;
}

.options{
  display:none;
  background:white;
  border-radius:10px;
  box-shadow:0 5px 15px rgba(0,0,0,0.1);
  margin-bottom:10px;
  z-index:1000;
  position:relative;
}

.options div{
  padding:10px;
  border-bottom:1px solid #eee;
}
.options div:last-child{border:none;}
.options.show{display:block;}

/* FILTER */
.filter-box{
  margin:20px;
  background:rgba(255,255,255,0.9);
  backdrop-filter:blur(20px);
  padding:16px;
  border-radius:18px;
  box-shadow:0 10px 30px rgba(0,0,0,0.08);
}

.filter-box input{
  width:100%;
  padding:14px;
  border-radius:14px;
  border:none;
  background:#f1f5f9;
  font-size:14px;
  outline:none;
}

.filter-box input:focus{
  background:#e2e8f0;
}

.filter-row{
  display:flex;
  gap:10px;
}

.filter-row input{
  flex:1;
}

/* TOAST */
#toast-container{
  position:fixed;
  top:20px;
  left:50%;
  transform:translateX(-50%);
  z-index:9999;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.toast{
  min-width:250px;
  max-width:90vw;
  padding:14px 16px;
  border-radius:14px;
  color:white;
  font-size:14px;
  font-weight:500;
  box-shadow:0 10px 30px rgba(0,0,0,0.25);
  animation:slideDown 0.4s ease;
}

.toast.success{background:#16a34a;}
.toast.error{background:#dc2626;}
.toast.info{background:#0f5ea8;}

@keyframes slideDown{
  from{opacity:0; transform:translateY(-20px);}
  to{opacity:1; transform:translateY(0);}
}

/* ANIMATION */
@keyframes fadeIn{
  from{opacity:0; transform:translateY(10px);}
  to{opacity:1; transform:translateY(0);}
}

/* SWIPE */
.swipe-item{
  position:relative;
  border-radius:12px;
  margin-bottom:10px;
}

.delete-btn{
  position:absolute;
  right:0;
  top:0;
  bottom:0;
  width:80px;
  background:#dc2626;
  color:white;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:600;
  border-radius:12px;
}

.swipe-content{
  position:relative;
  background:white;
  border-radius:12px;
  z-index:2;
  transition:transform 0.25s ease;
}

/* FIX INPUT IOS */
input, select, textarea {
  font-size:16px !important;
}

/* CANVAS */
canvas{
  display:block;
  width:100% !important;
  height:auto !important;
}

/* ============================= */
/* NAV (FOOTER) */
/* ============================= */
.footer{
  position:fixed;
  bottom:0;
  width:100%;
  padding:16px;
  text-align:center;
  font-size:12px;
  background:rgba(255,255,255,0.05);
  backdrop-filter:blur(20px);
  border-top:1px solid rgba(255,255,255,0.08);
}

canvas{
  width:100%;
  height:160px !important;
  display:block;
}

.icon svg{
  width:26px;
  height:26px;
  stroke-width:2.2;
  color:#0f172a;
  z-index:2;
}

.options svg{
  width:16px;
  height:16px;
  margin-right:6px;
  vertical-align:middle;
}

.item svg{
  width:20px;
  height:20px;
}

svg {
  stroke-width: 2;
}

.eye{
  position:absolute;
  right:20px;
  top:20px;
  cursor:pointer;
  opacity:0.8;
  transition:all 0.25s ease;
}

.eye:hover{
  transform:scale(1.1);
  opacity:1;
}

.eye-anim{
  animation:eyePop 0.3s ease;
}

@keyframes eyePop{
  0%{transform:scale(1);}
  50%{transform:scale(1.3) rotate(-10deg);}
  100%{transform:scale(1);}
}

.balance-text{
  transition: all 0.3s ease;
}

.balance-hidden{
  filter: blur(8px);
  opacity: 0.6;
}

.balance-mask{
  letter-spacing: 2px;
}

/* ============================= */
/* CALCULATOR (PREMIUM UI) */
/* ============================= */

.calc-display{
  background: linear-gradient(145deg, #0f172a, #020617);
  color: #fff;
  font-size: 36px;
  text-align: right;
  padding: 22px;
  border-radius: 20px;
  margin-bottom: 14px;
  overflow-x: auto;

  box-shadow: 
    inset 0 2px 6px rgba(255,255,255,0.05),
    0 10px 25px rgba(0,0,0,0.4);

  letter-spacing: 1px;
}

/* GRID */
.calc-buttons{
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 12px;
}

/* BUTTON BASE */
.calc-btn{
  padding: 18px;
  border-radius: 18px;
  font-size: 18px;
  font-weight: 600;
  border: none;
  cursor: pointer;

  background: linear-gradient(145deg, #f8fafc, #e2e8f0);
  color: #0f172a;

  box-shadow: 
    0 4px 10px rgba(0,0,0,0.15),
    inset 0 1px 2px rgba(255,255,255,0.7);

  transition: all 0.15s ease;
}

/* HOVER */
.calc-btn:hover{
  transform: translateY(-2px);
  box-shadow: 
    0 6px 14px rgba(0,0,0,0.2),
    inset 0 1px 2px rgba(255,255,255,0.8);
}

/* ACTIVE (TEKAN) */
.calc-btn:active{
  transform: scale(0.92);
  box-shadow: 
    inset 0 3px 6px rgba(0,0,0,0.3);
}

/* OPERATOR */
.calc-btn.op{
  background: linear-gradient(145deg, #1d9bf0, #0284c7);
  color: white;

  box-shadow: 
    0 4px 12px rgba(29,155,240,0.5),
    inset 0 1px 2px rgba(255,255,255,0.3);
}

/* EQUAL */
.calc-btn.equal{
  background: linear-gradient(145deg, #22c55e, #16a34a);
  color: white;

  box-shadow: 
    0 4px 12px rgba(34,197,94,0.5),
    inset 0 1px 2px rgba(255,255,255,0.3);
}

/* CLEAR */
.calc-btn.clear{
  background: linear-gradient(145deg, #ef4444, #b91c1c);
  color: white;

  box-shadow: 
    0 4px 12px rgba(239,68,68,0.5),
    inset 0 1px 2px rgba(255,255,255,0.3);
}

/* SPECIAL DELETE */
.calc-btn:nth-child(2){
  background: linear-gradient(145deg, #f59e0b, #d97706);
  color: white;

  box-shadow: 
    0 4px 12px rgba(245,158,11,0.5),
    inset 0 1px 2px rgba(255,255,255,0.3);
}

/* RESPONSIVE (HP) */
@media (max-width: 480px){
  .calc-display{
    font-size: 28px;
    padding: 18px;
  }

  .calc-btn{
    padding: 16px;
    font-size: 16px;
  }
}

.calc-history{
  max-height: 120px;
  overflow-y: auto;
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 14px;

  background: rgba(15, 23, 42, 0.6);
  color: #cbd5f5;
  font-size: 14px;

  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calc-history-item{
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s;
}

.calc-history-item:hover{
  background: rgba(255,255,255,0.08);
}

.calc-history-item{
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.history-content{
  background: rgba(255,255,255,0.05);
  padding: 10px 12px;
  border-radius: 12px;

  position: relative;
  z-index: 2;

  transition: transform 0.25s ease;
}

.history-delete{
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 70px;

  background: linear-gradient(145deg, #ef4444, #b91c1c);
  color: white;
  font-size: 13px;
  font-weight: bold;

  display: flex;
  align-items: center;
  justify-content: center;
}

.calc-history-item.removing{
  transform: translateX(-100%);
  opacity: 0;
  transition: 0.3s;
}

.top-header{
  position:absolute;
  top:24px;
  left:20px;
  right:20px;
  display:flex;
  justify-content:flex-end;
  z-index:10;
}

#loginBtn i{
  width:20px;
  height:20px;
  display:block;
}

.right-group{
  display:flex;
  align-items:center;
  gap:12px;
}

/* tombol bulat */
#loginBtn,
#profileBtn,
#notifBtn{
  width:42px;
  height:42px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  position:relative;
}

/* login & notif */
#loginBtn,
#notifBtn{
  background:rgba(255,255,255,0.2);
  backdrop-filter:blur(12px);
  box-shadow:0 4px 12px rgba(0,0,0,0.15);
}

/* profile fix */
#profileBtn{
  overflow:hidden;
  display:none;
  padding:0;
  box-shadow:0 4px 12px rgba(0,0,0,0.2);
}

#profileBtn img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* badge */
#notifBadge{
  position:absolute;
  top:-4px;
  right:-4px;
  background:#ef4444;
  color:white;
  font-size:10px;
  padding:2px 6px;
  border-radius:10px;
}

#uploadPhoto{
  width:100%;
  margin-top:10px;
  font-size:12px;
}

/* =========================
INSTALL CARD
========================= */
.install-card{
  position:fixed;
  left:50%;
  bottom:25px;
  transform:translateX(-50%);
  width:92%;
  max-width:420px;
  background:rgba(10,15,30,.88);
  backdrop-filter:blur(25px);
  border:1px solid rgba(255,255,255,.08);
  border-radius:32px;
  padding:22px;
  z-index:99999;
  overflow:hidden;
  box-shadow:
  0 20px 60px rgba(0,0,0,.45),
  inset 0 1px 0 rgba(255,255,255,.06);
  animation:
  installFloat .8s cubic-bezier(.2,.9,.2,1);
}

/* =========================
GLOW
========================= */
.install-glow{
  position:absolute;
  inset:-100px;
  background:
  radial-gradient(circle at top,
  rgba(0,255,170,.18),
  transparent 60%);
  animation:pulseGlow 4s infinite;
}

/* =========================
TOP
========================= */
.install-top{
  display:flex;
  align-items:center;
  gap:14px;
  position:relative;
  z-index:2;
}

.install-logo-wrap{
  width:64px;
  height:64px;
  border-radius:20px;
  background:linear-gradient(
  135deg,
  #00ffae,
  #0066ff);
  padding:3px;
  animation:floatLogo 3s infinite ease-in-out;
}

.install-logo{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:17px;
  background:#0b1020;
}

.install-info h3{
  font-size:20px;
  margin-bottom:4px;
  color:white;
}

.install-info p{
  font-size:13px;
  line-height:1.5;
  color:rgba(255,255,255,.7);
}

.install-close{
  margin-left:auto;
  width:34px;
  height:34px;
  border:none;
  border-radius:50%;
  background:rgba(255,255,255,.08);
  color:white;
  cursor:pointer;
}

/* =========================
PHONE MOCKUP
========================= */
.install-preview{
  margin-top:22px;
  display:flex;
  justify-content:center;
}

.phone-frame{
  width:190px;
  height:360px;
  border-radius:38px;
  padding:14px;
  position:relative;
  background:
  linear-gradient(
  180deg,
  #1d2338,
  #0b1020);
  border:2px solid rgba(255,255,255,.08);
  overflow:hidden;
  box-shadow:
  inset 0 2px 8px rgba(255,255,255,.05),
  0 10px 30px rgba(0,0,0,.4);
  animation:phoneFloat 5s infinite ease-in-out;
}

.phone-island{
  position:absolute;
  top:10px;
  left:50%;
  transform:translateX(-50%);
  width:80px;
  height:22px;
  border-radius:50px;
  background:#000;
}

.screen-content{
  margin-top:40px;
}

.balance-card{
  background:
  linear-gradient(
  135deg,
  #00ffae,
  #0066ff);
  border-radius:24px;
  padding:22px;
  color:white;
  box-shadow:
  0 10px 25px rgba(0,255,174,.25);
  animation:cardPulse 3s infinite;

}

.balance-card span{
  font-size:13px;
  opacity:.8;
}

.balance-card h2{
  margin-top:8px;
  font-size:24px;
}

.mini-stats{
  margin-top:18px;
  display:grid;
  gap:12px;
}

.mini-box{
  height:58px;
  border-radius:18px;
  background:
  rgba(255,255,255,.06);
  border:
  1px solid rgba(255,255,255,.05);
  animation:shine 2.5s infinite;
}

/* =========================
BUTTON
========================= */
.install-btn{
  width:100%;
  margin-top:24px;
  border:none;
  border-radius:20px;
  height:60px;
  font-size:17px;
  font-weight:700;
  color:white;
  background:
  linear-gradient(135deg,
  #00ffae,
  #0066ff);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  cursor:pointer;
  transition:.3s;
  box-shadow:
  0 10px 25px rgba(0,255,174,.25);
}

.install-btn:active{
  transform:scale(.97);
}

/* =========================
ANIMATION
========================= */

@keyframes installFloat{
  from{
    opacity:0;
    transform:
    translateX(-50%)
    translateY(100px)
    scale(.9);
  }

  to{
    opacity:1;
    transform:
    translateX(-50%)
    translateY(0)
    scale(1);
  }
}

@keyframes pulseGlow{
  0%,100%{
    transform:scale(1);
    opacity:.5;
  }

  50%{
    transform:scale(1.2);
    opacity:1;
  }
}

@keyframes floatLogo{
  0%,100%{
    transform:translateY(0);
  }

  50%{
    transform:translateY(-6px);
  }
}

@keyframes phoneFloat{
  0%,100%{
    transform:
    rotate(-2deg)
    translateY(0);
  }

  50%{
    transform:
    rotate(2deg)
    translateY(-8px);
  }
}

@keyframes cardPulse{
  0%,100%{
    transform:scale(1);
  }

  50%{
    transform:scale(1.03);
  }
}

@keyframes shine{
  0%{
    opacity:.4;
  }

  50%{
    opacity:1;
  }

  100%{
    opacity:.4;
  }
}

.hidden{
  display:none;
  }

  /* ============================= */
/* UPGRADE UI PROFILE MODAL      */
/* ============================= */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.profile-avatar-wrap {
  position: relative;
  width: 90px;
  height: 90px;
  margin-bottom: 12px;
}

.profile-avatar-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #1d9bf0;
  box-shadow: 0 10px 25px rgba(29, 155, 240, 0.3);
  background: white;
}

.profile-edit-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 32px;
  height: 32px;
  background: #1d9bf0;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  transition: transform 0.2s ease;
}

.profile-edit-badge:active {
  transform: scale(0.9);
}

.profile-edit-badge svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
}

.profile-name-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}

.profile-email-title {
  font-size: 13px;
  color: #64748b;
  margin-top: 4px;
}

.profile-section-title {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.profile-input-group {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border-radius: 14px;
  padding: 4px 16px;
  margin-bottom: 16px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.profile-input-group:focus-within {
  background: #ffffff;
  border: 1px solid #1d9bf0;
  box-shadow: 0 4px 15px rgba(29, 155, 240, 0.1);
}

.profile-input-group svg {
  color: #64748b;
  width: 18px;
  height: 18px;
  margin-right: 12px;
}

.profile-input-group input {
  flex: 1;
  background: transparent !important;
  border: none !important;
  padding: 12px 0 !important;
  margin: 0 !important;
  font-size: 15px !important;
  font-weight: 500;
  color: #0f172a;
  outline: none;
}

.btn-primary-outline {
  background: transparent;
  border: 1.5px solid #1d9bf0;
  color: #1d9bf0;
}

.btn-primary-outline:active {
  background: rgba(29, 155, 240, 0.1);
}

.btn-danger-outline {
  background: transparent;
  border: 1.5px solid #ef4444;
  color: #ef4444;
}

.btn-danger-outline:active {
  background: rgba(239, 68, 68, 0.1);
}

.profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

/* Crop Container Fix */
.crop-container {
  width: 100%;
  max-height: 400px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
  background: #000;
}

/* ========================================= */
/* UPGRADE: 2-TIER BANKING SECURITY SCREENS  */
/* ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

.gate-screen {
  font-family: 'Inter', sans-serif;
  position: fixed;
  inset: 0;
  /* Background ala aplikasi banking modern (Dark Navy / Midnight Blue) */
  background: radial-gradient(circle at top right, #1e3a8a 0%, #0f172a 40%, #020617 100%);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 40px 20px;
  text-align: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  box-sizing: border-box;
}

.gate-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Container untuk merapikan konten di tengah */
.gate-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
}

/* Header & Typography */
.gate-screen h1 { 
  color: #ffffff; 
  font-size: 26px; 
  font-weight: 700; 
  margin-top: 20px;
  margin-bottom: 8px; 
  letter-spacing: -0.5px;
}
.gate-screen p { 
  color: #94a3b8; 
  font-size: 15px; 
  font-weight: 300;
  margin-bottom: 40px; 
  max-width: 280px;
  line-height: 1.5;
}

/* Foto Profil Premium dengan Glowing Effect */
.profile-lock-img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 3px solid transparent;
  background-image: linear-gradient(#020617, #020617), linear-gradient(135deg, #38bdf8, #2563eb);
  background-origin: border-box;
  background-clip: content-box, border-box;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.4);
  margin-bottom: 10px;
  object-fit: cover;
  padding: 3px;
}

/* Input Password Ala Banking (Glassmorphism) */
.gate-input {
  width: 100%;
  max-width: 320px;
  padding: 18px 24px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 20px;
  text-align: center;
  letter-spacing: 6px;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.05);
  color: white;
  outline: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s ease;
  box-sizing: border-box;
}
.gate-input::placeholder { 
  color: #64748b; 
  letter-spacing: normal; 
  font-size: 15px;
  font-weight: 300;
}
.gate-input:focus { 
  border: 1px solid #38bdf8; 
  background: rgba(255, 255, 255, 0.1); 
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

/* Tombol Aksi */
.btn-gate {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: white;
  padding: 18px 24px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  width: 100%;
  max-width: 320px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 20px;
}
.btn-gate:active {
  transform: scale(0.97);
}
.btn-gate:hover {
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.5);
}

/* Tombol Google */
.btn-gate-google {
  background: white; 
  color: #0f172a; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  gap: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
.btn-gate-google img { 
  width: 22px; 
  height: 22px; 
}

/* Link Lupa Password */
.forgot-link {
  color: #38bdf8;
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  cursor: pointer;
  margin-top: auto; /* Mendorong ke bagian paling bawah layar */
  padding: 10px;
  transition: opacity 0.3s ease;
}
.forgot-link:hover { 
  opacity: 0.8; 
}

/* Logo Animasi Berdetak (Opsional) */
.gate-logo {
  width: 80px; 
  margin-bottom: 10px;
  filter: drop-shadow(0 0 15px rgba(56, 189, 248, 0.4));
  animation: floatLogo 3s ease-in-out infinite;
}

@keyframes floatLogo {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0px); }
}

#mainApp { display: none; opacity: 0; transition: opacity 0.5s ease; }

/* ========================================= */
/* MODERN MOBILE BANKING TOAST NOTIFICATION  */
/* ========================================= */
.custom-alert-container {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999999; /* Pastikan selalu di lapisan paling depan */
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 90%;
  max-width: 380px;
  pointer-events: none; /* Agar tidak menghalangi klik di bawahnya */
}

.custom-alert {
  background: rgba(15, 23, 42, 0.92); /* Slate gelap elegan ala banking */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  padding: 14px 18px;
  border-radius: 16px; /* Sudut melengkung modern */
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6), 
              0 0 20px rgba(56, 189, 248, 0.15); /* Efek glow tipis */
  font-size: 14px;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 14px;
  pointer-events: auto;
  
  /* Animasi Masuk dan Keluar dari atas ke bawah (Smooth Banking Style) */
  animation: slideInDown 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards, 
             fadeOutUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards 3.2s;
}

/* Lingkaran Icon ala Mobile Banking */
.custom-alert .alert-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

/* Variasi Warna Aksen & Icon per Status */
.custom-alert.success .alert-icon { 
  background: rgba(16, 185, 129, 0.15); 
  color: #10b981; 
}
.custom-alert.error .alert-icon { 
  background: rgba(239, 68, 68, 0.15); 
  color: #ef4444; 
}
.custom-alert.warning .alert-icon { 
  background: rgba(245, 158, 11, 0.15); 
  color: #f59e0b; 
}

/* Keyframes Animasi Modern */
@keyframes slideInDown {
  0% { transform: translateY(-40px); opacity: 0; scale: 0.95; }
  100% { transform: translateY(0); opacity: 1; scale: 1; }
}

@keyframes fadeOutUp {
  0% { transform: translateY(0); opacity: 1; scale: 1; }
  100% { transform: translateY(-30px); opacity: 0; scale: 0.95; }
}

/* ========================================= */
/* MODERN MOBILE BANKING LOADING OVERLAY     */
/* ========================================= */
.app-loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999999; /* Lapisan tertinggi di atas segala elemen */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.app-loader-overlay.active {
  opacity: 1;
  visibility: visible;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

/* Futuristic Dual-Ring Banking Spinner */
.banking-spinner {
  position: relative;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner-ring {
  position: absolute;
  inset: 0;
  border: 3px solid rgba(56, 189, 248, 0.15);
  border-top-color: #38bdf8;
  border-right-color: #38bdf8;
  border-radius: 50%;
  animation: bankingSpin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.25);
}

.spinner-core {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #38bdf8, #0f5ea8);
  border-radius: 50%;
  animation: corePulse 1.2s ease-in-out infinite alternate;
}

.loader-text {
  color: #f8fafc;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.5px;
  font-family: inherit;
}

@keyframes bankingSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes corePulse {
  0% { transform: scale(0.75); opacity: 0.5; box-shadow: 0 0 5px rgba(56,189,248,0.2); }
  100% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 15px rgba(56,189,248,0.6); }
}