/* Block J4 P4: the libreta screen (who owes whom), on the account screens' styles */
.lib .center { text-align: center; }
.lib .totals { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lib .tot { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.lib .tot b { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.lib .pos { color: #9fe3b1; } .lib .neg { color: #ffb0bc; } .lib .zero { color: var(--smoke); }
.lib .tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 0 14px; }
.lib .tab { min-height: 44px; border-radius: 12px; border: 1px solid var(--line-soft); background: rgba(7, 8, 15, .45); color: var(--smoke); font-weight: 600; font-size: .9375rem; }
.lib .tab[aria-selected="true"] { border-color: var(--gold); color: var(--gold); background: linear-gradient(rgba(232, 196, 118, .12), rgba(232, 196, 118, .12)), rgba(7, 8, 15, .85); }
.lib .label.section.first { margin-top: 0; }
.lib .rows, .lib .hist { list-style: none; margin: 0; padding: 0; }
.lib .rows li { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; min-height: 56px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.lib .rows li:last-child { border-bottom: 0; }
.lib .rows button.rowbtn { display: contents; color: inherit; font: inherit; background: none; border: 0; text-align: left; }
.lib .rows .who b { display: block; font-size: 1rem; color: var(--ivory); } .lib .rows .who span { color: var(--smoke); font-size: .8125rem; }
.lib .rows .amt { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 1.05rem; text-align: right; }
.lib .avatar { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: rgba(7, 8, 15, .6) center/cover no-repeat; display: inline-flex; align-items: center; justify-content: center; color: var(--gold); font-weight: 700; font-family: var(--display); font-size: 1.1rem; flex: 0 0 44px; }
.lib .empty { margin: 8px 0 0; line-height: 1.5; }
.lib .back { min-height: 44px; padding: 0 12px 0 0; border: 0; background: none; color: var(--gold); font-weight: 600; font-size: 1rem; }
.lib .d-head { display: flex; gap: 12px; align-items: center; margin: 6px 0 12px; } .lib .d-head .muted { margin: 2px 0 0; }
.lib .d-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 12px; }
.lib .d-actions .btn { width: auto; flex: 1 1 140px; margin: 0; }
.lib .hist li { padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: .9375rem; line-height: 1.45; }
.lib .hist li:last-child { border-bottom: 0; }
.lib .hist .when { display: block; color: var(--smoke); font-size: .8125rem; }
.lib .hist .line { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.lib .hist .line b.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lib .hist .void { text-decoration: line-through; opacity: .7; }
.lib .hist .tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--gold); font-size: .6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; vertical-align: middle; }
.lib .hist .tag.warn { color: #ffd7ad; border-color: rgba(255, 154, 60, .5); }
.lib .hist .small-btn { margin: 6px 6px 0 0; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ivory); font-size: .8125rem; }
.lib .hist .sub { display: block; color: var(--smoke); font-size: .8125rem; margin-top: 2px; }
.lib .filter { display: block; margin: 0 0 12px; } .lib .filter select { display: block; width: 100%; margin-top: 6px; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(7, 8, 15, .55); color: var(--ivory); font-size: 1rem; }
.lib .claim-actions { display: flex; gap: 8px; margin-top: 8px; }
.lib .claim-actions button { flex: 1; min-height: 40px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ivory); font-size: .875rem; font-weight: 600; }
.lib .claim-actions button.ok { border-color: var(--gold); color: var(--gold); }
.lib .rows li.claim { grid-template-columns: 44px 1fr; } .lib .rows li.claim .who { grid-column: 2; }
.lib .zero { color: #cfd3e0; }
.lib .tab { background: rgba(7, 8, 15, .8); color: #d8d2c8; }
.lib .d-head .muted { color: #d8d2c8; }
/* J4.4: public sheet, per-person totals, sort, embed mode */
.lib .public-note { background: rgba(7, 8, 15, .9); color: var(--ivory); } .lib .public-note a { color: var(--gold); font-weight: 600; }
.lib .all-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.lib .sort { display: flex; flex-direction: column; gap: 4px; } .lib .sort select { min-height: 44px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(7, 8, 15, .7); color: var(--ivory); font-size: .9375rem; }
.lib .plink { color: inherit; text-decoration: underline; text-decoration-color: rgba(232, 196, 118, .5); text-underline-offset: 3px; }
body.embed .lib .wordmark, body.embed .lib .foot, body.embed .bg { display: none; } body.embed { background: #0b0f2a; } body.embed .lib { padding-top: 8px; padding-bottom: 84px; }
/* block J4.7: same lift as /cuenta under the app bar; foot links never break inside */
.lib .tagline, .acct .tagline { color: #e6dfd2; text-shadow: 0 1px 4px rgba(0, 0, 0, .95), 0 0 12px rgba(0, 0, 0, .8); }
.lib .glass .label, .acct .glass .label { color: #b9bdd8; }
.foot a { white-space: nowrap; }
/* block J5.1: everybody settles with the banca. Big amounts always carry their words ("A pagar" / "A recibir" / "Al día") */
.lib .tabs.two { grid-template-columns: 1fr 1fr; }
.lib .rows .amt.big { font-size: 1.08rem; line-height: 1.25; max-width: 11.5rem; }
.lib .rows .amt.pos, .lib .d-amount.pos { color: #a8ecbb; } .lib .rows .amt.neg, .lib .d-amount.neg { color: #ffb8c3; } .lib .rows .amt.zero, .lib .d-amount.zero { color: #d8d2c8; }
.lib .me-box { margin-bottom: 12px; } .lib .me-box .rows li { border-bottom: 0; }
.lib .d-amount { margin: 0 0 12px; font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.lib .banca-box { margin-bottom: 12px; } .lib .banca-card + .banca-card { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.lib .banca-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.lib .banca-grid > div { display: flex; flex-direction: column; gap: 4px; } .lib .banca-grid b.num { font-size: 1.1rem; font-variant-numeric: tabular-nums; color: var(--ivory); } .lib .banca-grid b.num.pos { color: #a8ecbb; } .lib .banca-grid b.num.neg { color: #ffb8c3; }
.lib .cuadre { margin: 12px 0 0; font-size: .875rem; line-height: 1.45; } .lib .cuadre.ok { color: #a8ecbb; } .lib .cuadre.bad { color: #ffb8c3; font-weight: 700; }
.lib .between { margin: 6px 0 0; color: var(--ivory); }
@media (min-width: 1024px) { .lib .banca-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
