@import url("/_shared/layout.css");
.grow { flex: 1 1 200px; }
.group-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 16px 18px; margin-bottom: 8px; }
.group-bar .field { min-width: 150px; }
.group-bar #group-name { font: 700 20px/1.2 var(--display) !important; }
.gb-actions { display: flex; gap: 6px; padding-bottom: 4px; }
.people { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.person { display: inline-flex; align-items: center; gap: 4px; padding: 6px 6px 6px 8px; border-radius: 999px; background: var(--soft); color: var(--brand); font-weight: 650; }
.person .av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 700; }
.person button { width: 26px; height: 26px; border-radius: 50%; border: 0; background: transparent; color: var(--brand); cursor: pointer; font-size: 16px; line-height: 1; }
.person button:hover { background: #fff; }
.add-person { gap: 8px; }
.exp-form { display: grid; gap: 14px; padding: 20px; }
.amt-row { display: flex; gap: 12px; flex-wrap: wrap; }
.amt-row .field:last-child { width: 150px; }
.amt-input { font: 750 28px/1 var(--display) !important; min-height: 58px !important; }
.split-rows { display: grid; gap: 6px; }
.split-row { display: grid; grid-template-columns: 1fr 130px 110px; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--r); background: var(--paper); }
.split-row .who { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; min-width: 0; }
.split-row .who input { width: 20px; height: 20px; accent-color: var(--c2); flex: none; }
.split-row .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.split-row .val { position: relative; }
.split-row .val input { width: 100%; min-height: 40px; padding: 8px 40px 8px 10px; border-radius: 10px; border: 1.5px solid var(--line-2); font-size: 15px; }
.split-row .val input:focus { outline: none; border-color: var(--c2); }
.split-row .val .unit { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 12.5px; color: var(--muted); font-weight: 600; }
.split-row .echo { text-align: right; font-size: 13.5px; color: var(--brand); font-weight: 600; font-variant-numeric: tabular-nums; }
.rate-row { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.rate-row input { width: 140px; min-height: 42px; padding: 8px 12px; border-radius: 10px; border: 1.5px solid var(--line-2); }
.list-h { font-size: 20px; margin: 28px 0 12px; }
.exp-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.exp-item { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 16px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); }
.exp-item .desc { font-weight: 650; overflow-wrap: anywhere; }
.exp-item .meta { font-size: 13px; color: var(--muted); }
.exp-item .amount { font: 700 18px/1.2 var(--display); text-align: right; white-space: nowrap; }
.exp-item .converted { display: block; font: 500 12.5px/1.4 var(--body); color: var(--muted); }
.exp-item .exp-actions { grid-column: 1 / -1; display: flex; gap: 4px; justify-content: flex-end; margin-top: 2px; }
.exp-item.flag { border-color: #fecaca; background: #fff7f7; }
.exp-item.fresh { animation: rise .45s var(--ease); }
.settle-card { padding: 22px; }
.settle-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.settle-list li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 14px; border-radius: var(--r-lg); background: var(--soft); }
.settle-list .from, .settle-list .to { font-weight: 700; }
.settle-list .arrow { color: var(--brand); font-size: 13px; font-weight: 600; text-align: center; }
.settle-list .s-amt { grid-column: 1 / -1; font: 800 28px/1 var(--display); color: var(--brand); letter-spacing: -0.02em; }
.settle-card.pop .settle-list li { animation: rise .45s var(--ease) both; }
.settle-card.pop .settle-list li:nth-child(2) { animation-delay: .06s; } .settle-card.pop .settle-list li:nth-child(3) { animation-delay: .12s; }
.all-square { text-align: center; padding: 10px 0; }
.all-square .big { font-size: 40px; }
.bal-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.bal-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 14.5px; }
.bal-row .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bal-row .amt { font-variant-numeric: tabular-nums; font-weight: 600; }
.bal-row .amt.pos { color: var(--ok); } .bal-row .amt.neg { color: var(--bad); } .bal-row .amt.zero { color: var(--muted); }
.bal-bar { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; height: 8px; border-radius: 999px; background: var(--field); overflow: hidden; }
.bal-bar .half { display: flex; }
.bal-bar .half.neg { justify-content: flex-end; }
.bal-bar .fill { height: 100%; border-radius: 999px; transition: width .4s var(--ease); }
.bal-bar .neg .fill { background: #fb7185; } .bal-bar .pos .fill { background: #34d399; }
.dlg { border: 0; border-radius: var(--r-xl); padding: 28px; max-width: min(460px, calc(100vw - 32px)); box-shadow: var(--shadow-3); }
.dlg::backdrop { background: rgba(22, 20, 31, .4); backdrop-filter: blur(4px); }
.print-sheet { display: none; }
@media (max-width: 640px) {
  .group-bar .field { min-width: 0; flex: 1 1 140px; }
  .split-row { grid-template-columns: 1fr 110px; }
  .split-row .echo { grid-column: 1 / -1; text-align: left; padding-left: 30px; }
  .split-row .echo:empty { display: none; }
  .amt-row .field:last-child { width: 120px; }
}
@media print {
  body > *:not(main), main > *:not(.app), .app > *:not(.print-sheet) { display: none !important; }
  .print-sheet { display: block !important; font: 12pt/1.5 var(--body); }
  .print-sheet .ph1 { font: 700 24pt/1.1 var(--display); margin-bottom: 4pt; } .print-sheet h2 { font-size: 15pt; margin: 18pt 0 6pt; }
  .print-sheet table { width: 100%; border-collapse: collapse; } .print-sheet td { padding: 4pt 0; border-bottom: 1px solid #ddd; }
  .print-sheet .num { text-align: right; } .print-sheet .print-footer { margin-top: 24pt; color: #555; font-size: 10pt; }
}
