:root {
  --pk: #ff8fa3;
  --pk-l: #fff0f3;
  --pk-m: #ffd6df;
  --mint: #b5e8d5;
  --mint-l: #edfaf5;
  --sky: #b3d9f7;
  --sky-l: #edf6ff;
  --lav: #c9b8f0;
  --lav-l: #f3f0ff;
  --w: #fff;
  --bg: #f7f5f2;
  --g1: #faf9f7;
  --g2: #f3f1ee;
  --g3: #e8e4de;
  --g4: #cdc8c0;
  --g6: #9b9590;
  --t: #2d2a27;
  --t2: #7a7570;
  --t3: #b5b0aa;
  --sh: 0 2px 12px rgba(0, 0, 0, 0.07);
  --r: 18px;
  --r2: 12px;
  --r3: 8px;
  --acc: #ff6b8a;
  --sb: env(safe-area-inset-bottom, 0px);
  --st: env(safe-area-inset-top, 0px);
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  height: 100%;
}
body {
  background: var(--bg);
  font-family: "Nunito", sans-serif;
  color: var(--t);
  font-size: 15px;
  display: flex;
  flex-direction: column;
  overscroll-behavior: none;
}

/* HEADER */
.hdr {
  background: var(--w);
  padding: calc(10px + var(--st)) 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1.5px solid var(--g3);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--sh);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #ffb7c5, #ff8fa3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.brand h1 {
  font-size: 15px;
  font-weight: 900;
  color: var(--t);
  line-height: 1.1;
}
.brand p {
  font-size: 10px;
  color: var(--t3);
  font-weight: 600;
  margin-top: 1px;
}
.btn-xls {
  background: linear-gradient(135deg, #b5e8d5, #2db88a);
  color: #fff;
  border: none;
  border-radius: var(--r3);
  padding: 8px 13px;
  font-size: 12px;
  font-weight: 800;
  font-family: "Nunito", sans-serif;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 2px 8px rgba(45, 184, 138, 0.3);
}

/* SCROLL */
.scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 24px;
}

/* TOP NAV TABS */
.tnav {
  background: var(--w);
  border-bottom: 2px solid var(--g3);
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  position: sticky;
  top: 57px;
  z-index: 99;
}
.tnav::-webkit-scrollbar {
  display: none;
}
.nb {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 5px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 11px 13px;
  touch-action: manipulation;
  font-family: "Nunito", sans-serif;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  color: var(--t3);
  font-size: 12px;
  font-weight: 800;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
.nb * {
  pointer-events: none;
}
.nb-i {
  font-size: 14px;
  line-height: 1;
}
.nb.active {
  color: var(--acc);
  border-bottom-color: var(--acc);
}
.nb:active {
  opacity: 0.7;
}

/* CONTENT */
.wrap {
  max-width: 600px;
  margin: 0 auto;
  padding: 14px 13px;
}
.panel {
  display: none;
}
.panel.active {
  display: block;
  animation: fi 0.18s ease;
}
@keyframes fi {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* CARD */
.card {
  background: var(--w);
  border-radius: var(--r);
  padding: 16px 17px;
  margin-bottom: 13px;
  box-shadow: var(--sh);
  border: 1px solid var(--g3);
}
.ctitle {
  font-size: 14px;
  font-weight: 900;
  color: var(--t);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.tag {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 20px;
  background: var(--pk-l);
  color: var(--acc);
}
.tag-b {
  background: var(--sky-l);
  color: #2a7fc0;
}

/* FORM */
.frow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 11px;
}
.frow.f1 {
  grid-template-columns: 1fr;
}
.frow.f3 {
  grid-template-columns: 1fr 1fr 1fr;
}
.fg label {
  display: block;
  font-size: 10px;
  color: var(--t2);
  margin-bottom: 4px;
  font-weight: 900;
  letter-spacing: 0.3px;
}
.fg input,
.fg select,
.fg textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1.5px solid var(--g3);
  border-radius: var(--r2);
  background: var(--g1);
  color: var(--t);
  font-size: 15px;
  font-weight: 700;
  outline: none;
  transition: all 0.18s;
  font-family: "Nunito", sans-serif;
  appearance: none;
  -webkit-appearance: none;
  min-height: 46px;
}
.fg input:focus,
.fg select:focus {
  border-color: var(--pk);
  background: var(--w);
  box-shadow: 0 0 0 3px rgba(255, 143, 163, 0.2);
}
.fg textarea {
  resize: none;
  min-height: 68px;
  font-size: 14px;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239b9590' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 34px;
}
.amt-row {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 8px;
}

/* PEOPLE */
.ph {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  flex-wrap: wrap;
  gap: 5px;
}
.ph-label {
  font-size: 10px;
  color: var(--t2);
  font-weight: 900;
}
.sel-all-btn {
  font-size: 11px;
  color: var(--acc);
  background: var(--pk-l);
  border: none;
  padding: 5px 13px;
  border-radius: 20px;
  font-weight: 800;
  font-family: "Nunito", sans-serif;
  cursor: pointer;
  touch-action: manipulation;
}
.pgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.pchip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 6px;
  border: 2px solid var(--g3);
  border-radius: var(--r2);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
  background: var(--g1);
  touch-action: manipulation;
  position: relative;
}
.pchip:active {
  transform: scale(0.94);
}
.pchip.sel {
  background: var(--pk-l);
  border-color: var(--pk);
}
.pchip input {
  display: none;
}
.cav {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--g3);
  background: var(--g2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s;
}
.cav img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pchip.sel .cav {
  border-color: var(--pk);
}
.cname {
  font-size: 12px;
  font-weight: 900;
  color: var(--t);
  text-align: center;
}
.ccheck {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--acc);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 900;
  opacity: 0;
  transition: opacity 0.15s;
}
.pchip.sel .ccheck {
  opacity: 1;
}
.selcnt {
  font-size: 11px;
  color: var(--t3);
  font-weight: 700;
}

