/* ============================================================
   PassionBits Mobile Invoicing — Component Library
   Shared across V1 (canvas), V2 (wizard), V3 (hub).
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: var(--pb-font);
  background: #ECECEC;
  color: var(--pb-navy);
  -webkit-font-smoothing: antialiased;
  display: flex; align-items: flex-start; justify-content: center;
  gap: 40px; flex-wrap: wrap;
  padding: 40px 20px;
}

/* ---------- Phone frame ---------- */
.phone {
  width: var(--pb-screen-w);
  height: var(--pb-screen-h);
  background: var(--pb-white);
  border-radius: 44px;
  box-shadow: 0 30px 80px rgba(0,0,0,.22), 0 0 0 11px #11131a, 0 0 0 13px #2a2d39;
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.phone__notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 150px; height: 30px; background: #11131a;
  border-radius: 0 0 18px 18px; z-index: 60;
}
.statusbar {
  height: 50px; flex: 0 0 50px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px 0 30px; font-size: 14px; font-weight: var(--pb-fw-semibold);
  color: var(--pb-navy); z-index: 50;
}
.statusbar__icons { display: flex; gap: 6px; align-items: center; }
.statusbar__icons svg { display: block; }

/* ---------- App header ---------- */
.appbar {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 6px 18px 14px;
  background: var(--pb-white);
  position: relative; z-index: 40;
}
.appbar__back {
  width: 38px; height: 38px; border-radius: var(--pb-r-pill);
  background: var(--pb-cream); border: none;
  display: grid; place-items: center; cursor: pointer; color: var(--pb-navy);
}
.appbar__title { font-size: 19px; font-weight: var(--pb-fw-semibold); }
.appbar__sub { font-size: 12px; color: var(--pb-label); font-weight: var(--pb-fw-medium); }
.appbar__spacer { flex: 1; }
.invoice-chip {
  background: var(--pb-peach); color: var(--pb-orange);
  font-size: 12px; font-weight: var(--pb-fw-semibold);
  padding: 6px 11px; border-radius: var(--pb-r-pill);
}

/* ---------- App container (router mounts here) ---------- */
/* #app must be a flex column that fills the phone so the inner .screen can scroll.
   Without flex:1 + min-height:0 the screen grows to content height and overflow is clipped. */
#app { flex: 1 1 auto; min-height: 0; width: 100%; display: flex; flex-direction: column; }

/* ---------- Scroll area ---------- */
.screen { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
.screen::-webkit-scrollbar { width: 0; }
.screen__pad { padding: 4px 18px 150px; display: flex; flex-direction: column; gap: 18px; }

/* group label (small caps section header used in adjustments etc.) */
.grouplabel { font-size: 11px; font-weight: var(--pb-fw-bold); letter-spacing: .07em; text-transform: uppercase;
  color: var(--pb-label); margin: 18px 2px 8px; }
.grouplabel:first-child { margin-top: 4px; }

/* ---------- Section ---------- */
.section { display: flex; flex-direction: column; gap: 12px; }
.section__head { display: flex; align-items: center; gap: 8px; }
.section__title { font-size: 20px; font-weight: var(--pb-fw-bold); color: var(--pb-navy); letter-spacing: -0.01em; }
.section__title .num {
  display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px;
  background: var(--pb-orange); color: #fff; border-radius: var(--pb-r-pill);
  font-size: 12px; font-weight: var(--pb-fw-bold); vertical-align: middle;
}
.section__check { margin-left: auto; color: var(--pb-success); display: none; }
.section.is-done .section__check { display: block; }

/* ---------- Field ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: var(--pb-fs-label); font-weight: var(--pb-fw-medium); color: var(--pb-label); }
.field__label .req { color: var(--pb-orange); }
.input, .textarea {
  width: 100%; background: var(--pb-white); border: 1.5px solid var(--pb-line);
  border-radius: var(--pb-r-md); padding: 13px 14px;
  font-family: var(--pb-font); font-size: var(--pb-fs-body); font-weight: var(--pb-fw-medium);
  color: var(--pb-navy); outline: none; transition: border-color .15s, background .15s;
}
.input::placeholder, .textarea::placeholder { color: var(--pb-placeholder); font-weight: var(--pb-fw-medium); }
.input:focus, .textarea:focus { border-color: var(--pb-orange); background: #fff; box-shadow: 0 0 0 3px var(--pb-orange-soft); }
/* kill native number spinners (overlapped the currency control) */
.input[type=number]::-webkit-outer-spin-button,
.input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.textarea { resize: none; min-height: 76px; }
.input--with-icon { position: relative; }
.input--with-icon .input { padding-right: 42px; }
.input--with-icon .ic { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--pb-label); pointer-events: none; }
.field-row { display: flex; gap: 12px; }
.field-row > .field { flex: 1; }

