/* ===== Layar kunci ===== */
.lock {
  display: flex; flex-direction: column; align-items: center;
  padding-top: 72px; text-align: center; text-shadow: 0 1px 10px rgba(0, 0, 0, .2);
}
.lock-date { font-size: 19px; font-weight: 600; }
.lock-time {
  font-size: 96px; font-weight: 600; letter-spacing: -1px; line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.lock-hint {
  position: absolute; bottom: 104px; left: 0; right: 0;
  font-size: 15px; font-weight: 500; opacity: .85;
}
.lock-tools {
  position: absolute; bottom: 30px; left: 44px; right: 44px;
  display: flex; justify-content: space-between;
}
.round {
  width: 50px; height: 50px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(40, 40, 44, .45); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}

/* ===== Notifikasi lockscreen (bubble bertumpuk) ===== */
.notif-stack {
  position: absolute; left: 10px; right: 10px; bottom: 150px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 5;
}
.notif {
  display: flex; gap: 10px; align-items: center;
  padding: 12px; border-radius: 22px;
  background: rgba(240, 240, 245, .88);
  backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  color: #000; text-align: left; text-shadow: none;
  opacity: 0; transform: translateY(-30px) scale(.96);
  transition: opacity .45s ease, transform .5s cubic-bezier(.2, .9, .3, 1.2);
}
.notif.show { opacity: 1; transform: none; }
.notif-av { width: 40px; height: 40px; border-radius: 9px; flex: none; }
.notif-body { flex: 1; min-width: 0; font-size: 15px; }
.notif-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; font-weight: 600; }
.notif-row span { color: #8e8e93; font-size: 12px; font-weight: 400; }
.notif-msg { margin-top: 2px; color: #1c1c1e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== Keypad PIN ===== */
.passcode { display: flex; flex-direction: column; align-items: center; padding-top: 110px; }
.pc-title { font-size: 17px; font-weight: 500; margin-bottom: 26px; }
.pc-dots { display: flex; gap: 22px; margin-bottom: 64px; }
.pc-dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #fff; transition: background .15s, border-color .15s; }
.pc-dot.filled { background: #fff; }
.pc-dots.ok .pc-dot { background: var(--green); border-color: var(--green); }
.pc-dots.shake { animation: shake .45s; }
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-8px); }
  40%, 60% { transform: translateX(8px); }
}
.pc-keys { display: grid; grid-template-columns: repeat(3, 80px); gap: 14px 20px; }
.pc-key {
  width: 80px; height: 80px; border-radius: 50%;
  background: rgba(120, 120, 128, .45);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: background .12s;
}
.pc-key:active { background: rgba(200, 200, 210, .75); }
.pc-num { font-size: 34px; line-height: 1; }
.pc-letters { font-size: 10px; letter-spacing: 2px; margin-top: 3px; font-weight: 600; }
.pc-del { background: none !important; }
.pc-spacer { width: 80px; height: 80px; }
.pc-cancel { margin-top: 30px; font-size: 17px; }

/* ===== Wallpaper lockscreen diburamkan saat keypad muncul ===== */
#wpLock {
  transition: opacity .6s ease, transform .9s cubic-bezier(.2, .8, .2, 1), filter .45s ease;
}
#wpLock.blurred {
  filter: blur(22px) brightness(.7);
  transform: scale(1.08);
}
/* Pastikan geser di lockscreen bisa ditangkap */
#lockScreen {
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}
#lockScreen.active {
  pointer-events: auto !important;
}


/* Pastikan area lock bisa disentuh */
#lockScreen,
#lockScreen.active {
  pointer-events: auto !important;
  touch-action: pan-y !important;
  z-index: 20;
}
#lockScreen .lock-hint,
#lockScreen .lock-tools,
#lockScreen .lock-date,
#lockScreen .lock-time,
#lockScreen .notif-stack {
  pointer-events: none;
}
#lockScreen .notif {
  pointer-events: auto;
}