/* PREVIEW */
.prev {
  font-size: 12px;
  font-weight: 800;
  color: var(--acc);
  padding: 7px 12px;
  background: var(--pk-l);
  border-radius: var(--r3);
  margin-bottom: 10px;
  display: none;
}
.prev.show {
  display: block;
}

/* BUTTONS */
.btn {
  padding: 13px 18px;
  border-radius: var(--r2);
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  transition: all 0.15s;
  font-family: "Nunito", sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  touch-action: manipulation;
  min-height: 48px;
}
.btn:active {
  transform: scale(0.97);
}
.btn-p {
  background: linear-gradient(135deg, #ffb7c5, #ff6b8a);
  color: #fff;
  box-shadow: 0 3px 14px rgba(255, 107, 138, 0.35);
  width: 100%;
  justify-content: center;
}
.btn-s {
  background: var(--g2);
  color: var(--t2);
  border: 1.5px solid var(--g3);
}
.brow {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.brow .btn-s {
  flex: 0 0 auto;
  padding: 12px 15px;
  font-size: 13px;
}
.brow .btn-p {
  flex: 1;
}
.del-btn {
  background: var(--pk-l);
  color: var(--acc);
  border: 1px solid var(--pk-m, #ffd6df);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: var(--r3);
  font-weight: 800;
  font-family: "Nunito", sans-serif;
  cursor: pointer;
  touch-action: manipulation;
}

/* AVATAR */
.av {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 1.5px solid var(--g3);
  background: var(--g2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.prow {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* BADGE */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 800;
}
.dc {
  background: #eef0ff;
  color: #4a5cf7;
}
.au {
  background: var(--mint-l);
  color: #2db88a;
}
.lt {
  background: var(--sky-l);
  color: #2a7fc0;
}
.vdl {
  background: var(--lav-l);
  color: #7c5ce6;
}
.kh {
  background: var(--g2);
  color: var(--g6);
}

/* STAT */
.sgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.sc {
  background: var(--w);
  border-radius: var(--r);
  padding: 13px 14px;
  box-shadow: var(--sh);
  border: 1px solid var(--g3);
  position: relative;
  overflow: hidden;
}
.sc-d {
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: 38px;
  opacity: 0.1;
}
.sc-l {
  font-size: 10px;
  color: var(--t2);
  font-weight: 800;
  margin-bottom: 3px;
}
.sc-v {
  font-size: 16px;
  font-weight: 900;
  color: var(--t);
}
.sc-s {
  font-size: 10px;
  color: var(--t3);
  margin-top: 1px;
  font-weight: 700;
}

/* BARS */
.blist {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bitem {
  display: grid;
  grid-template-columns: 58px 1fr 84px;
  gap: 7px;
  align-items: center;
}
.blabel {
  font-size: 10px;
  color: var(--t2);
  font-weight: 800;
  text-align: right;
}
.btrack {
  height: 7px;
  background: var(--g2);
  border-radius: 20px;
  overflow: hidden;
}
.bfill {
  height: 100%;
  border-radius: 20px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.bval {
  font-size: 10px;
  font-weight: 800;
  text-align: right;
}

/* COLORS */
.pos {
  color: #2db88a;
  font-weight: 900;
}
.neg {
  color: var(--acc);
  font-weight: 900;
}
.zer {
  color: var(--t3);
  font-weight: 700;
}

/* BALANCE CARD */
.balcard {
  background: var(--w);
  border-radius: var(--r);
  border: 1px solid var(--g3);
  padding: 13px 15px;
  display: flex;
  align-items: center;
  gap: 11px;
  box-shadow: var(--sh);
  margin-bottom: 10px;
}
.balinfo {
  flex: 1;
  min-width: 0;
}
.balname {
  font-size: 14px;
  font-weight: 900;
  color: var(--t);
}
.balmeta {
  font-size: 11px;
  color: var(--t2);
  font-weight: 600;
  margin-top: 2px;
}
.balamount {
  font-size: 15px;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

/* SETTLEMENT */
.slist {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sitem {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--pk-l), #fff5ed);
  border-radius: var(--r2);
  padding: 13px 13px;
  border: 1.5px solid var(--pk-m, #ffd6df);
}
.sside {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 50px;
}
.sname {
  font-size: 11px;
  font-weight: 800;
  color: var(--t);
}
.smid {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.sarrow {
  font-size: 20px;
  color: var(--t3);
}
.samount {
  font-weight: 900;
  color: var(--acc);
  font-size: 13px;
  text-align: center;
}

/* MINI CHIPS */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}
.chipm {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 20px;
  background: var(--g1);
  color: var(--t2);
  font-weight: 700;
  border: 1px solid var(--g3);
}

/* TRANSFER */
.titem {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 0;
  border-bottom: 1px solid var(--g2);
}
.titem:last-child {
  border-bottom: none;
}
.tinfo {
  flex: 1;
  min-width: 0;
}
.twho {
  font-weight: 800;
  font-size: 13px;
  color: var(--t);
}
.tnote {
  font-size: 11px;
  color: var(--t2);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tamt {
  font-weight: 900;
  color: #2a7fc0;
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
}
.tdel {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--t3);
  font-size: 20px;
  padding: 4px;
  line-height: 1;
  touch-action: manipulation;
  flex-shrink: 0;
}

/* ENTRY CARD */
.ecard {
  background: var(--w);
  border-radius: var(--r2);
  border: 1px solid var(--g3);
  padding: 13px 14px;
  margin-bottom: 10px;
  box-shadow: var(--sh);
}
.etop {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 7px;
}
.emeta {
  flex: 1;
}
.eamt {
  font-size: 16px;
  font-weight: 900;
  color: var(--t);
}
.eorig {
  font-size: 11px;
  color: var(--t3);
  font-weight: 600;
}
.enote {
  font-size: 12px;
  color: var(--t2);
  font-weight: 700;
  margin-bottom: 6px;
}
.ebot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

/* EMPTY */
.empty {
  text-align: center;
  padding: 36px 20px;
  color: var(--t3);
}
.empty .ei {
  font-size: 42px;
  margin-bottom: 9px;
}
.empty p {
  font-size: 13px;
  font-weight: 700;
}

/* TWO COL */
.twoc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 380px) {
  .twoc {
    grid-template-columns: 1fr;
  }
  .bitem {
    grid-template-columns: 50px 1fr 76px;
  }
}
@media (min-width: 600px) {
  .pgrid {
    grid-template-columns: repeat(6, 1fr);
  }
  .sgrid {
    grid-template-columns: repeat(3, 1fr);
  }
}
/* LOCK SCREEN */
#lock-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(160deg, #fff0f3 0%, #fff5ed 50%, #f3f0ff 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 32px 24px;
}
#lock-screen.hidden {
  display: none;
}
.lock-logo {
  font-size: 52px;
  margin-bottom: 8px;
}
.lock-title {
  font-size: 20px;
  font-weight: 900;
  color: #2d2a27;
  margin-bottom: 4px;
}
.lock-sub {
  font-size: 13px;
  color: #b5b0aa;
  font-weight: 600;
  margin-bottom: 32px;
}
.lock-box {
  background: #fff;
  border-radius: 20px;
  padding: 24px 24px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  border: 1.5px solid #e8e4de;
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lock-label {
  font-size: 11px;
  font-weight: 900;
  color: #7a7570;
  letter-spacing: 0.3px;
}
.lock-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid #e8e4de;
  border-radius: 12px;
  font-size: 22px;
  font-weight: 800;
  font-family: "Nunito", sans-serif;
  letter-spacing: 8px;
  text-align: center;
  outline: none;
  background: #faf9f7;
  color: #2d2a27;
  transition: border-color 0.18s;
}
.lock-input:focus {
  border-color: #ff8fa3;
  box-shadow: 0 0 0 3px rgba(255, 143, 163, 0.2);
  background: #fff;
}
.lock-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffb7c5, #ff6b8a);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  font-family: "Nunito", sans-serif;
  cursor: pointer;
  box-shadow: 0 3px 14px rgba(255, 107, 138, 0.35);
  transition: all 0.15s;
  letter-spacing: 0.3px;
}
.lock-btn:active {
  transform: scale(0.97);
}
.lock-error {
  font-size: 12px;
  color: #ff6b8a;
  font-weight: 800;
  text-align: center;
  min-height: 18px;
  transition: opacity 0.2s;
}