/* select-like (tappable) */
.select {
  width: 100%; background: var(--pb-white); border: 1.5px solid var(--pb-line);
  border-radius: var(--pb-r-md); padding: 13px 14px;
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  font-size: var(--pb-fs-body); font-weight: var(--pb-fw-medium); color: var(--pb-navy);
}
.select .placeholder { color: var(--pb-placeholder); }
.select .chev { margin-left: auto; color: var(--pb-label); }

/* ---------- Chips ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 8px 13px; border-radius: var(--pb-r-pill);
  background: var(--pb-cream); color: var(--pb-navy);
  font-size: 13px; font-weight: var(--pb-fw-medium); cursor: pointer;
  border: 1.5px solid transparent; transition: all .15s; white-space: nowrap;
}
.chip.is-active { background: var(--pb-orange); color: #fff; border-color: var(--pb-orange); }
.chip--ghost { background: var(--pb-orange-soft); color: var(--pb-orange); }

/* ---------- Cards ---------- */
.card {
  background: var(--pb-white); border: 1px solid var(--pb-line); border-radius: var(--pb-r-lg);
  padding: 16px; position: relative;
}
.card--peach { background: var(--pb-peach); border-color: transparent; }

/* Bill card */
.billcard { background: var(--pb-white); border: 1px solid var(--pb-line); border-radius: var(--pb-r-lg); padding: 15px 16px; position: relative; }
.billcard__role { font-size: var(--pb-fs-label); font-weight: var(--pb-fw-semibold); color: var(--pb-orange); margin-bottom: 8px; letter-spacing:.02em; }
.billcard__name { font-size: var(--pb-fs-body); font-weight: var(--pb-fw-semibold); color: var(--pb-navy); margin-bottom: 4px; }
.billcard__line { font-size: 13px; color: var(--pb-navy-60); line-height: 1.5; }
.billcard__edit {
  position: absolute; top: 12px; right: 12px; width: 30px; height: 30px;
  border-radius: var(--pb-r-pill); background: var(--pb-cream); border: none; cursor: pointer;
  display: grid; place-items: center; color: var(--pb-label);
}

/* Line item card */
.item {
  background: var(--pb-white); border-radius: var(--pb-r-md);
  padding: 14px; display: flex; align-items: center; gap: 12px; cursor: pointer;
  border: 1.5px solid var(--pb-line); transition: border-color .15s;
}
.item:active { border-color: var(--pb-orange); }
.item__body { flex: 1; min-width: 0; }
.item__name { font-size: var(--pb-fs-body); font-weight: var(--pb-fw-semibold); color: var(--pb-navy); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item__meta { font-size: 12.5px; color: var(--pb-navy-60); font-weight: var(--pb-fw-medium); }
.item__meta .dot { opacity: .5; margin: 0 5px; }
.item__amt { font-size: var(--pb-fs-body); font-weight: var(--pb-fw-bold); color: var(--pb-navy); white-space: nowrap; }
.item__chev { color: var(--pb-placeholder); flex: 0 0 auto; }

.add-row { display: flex; align-items: center; gap: 12px; }
.add-item {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--pb-orange-soft); color: var(--pb-orange); border: 1.5px dashed #FFC4AC;
  border-radius: var(--pb-r-md); padding: 13px; font-size: 14px; font-weight: var(--pb-fw-semibold);
  cursor: pointer;
}
.add-item--link { flex: 0 0 auto; background: transparent; border: none; color: var(--pb-label); font-weight: var(--pb-fw-medium); }

