* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #F3F8FF;
  color: #1F2A44;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

.pin-page, .nav-header, .tabbar, button {
  -webkit-user-select: none;
  user-select: none;
}

button, input {
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  touch-action: manipulation;
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  background: linear-gradient(180deg, #EEF5FF 0%, #F7FAFF 55%, #FFFFFF 100%);
  position: relative;
  box-shadow: 0 0 32px rgba(47, 123, 255, 0.06);
}

/* ---- PIN Lock Screen ---- */
.pin-page {
  min-height: 100dvh;
  padding: max(60px, 9vh) 24px calc(24px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(180deg, #E6F0FF 0%, #F3F8FF 45%, #FFFFFF 100%);
}

.pin-logo {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(47, 123, 255, 0.16);
  margin-bottom: 12px;
  display: block;
  object-fit: cover;
}

.pin-brand {
  font-size: 26px;
  font-weight: 700;
  color: #1F2A44;
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.pin-hint {
  color: #7A869A;
  font-size: 13px;
  margin-bottom: 28px;
}

.dots {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
}

.dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid #C5D3E8;
  background: #FFFFFF;
  transition: all 0.12s ease;
}

.dot.on {
  background: #2F7BFF;
  border-color: #2F7BFF;
  box-shadow: 0 2px 6px rgba(47, 123, 255, 0.35);
}

.pin-err {
  color: #E5484D;
  background: #FFF1F1;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 12px;
  margin-bottom: 6px;
  text-align: center;
}

.pad {
  width: 100%;
  max-width: 286px;
  margin-top: 22px;
}

.pad-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 11px;
}

.key {
  width: 82px;
  height: 54px;
  border-radius: 12px;
  background: #FFFFFF;
  font-size: 21px;
  font-weight: 600;
  color: #1F2A44;
  box-shadow: 0 3px 9px rgba(47, 123, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.key:active {
  background: #EAF2FF;
}

.key-ok {
  background: linear-gradient(135deg, #4C8DFF, #2F7BFF);
  color: #FFFFFF;
  font-size: 15px;
  box-shadow: 0 4px 10px rgba(47, 123, 255, 0.3);
}

.key-ok:active {
  background: #2569E0;
}

.key-del {
  font-size: 18px;
  color: #7A869A;
}

/* ---- Main Shell & Nav ---- */
.main-shell {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.nav-header {
  flex: none;
  height: calc(44px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  background: #FFFFFF;
  border-bottom: 1px solid #EEF2F8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: #1F2A44;
}

.tab-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.tabbar {
  flex: none;
  height: calc(56px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: #FFFFFF;
  border-top: 1px solid #EEF2F8;
  display: flex;
  align-items: stretch;
}

.tab-btn {
  flex: 1;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #8A94A6;
  font-size: 11px;
  padding: 4px 0;
}

.tab-btn img {
  width: 24px;
  height: 24px;
  display: block;
}

.tab-btn.on {
  color: #2F7BFF;
  font-weight: 600;
}

/* ---- Native date overlay ---- */
.native-date-overlay {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* ---- Tab 1: Entry ---- */
.entry-top {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 14px 0;
  padding: 10px 12px;
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(47, 123, 255, 0.08);
}

.date-btn {
  position: relative;
  font-size: 18px;
  font-weight: 700;
  color: #1F2A44;
  cursor: pointer;
  padding-right: 4px;
}

.wd {
  font-size: 12px;
  color: #7A869A;
  font-weight: 400;
}

.caret {
  font-size: 11px;
  color: #2F7BFF;
}

.wage-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.wage {
  display: flex;
  align-items: center;
  background: #F5F8FC;
  border: 1px solid #E3EAF5;
  border-radius: 8px;
  padding: 0 8px;
  height: 32px;
}

.wage:focus-within {
  border-color: #2F7BFF;
}

.wage-k {
  font-size: 11px;
  color: #7A869A;
}

.wage-in {
  width: 44px;
  border: none;
  background: transparent;
  outline: none;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: #2F7BFF;
}

.wage-u {
  font-size: 10px;
  color: #7A869A;
}

.wage-tip {
  font-size: 10px;
  color: #9AA5B8;
  margin-top: 3px;
}

.entry-mid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 14px 4px;
}

.blk {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 12px 14px 10px;
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(47, 123, 255, 0.08);
}

.blk-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 5px;
}

.blk-t {
  font-size: 15px;
  font-weight: 700;
  color: #1F2A44;
}

.blk-s {
  font-size: 11px;
  color: #7A869A;
}

.hd {
  display: flex;
  font-size: 10px;
  color: #9AA5B8;
  padding: 0 2px 4px;
}

.hc {
  flex: 1;
  text-align: center;
}

.hx {
  width: 28px;
}

.line {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}

.row-in {
  flex: 1;
  min-width: 0;
  height: 36px;
  margin-right: 6px;
  background: #F5F8FC;
  border: 1px solid #E3EAF5;
  border-radius: 8px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #1F2A44;
  outline: none;
}

.row-in:focus {
  border-color: #2F7BFF;
  background: #FFFFFF;
}

.del-row {
  width: 22px;
  height: 32px;
  background: transparent;
  color: #C0C8D6;
  font-size: 13px;
  padding: 0;
}

.add-row {
  width: 100%;
  height: 30px;
  border: 1px dashed #C9D8F2;
  border-radius: 8px;
  color: #2F7BFF;
  font-size: 12px;
  background: #F8FBFF;
}

.msg {
  font-size: 12px;
  margin: 0 0 6px;
  padding: 6px 10px;
  border-radius: 8px;
}

.msg.err {
  color: #C2410C;
  background: #FFF4EC;
}

.msg.ok {
  color: #16A34A;
  background: #ECFBF1;
}

.entry-foot {
  flex: none;
  display: flex;
  align-items: center;
  background: #FFFFFF;
  box-shadow: 0 -4px 12px rgba(47, 123, 255, 0.08);
  border-radius: 12px 12px 0 0;
  padding: 9px 12px 9px 14px;
}

.nums {
  flex: 1;
  display: flex;
}

.n {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.nk {
  font-size: 10px;
  color: #7A869A;
}

.nv {
  font-size: 13px;
  font-weight: 600;
  color: #1F2A44;
  margin-top: 2px;
}

.nv.b {
  font-size: 16px;
  font-weight: 700;
}

.save-btn {
  flex: none;
  width: 82px;
  height: 40px;
  margin-left: 6px;
  background: linear-gradient(135deg, #4C8DFF, #2F7BFF);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border-radius: 9px;
  box-shadow: 0 4px 10px rgba(47, 123, 255, 0.3);
}

.save-btn:disabled {
  opacity: 0.55;
}

.pos { color: #16A34A; }
.neg { color: #E5484D; }
.warn { color: #F59E0B; }
.dim { color: #B8C1D0; }

/* ---- Tab 2: Data ---- */
.data-page {
  padding: 12px 14px 8px;
}

.bar {
  flex: none;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  gap: 8px;
}

.seg {
  display: flex;
  background: #FFFFFF;
  border-radius: 999px;
  padding: 3px;
  box-shadow: 0 3px 9px rgba(47, 123, 255, 0.08);
}

.seg-item {
  width: 42px;
  background: transparent;
  text-align: center;
  padding: 5px 0;
  border-radius: 999px;
  font-size: 13px;
  color: #7A869A;
}

.seg-item.wide {
  width: 66px;
}

.seg-item.on {
  background: #2F7BFF;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(47, 123, 255, 0.3);
}

.range {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  font-size: 12px;
}

.rd {
  position: relative;
  color: #1F2A44;
  background: #FFFFFF;
  border-radius: 6px;
  padding: 5px 8px;
  box-shadow: 0 2px 6px rgba(47, 123, 255, 0.08);
  cursor: pointer;
}

.rs {
  color: #9AA5B8;
  margin: 0 4px;
}

.rr {
  background: transparent;
  color: #2F7BFF;
  margin-left: 4px;
  font-size: 15px;
  padding: 2px 4px;
}

.notice {
  flex: none;
  background: #FFF4EC;
  color: #C2410C;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  margin-bottom: 10px;
  cursor: pointer;
}

.sum {
  flex: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.sc {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 11px 14px;
  box-shadow: 0 4px 12px rgba(47, 123, 255, 0.08);
}

.sk {
  font-size: 11px;
  color: #7A869A;
}

.sv {
  font-size: 19px;
  font-weight: 700;
  color: #1F2A44;
  margin-top: 3px;
}

.table-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #FFFFFF;
  border-radius: 12px;
  padding: 0 12px;
  box-shadow: 0 4px 12px rgba(47, 123, 255, 0.08);
}

.tbody {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}

.tr {
  flex: none;
  display: flex;
  align-items: center;
  height: 40px;
  border-top: 1px solid #EEF2F8;
  font-size: 12px;
  color: #1F2A44;
}

.tr.clickable {
  cursor: pointer;
}

.tr.th {
  flex: none;
  height: 32px;
  border-top: none;
  color: #9AA5B8;
  font-size: 11px;
}

.c0 {
  width: 86px;
  display: flex;
  flex-direction: column;
}

.c {
  flex: 1;
  text-align: right;
}

.cp {
  flex: 1.3;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.th .cp {
  font-weight: 400;
}

.t1 {
  font-size: 13px;
  color: #1F2A44;
  font-weight: 600;
}

.t2 {
  font-size: 10px;
  color: #9AA5B8;
}

.tr.now {
  background: #F5F9FF;
}

.tr.now .t2 {
  color: #2F7BFF;
}

.tr.none {
  color: #B8C1D0;
}

.tr.none .t1 {
  color: #7A869A;
}

.mini {
  width: 40px;
  height: 3px;
  background: #EEF2F8;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 2px;
}

.mini-bar {
  height: 100%;
}

.mini-bar.pos { background: #16A34A; }
.mini-bar.neg { background: #E5484D; }
.gray { color: #B8C1D0; font-weight: 400; }

.data-foot {
  flex: none;
  text-align: center;
  color: #9AA5B8;
  font-size: 11px;
  padding-top: 6px;
}

.empty {
  text-align: center;
  color: #9AA5B8;
  padding: 24px 0;
  font-size: 12px;
}

/* ---- Tab 3: Ledger ---- */
.ledger-page {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  padding: 10px 14px 18px;
}

.ledger-top-bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.seg-item.sm {
  width: 52px;
  font-size: 12px;
}

.range-caption {
  font-size: 11px;
  color: #7A869A;
  text-align: right;
  white-space: nowrap;
}

.kpis {
  flex: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.kpi {
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(47, 123, 255, 0.08);
  padding: 11px 13px;
}

.kpi.main.profit-hero {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #4C8DFF 0%, #2F7BFF 100%);
  padding: 13px 14px;
  box-shadow: 0 6px 16px rgba(47, 123, 255, 0.28);
  cursor: default;
}

.kpi.main.profit-hero.is-neg {
  background: linear-gradient(135deg, #F97066 0%, #E5484D 100%);
  box-shadow: 0 6px 16px rgba(229, 72, 77, 0.25);
}

.kk {
  font-size: 11px;
  color: #7A869A;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kpi.main .kk {
  color: rgba(255, 255, 255, 0.9);
}

.hero-set-btn {
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
}

.hero-set-btn:active {
  background: rgba(255, 255, 255, 0.3);
}

.kv {
  font-size: 30px;
  font-weight: 700;
  color: #FFFFFF;
  margin-top: 3px;
  line-height: 1.18;
}

.kv.sm {
  font-size: 18px;
  color: #1F2A44;
  margin-top: 4px;
}

.kv.sm.pos { color: #16A34A; }
.kv.sm.neg { color: #E5484D; }
.kv.sm.warn { color: #F59E0B; }

.hero-sub {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 5px;
}

.kpi-sub {
  font-size: 10px;
  color: #9AA5B8;
  margin-top: 3px;
}

.out-card, .quick-card {
  flex: none;
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(47, 123, 255, 0.08);
  padding: 11px 13px;
  margin-bottom: 10px;
}

.out-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.out-card-t {
  font-size: 13px;
  font-weight: 700;
  color: #1F2A44;
}

.gross-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ECFBF1;
  color: #16A34A;
}

.gross-badge.neg {
  background: #FFF1F1;
  color: #E5484D;
}

.out-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid #EEF2F8;
}

.out-row.clickable {
  cursor: pointer;
}

.out-row.clickable:active {
  background: #F8FBFF;
}

.out-left {
  flex: 1;
  min-width: 0;
}

.out-title {
  font-size: 13px;
  font-weight: 600;
  color: #1F2A44;
  display: flex;
  align-items: center;
  gap: 4px;
}

.out-edit-hint {
  font-size: 10px;
  font-weight: 500;
  color: #2F7BFF;
}

.out-desc {
  font-size: 11px;
  color: #8A94A6;
  margin-top: 2px;
  line-height: 1.35;
}

.out-val {
  flex: none;
  font-size: 13px;
  font-weight: 700;
  color: #1F2A44;
}

.quick-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.quick-btn {
  background: #F0F6FF;
  color: #2F7BFF;
  border: 1px solid #D9E8FF;
  border-radius: 9px;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 600;
  flex: 1 1 calc(33.33% - 6px);
  min-width: 92px;
  text-align: center;
}

.quick-btn:active {
  background: #DCEBFF;
}

.quick-btn.custom {
  background: #FFF7ED;
  color: #C2410C;
  border-color: #FED7AA;
}

.ledger-bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2px 0 8px;
}

.add-btn {
  font-size: 13px;
  color: #fff;
  background: linear-gradient(135deg, #4C8DFF, #2F7BFF);
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 600;
  box-shadow: 0 3px 8px rgba(47, 123, 255, 0.3);
}

.ledger-list {
  flex: none;
  min-height: 88px;
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(47, 123, 255, 0.08);
  padding: 0 12px;
}

.it {
  display: flex;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid #EEF2F8;
}

.it:last-child {
  border-bottom: none;
}

.it-main {
  flex: 1;
  min-width: 0;
}

.it-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.it-date {
  font-size: 14px;
  font-weight: 600;
  color: #1F2A44;
}

.cat-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 5px;
  background: #EEF5FF;
  color: #2F7BFF;
}

.it-sub {
  font-size: 11px;
  color: #8A94A6;
  margin-top: 2px;
}

.it-note {
  font-size: 11px;
  color: #7A869A;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.it-amt {
  font-size: 15px;
  font-weight: 700;
  margin: 0 8px;
  text-align: right;
}

.it-act {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.act {
  background: transparent;
  font-size: 11px;
  color: #2F7BFF;
  padding: 2px 4px;
}

.act.del {
  color: #9AA5B8;
}

.daily-it {
  cursor: pointer;
}

.daily-it:active {
  background: #F8FBFF;
}

.cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.cat-chip {
  background: #F5F8FC;
  color: #5A667A;
  border: 1px solid #E3EAF5;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
}

.cat-chip.on {
  background: #EEF5FF;
  color: #2F7BFF;
  border-color: #2F7BFF;
  font-weight: 600;
}

.fixed-sheet {
  max-height: 84dvh;
  overflow-y: auto;
}

.sh-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.sh-head .sh-title {
  margin-bottom: 0;
}

.sh-sub-val {
  font-size: 12px;
  font-weight: 600;
  color: #2F7BFF;
}

.fixed-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.fixed-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fixed-name {
  flex: 1.3;
  min-width: 0;
}

.fixed-amt {
  flex: 1;
  min-width: 0;
  text-align: right;
}

.fixed-prorate-box {
  margin: 10px 0 8px;
  padding: 8px 10px;
  background: #F8FAFF;
  border-radius: 9px;
  border: 1px solid #E6EEF9;
}

.fixed-prorate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fixed-prorate-row .seg-item.wide {
  width: 96px;
  font-size: 12px;
}

.fixed-hint {
  font-size: 11px;
  color: #7A869A;
  margin-top: 6px;
  line-height: 1.4;
}

/* ---- Tab 4: Settings ---- */
.settings-page {
  overflow-y: auto;
  padding: 14px;
}

.card {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(47, 123, 255, 0.08);
}

.ct {
  font-size: 16px;
  font-weight: 700;
  color: #1F2A44;
  margin-bottom: 4px;
}

.hint {
  font-size: 11px;
  color: #7A869A;
  line-height: 1.5;
  margin-bottom: 6px;
}

.cur {
  font-size: 12px;
  color: #2F7BFF;
  background: #F0F6FF;
  border-radius: 6px;
  padding: 5px 8px;
  margin-bottom: 10px;
}

.sf {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.fk {
  width: 98px;
  flex: none;
  font-size: 13px;
  color: #7A869A;
}

.fi {
  flex: 1;
  min-width: 0;
  height: 38px;
  background: #F5F8FC;
  border: 1px solid #E3EAF5;
  border-radius: 8px;
  padding: 0 10px;
  color: #1F2A44;
  font-size: 14px;
  outline: none;
}

.fi:focus {
  border-color: #2F7BFF;
  background: #FFFFFF;
}

.err-box {
  color: #E5484D;
  background: #FFF1F1;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
  margin-bottom: 8px;
}

.btn-main-full {
  width: 100%;
  height: 42px;
  font-size: 14px;
  border-radius: 9px;
  background: linear-gradient(135deg, #4C8DFF, #2F7BFF);
  color: #fff;
  font-weight: 600;
  margin-top: 4px;
  box-shadow: 0 4px 10px rgba(47, 123, 255, 0.25);
}

.btn-main-full:disabled {
  opacity: 0.55;
}

.logout-btn {
  width: 100%;
  height: 42px;
  font-size: 14px;
  border-radius: 9px;
  background: #FFFFFF;
  color: #E5484D;
  font-weight: 600;
  margin-top: 4px;
  box-shadow: 0 4px 12px rgba(47, 123, 255, 0.08);
}

/* ---- Bottom Sheet & Modals & Toast ---- */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(31, 42, 68, 0.35);
  z-index: 20;
}

.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: 100%;
  max-width: 480px;
  z-index: 21;
  background: #FFFFFF;
  border-radius: 14px 14px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 18px rgba(31, 42, 68, 0.14);
  transform: translate(-50%, 110%);
  transition: transform 0.22s ease;
}

.sheet.show {
  transform: translate(-50%, 0);
}

.sh-title {
  font-size: 16px;
  font-weight: 700;
  color: #1F2A44;
  margin-bottom: 10px;
}

.sh-btns {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.b-ghost, .b-main {
  flex: 1;
  height: 42px;
  font-size: 15px;
  border-radius: 8px;
}

.b-ghost {
  background: transparent;
  color: #7A869A;
  border: 1px solid #E3EAF5;
}

.b-main {
  background: linear-gradient(135deg, #4C8DFF, #2F7BFF);
  color: #fff;
  font-weight: 700;
}

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(31, 42, 68, 0.42);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  width: 100%;
  max-width: 320px;
  background: #FFFFFF;
  border-radius: 14px;
  padding: 18px 16px 14px;
  box-shadow: 0 12px 30px rgba(31, 42, 68, 0.2);
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #1F2A44;
  text-align: center;
  margin-bottom: 8px;
}

.modal-body {
  font-size: 13px;
  color: #5A667A;
  text-align: center;
  line-height: 1.5;
  white-space: pre-line;
  margin-bottom: 14px;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-actions.row-actions {
  flex-direction: row;
}

.modal-btn {
  flex: 1;
  height: 40px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  background: #F5F8FC;
  color: #1F2A44;
}

.modal-btn.primary {
  background: #2F7BFF;
  color: #FFFFFF;
}

.modal-btn.danger {
  background: #FFF1F1;
  color: #E5484D;
}

.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 40;
  background: rgba(31, 42, 68, 0.88);
  color: #FFFFFF;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  max-width: 80vw;
  text-align: center;
  pointer-events: none;
}
