/* ═══════════════════════════════════════════
   KWEZAN — Dark-first Design System
═══════════════════════════════════════════ */


*, *::before, *::after { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
.font-inter { font-family: 'Inter', sans-serif; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 0; height: 0; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ── No spinner ── */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }
input[type=number] { -moz-appearance: textfield; }

/* ══════════════════════════════════════════
   SPLASH
══════════════════════════════════════════ */
#splash { transition: opacity .5s ease, transform .5s ease; }
#splash.hide { opacity: 0; transform: scale(1.08); pointer-events: none; }
.splash-logo { animation: splashBounce .8s cubic-bezier(.34,1.56,.64,1) forwards; }
@keyframes splashBounce {
  0%  { transform: translateY(-30px) scale(.7); opacity: 0; }
  100%{ transform: translateY(0)     scale(1);  opacity: 1; }
}

/* ══════════════════════════════════════════
   ONBOARDING
══════════════════════════════════════════ */
.ob-slide { transition: opacity .25s, transform .25s; }
.ob-slide.hidden { display: none; }
.ob-icon { animation: floatAnim 3s ease-in-out infinite; }
@keyframes floatAnim { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }

.ob-tag {
  padding: 5px 12px; border-radius: 999px;
  background: rgba(255,255,255,.08);
  font-size: .75rem; font-weight: 500;
  color: rgba(255,255,255,.5);
}
.ob-label {
  display: block; font-size: .7rem; font-weight: 700;
  color: rgba(255,255,255,.4); text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: 6px;
}
.ob-input {
  width: 100%; padding: 14px 16px;
  border-radius: 16px;
  border: 1.5px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: white; font-family: inherit; font-size: .95rem;
  outline: none; transition: border-color .2s;
}
.ob-input:focus { border-color: #00875A; }
.ob-input option { background: #1C1C1E; }

.ob-radio {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 14px;
  border: 1.5px solid rgba(255,255,255,.1);
  cursor: pointer; transition: border-color .2s, background .2s;
}
.ob-radio:has(.ob-radio-inp:checked) { border-color: #00875A; background: rgba(0,135,90,.12); }
.ob-radio-inp { accent-color: #00875A; width: 18px; height: 18px; flex-shrink: 0; }

/* ══════════════════════════════════════════
   INPUTS
══════════════════════════════════════════ */
.kinput {
  width: 100%; padding: 14px 16px;
  border-radius: 16px;
  border: 1.5px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.06);
  color: white; font-family: inherit; font-size: .9rem;
  outline: none; transition: border-color .2s;
}
.kinput:focus { border-color: #00875A; }
.kinput option { background: #1C1C1E; }
.kinput-suf {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  color: rgba(255,255,255,.3); font-weight: 700; font-size: .8rem;
  pointer-events: none;
}
.kinput-sm {
  padding: 8px 12px; border-radius: 12px;
  border: 1.5px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.06);
  color: white; font-family: inherit; font-size: .8rem;
  outline: none;
}
.kinput-sm option { background: #1C1C1E; }

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */
.kbtn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 16px 24px; border-radius: 16px;
  background: #00875A; color: white;
  font-weight: 700; font-size: 1rem; font-family: inherit;
  border: none; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,135,90,.4);
  transition: background .15s, transform .1s;
}
.kbtn:active { transform: scale(.97); }
.kbtn:hover  { background: #00A86B; }

.kbtn-sm {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: 12px;
  background: #00875A; color: white;
  font-weight: 700; font-size: .8rem; font-family: inherit;
  border: none; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,135,90,.35);
}

.kbtn-success {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 16px 24px; border-radius: 16px;
  background: #10B981; color: white;
  font-weight: 700; font-size: 1rem; font-family: inherit;
  border: none; cursor: pointer;
  box-shadow: 0 8px 24px rgba(16,185,129,.35);
}

.kbtn-ghost {
  display: flex; align-items: center;
  padding: 13px 20px; border-radius: 14px;
  border: 1.5px solid rgba(255,255,255,.12);
  background: transparent; color: rgba(255,255,255,.6);
  font-weight: 600; font-size: .875rem; font-family: inherit;
  cursor: pointer; transition: border-color .2s, color .2s;
}
.kbtn-ghost:hover { border-color: #00875A; color: #00875A; }

.kbtn-danger {
  display: flex; align-items: center; justify-content: center;
  padding: 13px 20px; border-radius: 14px;
  background: #EF4444; color: white;
  font-weight: 700; font-size: .875rem; font-family: inherit;
  border: none; cursor: pointer;
}
.kbtn-danger-ghost {
  display: flex; align-items: center;
  padding: 13px 20px; border-radius: 14px;
  border: 1.5px solid rgba(239,68,68,.3);
  background: transparent; color: #EF4444;
  font-weight: 600; font-size: .875rem; font-family: inherit;
  cursor: pointer;
}

/* ══════════════════════════════════════════
   KEYPAD
══════════════════════════════════════════ */
.kkey {
  padding: 16px 12px; border-radius: 14px;
  background: rgba(255,255,255,.08);
  color: white; font-family: inherit;
  font-size: 1.1rem; font-weight: 700;
  border: none; cursor: pointer;
  transition: background .1s, transform .1s;
  min-height: 52px;
}
.kkey:active { background: rgba(255,255,255,.18); transform: scale(.94); }
.kkey-fn { background: rgba(255,255,255,.04); color: rgba(255,255,255,.5); }
.kkey-accent {
  background: #00875A; border-radius: 14px;
  font-size: 1.4rem; border: none; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,135,90,.4);
  grid-row: span 2; min-height: unset;
  transition: background .15s;
}
.kkey-accent:active { background: #006B48; }

/* ══════════════════════════════════════════
   DATE SCROLL PICKER
══════════════════════════════════════════ */
.date-pill {
  display: flex; flex-direction: column; align-items: center;
  min-width: 44px; padding: 8px 10px; border-radius: 14px;
  border: none; background: rgba(255,255,255,.06);
  cursor: pointer; transition: background .15s;
  flex-shrink: 0;
}
.date-pill.active { background: #00875A; }
.date-pill .dp-day { font-size: .65rem; color: rgba(255,255,255,.4); font-weight: 600; text-transform: uppercase; }
.date-pill .dp-num { font-size: 1rem; font-weight: 800; color: white; line-height: 1.2; }
.date-pill.active .dp-day { color: rgba(255,255,255,.7); }

/* ══════════════════════════════════════════
   MODALS
══════════════════════════════════════════ */
.kmodal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(8px);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
}
.kmodal.hidden { display: none; }

.ksheet {
  background: #1C1C1E;
  border-radius: 28px 28px 0 0;
  padding: 12px 20px max(32px, env(safe-area-inset-bottom, 0px));
  width: 100%; max-width: 480px;
  box-shadow: 0 -8px 40px rgba(0,0,0,.6);
  animation: sheetUp .28s cubic-bezier(.34,1.1,.64,1);
  max-height: 95vh; overflow-y: auto;
}
.ksheet-full { max-height: 92vh; }
@keyframes sheetUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.ksheet-handle {
  width: 40px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,.15); margin: 0 auto 16px;
}

@media (min-width: 640px) {
  .kmodal { align-items: center; padding: 16px; }
  .ksheet { border-radius: 28px; }
}

/* ══════════════════════════════════════════
   CIRCLE ICONS (category + payment)
══════════════════════════════════════════ */
.circle-icon {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  cursor: pointer; transition: transform .15s;
}
.circle-icon:active { transform: scale(.9); }
.circle-icon .ci {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; transition: box-shadow .2s;
}
.circle-icon.sel .ci { box-shadow: 0 0 0 3px white; }
.circle-icon .ci-label {
  font-size: .65rem; font-weight: 600; color: rgba(255,255,255,.5);
  text-align: center; line-height: 1.2; max-width: 56px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.circle-icon .ci-amount {
  font-size: .65rem; font-weight: 700; color: rgba(255,255,255,.7);
}

/* ══════════════════════════════════════════
   TRANSACTION ROW
══════════════════════════════════════════ */
.tx-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 18px;
  background: rgba(255,255,255,.04);
  cursor: pointer; transition: background .15s;
}
.tx-row:active { background: rgba(255,255,255,.08); }
.tx-icon {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}

/* ══════════════════════════════════════════
   PROGRESS BARS
══════════════════════════════════════════ */
.prog {
  height: 6px; border-radius: 6px;
  background: rgba(255,255,255,.08); overflow: hidden;
}
.prog-fill {
  height: 100%; border-radius: 6px;
  transition: width .7s cubic-bezier(.34,1.2,.64,1);
}

/* ══════════════════════════════════════════
   NAVIGATION
══════════════════════════════════════════ */
.nav {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: rgba(255,255,255,.3); font-size: .6rem; font-weight: 700;
  border: none; background: none; cursor: pointer;
  font-family: inherit; transition: color .2s;
}
.nav:hover { color: rgba(255,255,255,.6); }
.nav.active { color: #00875A; }
.nav i { stroke-width: 1.8; }
.safe-bottom { padding-bottom: max(env(safe-area-inset-bottom, 0px), 4px); }

/* ══════════════════════════════════════════
   FAB
══════════════════════════════════════════ */
.fab {
  background: #00875A;
  box-shadow: 0 8px 28px rgba(0,135,90,.5);
  transition: transform .15s, background .2s;
}
.fab:active { transform: scale(.9); }

/* ══════════════════════════════════════════
   SETTINGS SECTIONS
══════════════════════════════════════════ */
.ks-section {
  background: #1C1C1E; border-radius: 24px; padding: 20px;
}
.ks-section-title {
  font-size: .75rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .06em; color: rgba(255,255,255,.35); margin-bottom: 16px;
}
.ks-label { font-size: .72rem; font-weight: 700; color: rgba(255,255,255,.35); text-transform: uppercase; letter-spacing: .04em; }
.ks-card { background: #1C1C1E; border-radius: 20px; padding: 16px; }
.ks-val { font-size: 1.2rem; font-weight: 900; margin-top: 4px; }

/* ══════════════════════════════════════════
   REPORT PILLS
══════════════════════════════════════════ */
.rp {
  padding: 9px 16px; border-radius: 12px; flex-shrink: 0;
  background: rgba(255,255,255,.06); color: rgba(255,255,255,.4);
  font-size: .8rem; font-weight: 700; font-family: inherit;
  border: none; cursor: pointer; transition: all .2s;
}
.rp.active { background: #00875A; color: white; box-shadow: 0 4px 12px rgba(0,135,90,.4); }

/* ══════════════════════════════════════════
   TOAST
══════════════════════════════════════════ */
#toast { animation: toastIn .3s ease; }
@keyframes toastIn {
  from { opacity:0; transform:translateX(-50%) translateY(-10px); }
  to   { opacity:1; transform:translateX(-50%) translateY(0); }
}

/* ══════════════════════════════════════════
   HISTORY CARD (matches screenshot)
══════════════════════════════════════════ */
.hist-account-card {
  background: #2C2C2E; border-radius: 20px; padding: 16px;
}

/* ══════════════════════════════════════════
   GOAL CARD
══════════════════════════════════════════ */
.goal-card { background: #1C1C1E; border-radius: 24px; padding: 20px; }

/* ══════════════════════════════════════════
   BUDGET CARD
══════════════════════════════════════════ */
.budget-cat-card { background: #1C1C1E; border-radius: 20px; padding: 16px; }