/* Pastikan keypad passcode bisa diklik */
#passcode,
#passcode.active {
  pointer-events: auto !important;
  z-index: 30;
}
#passcode .pc-key {
  pointer-events: auto !important;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(255,255,255,0.3);
  touch-action: manipulation;
}

/* Stacking & interaksi final */
#lockScreen.active {
  z-index: 20;
  pointer-events: auto !important;
}
#passcode {
  z-index: 40;
  color: #fff;
}
#passcode.active {
  pointer-events: auto !important;
  z-index: 40;
}
#passcode .pc-key,
#passcode .pc-cancel {
  pointer-events: auto !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(255,255,255,0.25);
  cursor: pointer;
  border: none;
  color: #fff;
}
#passcode .pc-del {
  font-size: 28px;
  background: transparent !important;
}

/* ===== FIX FINAL: lock vs passcode stacking ===== */
#lockScreen.layer:not(.active) {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  z-index: 1 !important;
}
#lockScreen.layer.active {
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
  z-index: 20 !important;
}

#passcode.layer {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
#passcode.layer:not(.active) {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  z-index: 1 !important;
}
#passcode.layer.active {
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
  z-index: 50 !important;
}

#passcode .pc-key {
  background: rgba(120, 120, 128, 0.55) !important;
  pointer-events: auto !important;
  z-index: 51;
}
#passcode .pc-title,
#passcode .pc-dots,
#passcode .pc-cancel {
  position: relative;
  z-index: 51;
  color: #fff;
}


/* Quick translate panel on lock screen */
.lock-translate { width: min(86%, 330px); margin-top: 14px; position: relative; z-index: 25; text-shadow: none; pointer-events: auto; }
.translate-toggle { border: 1px solid rgba(255,255,255,.34); border-radius: 18px; padding: 7px 13px; color: #fff; background: rgba(25,25,32,.38); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font-size: 12px; font-weight: 600; cursor: pointer; }
.translate-panel { margin-top: 8px; padding: 10px; border-radius: 16px; background: rgba(248,248,252,.94); color: #17171a; text-align: left; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.translate-panel[hidden] { display: none !important; }
.translate-panel textarea { display: block; box-sizing: border-box; width: 100%; resize: vertical; min-height: 48px; border: 1px solid #d5d5dc; border-radius: 9px; padding: 8px; color: #17171a; background: #fff; font: inherit; font-size: 12px; outline: none; }
.translate-controls { display: flex; align-items: center; gap: 5px; margin-top: 7px; font-size: 10px; }
.translate-controls label { flex: 1; }
.translate-controls select { max-width: 86px; border: 1px solid #d5d5dc; border-radius: 8px; padding: 6px 4px; background: #fff; color: #17171a; font-size: 11px; }
.translate-controls button { border: 0; border-radius: 8px; padding: 7px 9px; color: #fff; background: #3978e8; font-size: 11px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.translate-output { margin-top: 8px; padding: 8px; border-radius: 8px; background: #f0f1f6; min-height: 18px; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-wrap; }
.translate-note { margin-top: 5px; color: #73737c; font-size: 9px; line-height: 1.3; }
#lockScreen .lock-translate { pointer-events: auto; }
@media (max-height: 760px) { .lock { padding-top: 56px; } .lock-time { font-size: 82px; } .lock-translate { margin-top: 8px; } .translate-panel { padding: 8px; } }

/* Pilihan bahasa ringkas di bawah jam lockscreen */
.lock-translate { width: min(92%, 360px); margin-top: 14px; position: relative; z-index: 25; text-shadow: none; pointer-events: auto; }
.language-choices { display:flex; justify-content:center; gap:6px; flex-wrap:wrap; }
.language-choice { border:1px solid rgba(255,255,255,.36); border-radius:16px; padding:7px 10px; color:#fff; background:rgba(25,25,32,.42); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px); font-size:11px; font-weight:600; cursor:pointer; }
.language-choice.active { background:rgba(255,255,255,.92); color:#24242b; border-color:rgba(255,255,255,.95); }
.language-selected { margin-top:5px; color:rgba(255,255,255,.9); font-size:10px; min-height:12px; }