/* ---------- Toggle rows ---------- */
.toggle-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 2px; cursor: pointer;
}
.toggle-row__text { flex: 1; }
.toggle-row__title { font-size: 14.5px; font-weight: var(--pb-fw-medium); color: var(--pb-navy); }
.toggle-row__hint { font-size: 12px; color: var(--pb-navy-60); margin-top: 2px; }

/* checkbox */
.check {
  width: 24px; height: 24px; border-radius: 7px; flex: 0 0 auto;
  border: 2px solid #CFCFCF; background: #fff; display: grid; place-items: center;
  cursor: pointer; transition: all .15s; color: #fff;
}
.check svg { opacity: 0; transform: scale(.6); transition: all .15s; }
.check.is-on { background: var(--pb-orange); border-color: var(--pb-orange); }
.check.is-on svg { opacity: 1; transform: scale(1); }

/* switch */
.switch { width: 44px; height: 26px; border-radius: var(--pb-r-pill); background: #CFCFCF; position: relative; flex: 0 0 auto; cursor: pointer; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch.is-on { background: var(--pb-orange); }
.switch.is-on::after { transform: translateX(18px); }

/* ---------- Summary ---------- */
.summary { background: var(--pb-peach); border-radius: var(--pb-r-lg); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.summary__row { display: flex; justify-content: space-between; font-size: 14px; color: var(--pb-navy-60); font-weight: var(--pb-fw-medium); }
.summary__row .v { color: var(--pb-navy); }
.summary__row--muted .v { color: var(--pb-success); }
.summary__divide { height: 1px; background: var(--pb-line); margin: 2px 0; }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; }
.summary__total .l { font-size: 15px; font-weight: var(--pb-fw-semibold); color: var(--pb-navy); }
.summary__total .r { font-size: 24px; font-weight: var(--pb-fw-bold); color: var(--pb-navy); }
.summary__gst { font-size: 11px; color: var(--pb-navy-60); text-align: right; margin-top: -4px; }
.summary__total--receive .l { color: var(--pb-success); }
.summary__total--receive .r { color: var(--pb-success); font-size: 20px; }

/* ---------- Buttons ---------- */
.btn {
  width: 100%; border: none; border-radius: var(--pb-r-md); padding: 16px;
  font-family: var(--pb-font); font-size: 16px; font-weight: var(--pb-fw-semibold);
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .08s, filter .15s;
}
.btn:active { transform: scale(.985); }
.btn--primary { background: var(--pb-orange); color: #fff; box-shadow: var(--pb-shadow-fab); }
.btn--ghost { background: var(--pb-cream); color: var(--pb-navy); }
.btn--block-secondary { background: var(--pb-cream); color: var(--pb-navy); box-shadow: none; }

/* pill button (e.g. "+ New invoice" on the list header) */
.btn-pill { display: inline-flex; align-items: center; gap: 7px; background: var(--pb-navy); color: #fff;
  border: none; border-radius: var(--pb-r-pill); padding: 11px 17px; font-family: var(--pb-font);
  font-size: 14px; font-weight: var(--pb-fw-semibold); cursor: pointer; transition: transform .08s, filter .15s; }
.btn-pill:active { transform: scale(.97); }
.btn-pill--accent { background: var(--pb-orange); box-shadow: var(--pb-shadow-fab); }

/* ---------- Sticky footer ---------- */
.footer {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 45;
  background: linear-gradient(to top, #fff 72%, rgba(255,255,255,0));
  padding: 16px 18px 22px; display: flex; flex-direction: column; gap: 10px;
}
.footer__mini { display: flex; align-items: baseline; justify-content: space-between; padding: 0 4px; }
.footer__mini .l { font-size: 13px; color: var(--pb-navy-60); font-weight: var(--pb-fw-medium); }
.footer__mini .r { font-size: 20px; font-weight: var(--pb-fw-bold); color: var(--pb-navy); }

/* ---------- Bottom sheet ---------- */
.scrim {
  position: absolute; inset: 0; background: rgba(0,0,0,.45); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 70;
}
.scrim.is-open { opacity: 1; pointer-events: auto; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 80;
  background: #fff; border-radius: 26px 26px 0 0;
  box-shadow: var(--pb-shadow-sheet);
  transform: translateY(100%); transition: transform .3s cubic-bezier(.22,.61,.36,1);
  max-height: 88%; display: flex; flex-direction: column;
}
.sheet.is-open { transform: translateY(0); }
.sheet__grab { width: 40px; height: 5px; border-radius: 3px; background: #DADADA; margin: 12px auto 4px; flex: 0 0 auto; }
.sheet__head { display: flex; align-items: center; padding: 8px 20px 12px; gap: 10px; flex: 0 0 auto; }
.sheet__title { font-size: 18px; font-weight: var(--pb-fw-semibold); }
.sheet__close { margin-left: auto; width: 32px; height: 32px; border-radius: var(--pb-r-pill); background: var(--pb-cream); border: none; display: grid; place-items: center; cursor: pointer; color: var(--pb-navy); }
.sheet__body { padding: 4px 20px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.sheet__body::-webkit-scrollbar { width: 0; }
.sheet__foot { padding: 12px 20px 22px; flex: 0 0 auto; border-top: 1px solid var(--pb-line); display:flex; gap:10px; }
.sheet__foot .btn { flex: 1; }

/* list rows (client picker / tax / actions) */
.listrow {
  display: flex; align-items: center; gap: 12px; padding: 14px 12px; border-radius: var(--pb-r-md);
  cursor: pointer; transition: background .12s;
}
.listrow:active { background: var(--pb-cream); }
.listrow.is-selected { background: var(--pb-orange-soft); }
.listrow__avatar { width: 40px; height: 40px; border-radius: var(--pb-r-pill); background: var(--pb-peach); color: var(--pb-orange); display: grid; place-items: center; font-weight: var(--pb-fw-bold); font-size: 15px; flex: 0 0 auto; }
.listrow__body { flex: 1; min-width: 0; }
.listrow__title { font-size: 15px; font-weight: var(--pb-fw-semibold); color: var(--pb-navy); }
.listrow__sub { font-size: 12.5px; color: var(--pb-navy-60); }
.listrow__right { color: var(--pb-label); font-weight: var(--pb-fw-semibold); font-size: 14px; }
.listrow--add { color: var(--pb-orange); }
.listrow--add .listrow__avatar { background: var(--pb-orange-soft); color: var(--pb-orange); }
.listrow--danger .listrow__title { color: #d63b1f; }

.divider { height: 1px; background: var(--pb-line); margin: 2px 0; }

/* status — quiet dot + text, no filled chip (Substack/Remote pattern) */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: var(--pb-fw-semibold); background: none; padding: 0; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.badge--paid { color: var(--pb-success); }
.badge--sent { color: var(--pb-warn); }
.badge--draft { color: var(--pb-label); }

/* activity timeline (invoice detail) */
.timeline { display: flex; flex-direction: column; }
.tl-row { display: flex; gap: 12px; }
.tl-node { display: flex; flex-direction: column; align-items: center; flex: 0 0 20px; }
.tl-dot { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
  border: 2px solid var(--pb-line); background: #fff; color: #fff; }
.tl-dot--done { background: var(--pb-success); border-color: var(--pb-success); }
.tl-dot--current { border-color: var(--pb-orange); background: var(--pb-orange-soft); box-shadow: 0 0 0 4px var(--pb-orange-soft); }
.tl-stem { width: 2px; flex: 1 1 auto; background: var(--pb-line); margin: 3px 0; min-height: 16px; }
.tl-row:last-child .tl-stem { display: none; }
.tl-body { padding-bottom: 18px; }
.tl-row:last-child .tl-body { padding-bottom: 0; }
.tl-title { font-size: 14px; font-weight: var(--pb-fw-semibold); color: var(--pb-navy); }
.tl-title--pending { color: var(--pb-placeholder); font-weight: var(--pb-fw-medium); }
.tl-date { font-size: 12px; color: var(--pb-navy-60); margin-top: 1px; }

/* segmented control — strong active state (Brex/OpenTable pattern) */
.seg { display: flex; background: var(--pb-cream); border-radius: var(--pb-r-md); padding: 4px; gap: 4px; }
.seg__btn { flex: 1; text-align: center; padding: 11px 9px; border-radius: 9px; font-size: 14px; font-weight: var(--pb-fw-semibold); color: var(--pb-label); cursor: pointer; border: none; background: transparent; transition: all .15s; }
.seg__btn.is-active { background: var(--pb-navy); color: #fff; }   /* filled ink — clearly the selected one */

/* toast */
.toast {
  position: absolute; bottom: 110px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--pb-navy); color: #fff; padding: 12px 18px; border-radius: var(--pb-r-pill);
  font-size: 13px; font-weight: var(--pb-fw-medium); opacity: 0; transition: all .25s; z-index: 90; white-space: nowrap;
}
.toast.is-open { opacity: 1; transform: translateX(-50%) translateY(0); }

/* helper text */
.hint { font-size: 12px; color: var(--pb-navy-60); line-height: 1.5; }
.amount-pill { font-size: 13px; font-weight: var(--pb-fw-semibold); color: var(--pb-navy); background: #fff; padding: 6px 12px; border-radius: var(--pb-r-pill); }

/* progress (wizard) */
.steps { display: flex; align-items: center; gap: 6px; padding: 0 18px 10px; }
.steps__dot { flex: 1; height: 5px; border-radius: 3px; background: var(--pb-cream); transition: background .2s; }
.steps__dot.is-done { background: var(--pb-orange); }
.steps__label { font-size: 12px; color: var(--pb-label); font-weight: var(--pb-fw-medium); padding: 0 18px 8px; }

/* hub card */
.hubcard {
  background: var(--pb-cream); border-radius: var(--pb-r-lg); padding: 16px;
  display: flex; align-items: center; gap: 14px; cursor: pointer; border: 1.5px solid transparent;
}
.hubcard:active { border-color: var(--pb-orange); }
.hubcard__icon { width: 44px; height: 44px; border-radius: var(--pb-r-md); background: #fff; display: grid; place-items: center; color: var(--pb-orange); flex: 0 0 auto; }
.hubcard__body { flex: 1; min-width: 0; }
.hubcard__title { font-size: 15px; font-weight: var(--pb-fw-semibold); color: var(--pb-navy); }
.hubcard__sub { font-size: 12.5px; color: var(--pb-navy-60); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hubcard__state { flex: 0 0 auto; color: var(--pb-placeholder); display: flex; align-items: center; gap: 8px; }
.hubcard.is-done .hubcard__state { color: var(--pb-success); }

/* qty stepper (− 1 +) */
.stepper { display: flex; align-items: center; background: var(--pb-cream); border-radius: var(--pb-r-md); border: 1.5px solid transparent; overflow: hidden; }
.stepper__btn { width: 46px; height: 48px; border: none; background: transparent; color: var(--pb-orange); font-size: 22px; font-weight: var(--pb-fw-semibold); cursor: pointer; display: grid; place-items: center; }
.stepper__btn:active { background: var(--pb-orange-soft); }
.stepper__val { flex: 1; text-align: center; border: none; background: transparent; font-family: var(--pb-font); font-size: var(--pb-fs-body); font-weight: var(--pb-fw-semibold); color: var(--pb-navy); outline: none; width: 100%; }

/* prominent line-total block (Jobber) */
.linetotal { background: var(--pb-peach); border-radius: var(--pb-r-md); padding: 16px; display: flex; align-items: baseline; justify-content: space-between; }
.linetotal .l { font-size: 15px; font-weight: var(--pb-fw-semibold); color: var(--pb-navy); }
.linetotal .r { font-size: 22px; font-weight: var(--pb-fw-bold); color: var(--pb-navy); }

/* address autocomplete (Squarespace) */
.ac { position: relative; }
.ac__list { margin-top: 6px; border-radius: var(--pb-r-md); overflow: hidden; border: 1px solid var(--pb-line); }
.ac__opt { padding: 13px 14px; font-size: 14px; color: var(--pb-navy); cursor: pointer; border-bottom: 1px solid var(--pb-line); display:flex; gap:10px; align-items:center; }
.ac__opt:last-child { border-bottom: none; }
.ac__opt:active { background: var(--pb-cream); }
.ac__opt .muted { color: var(--pb-navy-60); }
.ac__powered { font-size: 11px; color: var(--pb-navy-60); padding: 8px 4px 0; }

/* progressive add-rows (Jobber add-client) */
.addrow {
  display: flex; align-items: center; gap: 12px; padding: 14px 4px; cursor: pointer;
  border-top: 1px solid var(--pb-line); color: var(--pb-orange); font-weight: var(--pb-fw-semibold); font-size: 14px;
}
.addrow .ic { width: 30px; height: 30px; border-radius: var(--pb-r-pill); background: var(--pb-orange-soft); display: grid; place-items: center; flex: 0 0 auto; }
.addrow--contacts { color: var(--pb-navy); border-top: none; }
.addrow--contacts .ic { background: var(--pb-peach); color: var(--pb-orange); }

/* send options — WhatsApp + Email equal primary */
.send-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.send-btn { border: none; border-radius: var(--pb-r-md); padding: 18px 12px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; font-family: var(--pb-font); font-size: 14px; font-weight: var(--pb-fw-semibold); transition: transform .08s; }
.send-btn:active { transform: scale(.97); }
.send-btn--wa { background: #25D366; color: #fff; }
.send-btn--email { background: var(--pb-navy); color: #fff; }
.send-btn__ic { width: 34px; height: 34px; }
.send-secondary { display: flex; gap: 12px; }
.send-secondary .btn { flex: 1; }

/* persistent cost + preview bar */
.costbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 45;
  background: #fff; border-top: 1px solid var(--pb-line);
  box-shadow: 0 -6px 24px rgba(0,0,0,.08);
  padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 6px));
  display: flex; align-items: center; gap: 14px;
  transform: translateY(110%); transition: transform .32s cubic-bezier(.22,.61,.36,1);
}
.costbar.is-revealed { transform: translateY(0); }
.costbar__total .k { font-size: 12px; color: var(--pb-navy-60); font-weight: var(--pb-fw-medium); }
.costbar__total .v { font-size: 21px; font-weight: var(--pb-fw-bold); color: var(--pb-navy); }
.costbar__total .sub { font-size: 11px; color: var(--pb-navy-60); }
.costbar__btn { margin-left: auto; background: var(--pb-orange); color: #fff; border: none; border-radius: var(--pb-r-md); padding: 14px 22px; font-family: var(--pb-font); font-size: 15px; font-weight: var(--pb-fw-semibold); cursor: pointer; display: flex; align-items: center; gap: 8px; box-shadow: var(--pb-shadow-fab); }
.costbar__btn:active { transform: scale(.97); }

/* hint bar before reveal */
.fillhint { position: absolute; left: 0; right: 0; bottom: 0; z-index: 44; text-align: center; padding: 14px; font-size: 13px; color: var(--pb-navy-60); background: linear-gradient(to top,#fff 70%,rgba(255,255,255,0)); font-weight: var(--pb-fw-medium); }

/* invoice detail + list */
.detail-amount { font-size: 30px; font-weight: var(--pb-fw-bold); color: var(--pb-navy); }
.kv { display: flex; justify-content: space-between; padding: 13px 0; font-size: 14px; border-bottom: 1px solid var(--pb-line); }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--pb-navy-60); font-weight: var(--pb-fw-medium); }
.kv .v { color: var(--pb-navy); font-weight: var(--pb-fw-semibold); }
.invrow { display: flex; align-items: center; gap: 13px; padding: 14px 4px; cursor: pointer; border-bottom: 1px solid var(--pb-line); }
.invrow__ic { width: 42px; height: 42px; border-radius: 11px; background: var(--pb-peach); color: var(--pb-orange); display: grid; place-items: center; flex: 0 0 auto; }
.invrow__b { flex: 1; min-width: 0; }
.invrow__t { font-size: 15px; font-weight: var(--pb-fw-semibold); color: var(--pb-navy); }
.invrow__s { font-size: 12.5px; color: var(--pb-navy-60); }
.invrow__amt { font-size: 15px; font-weight: var(--pb-fw-bold); color: var(--pb-navy); }
.list-section { font-size: 13px; font-weight: var(--pb-fw-semibold); color: var(--pb-navy-60); margin: 18px 0 2px; letter-spacing: .02em; }

/* accordion (V4 progressive collapse) */
.progress { height: 6px; background: var(--pb-cream); border-radius: 3px; margin: 0 18px 2px; overflow: hidden; }
.progress__fill { height: 100%; background: var(--pb-success); border-radius: 3px; transition: width .4s cubic-bezier(.22,.61,.36,1); }
.progress-label { font-size: 12px; color: var(--pb-label); font-weight: var(--pb-fw-medium); padding: 6px 18px 8px; display:flex; justify-content:space-between; }
.acc { display: flex; flex-direction: column; gap: 12px; }
.acc__item { background: #fff; border: 1.5px solid var(--pb-line); border-radius: 16px; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.acc__item.is-open { border-color: #D0D0D0; box-shadow: none; }
.acc__head { display: flex; align-items: center; gap: 12px; padding: 15px 16px; cursor: pointer; }
.acc__num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: var(--pb-fw-bold); flex: 0 0 auto; background: var(--pb-cream); color: var(--pb-label); transition: all .2s; }
.acc__item.is-open .acc__num { background: var(--pb-orange); color: #fff; }
.acc__item.is-done .acc__num { background: var(--pb-success); color: #fff; }
.acc__t { flex: 1; min-width: 0; }
.acc__title { font-size: 15.5px; font-weight: var(--pb-fw-semibold); color: var(--pb-navy); }
.acc__summary { font-size: 12.5px; color: var(--pb-navy-60); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc__summary.todo { color: var(--pb-placeholder); }
.acc__chev { color: var(--pb-placeholder); transition: transform .25s; flex: 0 0 auto; }
.acc__item.is-open .acc__chev { transform: rotate(90deg); color: var(--pb-orange); }
.acc__body { padding: 2px 16px 16px; display: flex; flex-direction: column; gap: 12px; animation: accIn .25s ease; }
@keyframes accIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* success */
.success { text-align: center; padding: 30px 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.success__circle { width: 84px; height: 84px; border-radius: 50%; background: #e3f5ec; color: var(--pb-success); display: grid; place-items: center; }
.success__title { font-size: 22px; font-weight: var(--pb-fw-bold); color: var(--pb-navy); }
.success__sub { font-size: 14px; color: var(--pb-navy-60); line-height: 1.5; }
