:root {
  color-scheme: dark;
  --bg: #0b1119;
  --surface: #121b27;
  --surface2: #192536;
  --surface3: #213147;
  --text: #f2f5fa;
  --muted: #a0afc2;
  --line: #293849;
  --accent: #8abbff;
  --accent-strong: #78adf7;
  --danger: #ffaaa1;
  --ok: #91dfb0;
  --warn: #edce87;
}
* { box-sizing: border-box; }
body {
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(ellipse at 12% 0, #142033 0, var(--bg) 52%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
main { width: min(1360px, calc(100% - 48px)); margin: 0 auto 48px; }
h1, h2, p { margin-top: 0; }
h1 { font-size: 1.32rem; line-height: 1.2; letter-spacing: -.025em; margin-bottom: 0; }
h2 { font-size: 1rem; line-height: 1.35; letter-spacing: -.012em; margin-bottom: 0; }
small, .muted { color: var(--muted); }
.eyebrow { margin: 0 0 4px; color: var(--muted); font-size: .7rem; font-weight: 650; letter-spacing: .16em; text-transform: uppercase; }
.card, .panel { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 12px 28px #00000012; }
label { display: grid; gap: 8px; color: #c2cdda; font-size: .84rem; font-weight: 550; }
input, select, button { min-height: 44px; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; font: inherit; }
input, select { width: 100%; min-width: 0; color: var(--text); background: #0e1621; }
input::placeholder { color: #8d9caf; opacity: 1; }
button { color: #0c1a2d; background: var(--accent); border-color: transparent; font-weight: 700; cursor: pointer; transition: background-color .15s, border-color .15s; }
button:hover:not(:disabled) { background: #a2caff; }
button:disabled { opacity: .5; cursor: default; }
button.secondary { color: #dce6f3; border-color: #34465e; background: #1b2a3d; }
button.secondary:hover:not(:disabled) { background: #283b53; border-color: #536c8d; }
button.compact { width: auto; padding: 8px 14px; font-size: .8rem; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid #a6cdff; outline-offset: 3px; }
.brand-lockup, .login-brand { display: flex; align-items: center; gap: 13px; }
.brand-mark { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; color: #adccfa; background: #233851; border: 1px solid #3b5474; border-radius: 12px; font-size: 1.1rem; font-weight: 800; letter-spacing: -.07em; }
.topbar { min-height: 94px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.top-actions { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: .8rem; }
.top-actions #who { white-space: nowrap; }
.top-actions button { background: transparent; border-color: var(--line); }
.muhely-sync { max-width: 210px; color: var(--muted); font-size: .7rem; line-height: 1.35; }
.muhely-sync[data-state="error"], .muhely-sync[data-state="stale"] { color: var(--warn); }
.summary-strip { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; margin-bottom: 24px; }
.balance-card, .month-summary { min-width: 0; padding: 22px 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.balance-card { background: linear-gradient(115deg, #1c2d43, #142131); border-color: #354b66; }
.balance-card > span:first-child { display: block; color: #b8c9de; font-size: .8rem; }
.balance-value { display: block; margin: 5px 0; color: #f5f8ff; font-size: clamp(1.9rem, 2.4vw, 2.65rem); line-height: 1.15; font-weight: 750; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.balance-note { display: block; margin: 8px 0 0; color: #a9bdd5; font-size: .75rem; }
.month-summary { display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.month-summary-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #d2ddec; font-size: .84rem; }
.month-summary-title h2, .month-summary-title strong { font-size: .92rem; font-weight: 650; }
.month-summary-metrics { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.month-summary-metrics strong { display: block; font-size: 1.5rem; font-variant-numeric: tabular-nums; letter-spacing: -.025em; }
.month-summary-metrics small, .month-summary-metrics p { margin: 0; color: var(--muted); font-size: .75rem; }
.month-summary-metrics > p, .month-summary-metrics > small { max-width: 240px; text-align: right; }
.summary-action { display: none; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 22px; }
.panel { overflow: hidden; }
.section-head { min-height: 84px; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.section-head p:not(.eyebrow) { margin: 6px 0 0; color: var(--muted); font-size: .73rem; }
.primary-action { flex-shrink: 0; padding-inline: 17px; font-size: .85rem; }
.register-tools { display: flex; align-items: center; gap: 14px; padding: 0 20px 18px; }
.search { flex: 1; min-width: 130px; }
.search input { min-height: 44px; padding: 10px 13px; font-size: .8rem; background: #0d1622; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { min-height: 44px; padding: 7px 10px; border: 1px solid transparent; background: transparent; color: #aab8cb; font-size: .75rem; font-weight: 650; white-space: nowrap; }
.chip:hover:not(:disabled) { background: #223046; }
.chip.active { color: #d7e7ff; background: #243b59; border-color: #466487; }
.register-head, .register-row-main { display: grid; grid-template-columns: 90px minmax(180px, 1fr) minmax(100px, .55fr) 120px; align-items: center; gap: 12px; }
.peter-history .register-head, .peter-history .register-row-main { grid-template-columns: 86px minmax(180px, 1fr) minmax(90px, .45fr) 118px 114px; }
.register-head { min-height: 34px; padding: 8px 20px; color: #8e9fb4; background: #0f1823; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .68rem; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; }
.register-head span:nth-last-child(-n+2) { text-align: right; }
.register-row { border-bottom: 1px solid #243243; }
.register-row:last-child { border-bottom: 0; }
.register-row-main { width: 100%; min-height: 88px; padding: 14px 20px; color: var(--text); background: transparent; border: 0; border-radius: 0; text-align: left; font-weight: 400; }
.register-row-main:hover:not(:disabled) { background: #192638; }
.register-row-main[aria-expanded="true"] { background: #192638; }
.register-row-main > time { color: #a7b7cc; font-size: .75rem; font-variant-numeric: tabular-nums; }
.row-description { min-width: 0; }
.row-description strong { display: block; font-size: .86rem; font-weight: 650; line-height: 1.45; overflow-wrap: anywhere; }
.row-description small { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 4px; font-size: .72rem; }
.row-reference { color: #9aaac0; font-size: .72rem; overflow-wrap: anywhere; }
.row-amount { display: block; text-align: right; color: #e3ebf5; font-size: .94rem; font-weight: 700; line-height: 1.4; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-amount.increase { color: var(--danger); }
.row-amount.decrease { color: var(--ok); }
.row-amount.pending { color: #d9e5f6; }
.row-amount > strong { display: block; font-size: inherit; font-weight: inherit; }
.row-amount > small { display: block; margin-top: 4px; color: #9daec4; font-size: .7rem; font-weight: 450; line-height: 1.35; white-space: normal; }
.row-effect-note { display: block; margin-top: 4px; color: #9daec4; font-size: .7rem; font-weight: 450; line-height: 1.35; }
.balance-effect, .previous-balance { text-align: right; font-variant-numeric: tabular-nums; }
.balance-effect { font-size: .91rem; font-weight: 700; }
.balance-effect.increase, .effect-label.increase { color: var(--danger); }
.balance-effect.decrease, .effect-label.decrease { color: var(--ok); }
.balance-effect.neutral, .effect-label.neutral { color: #b8c6d8; }
.previous-balance { color: #8e9fb5; font-size: .72rem; font-weight: 450; }
.mobile-only-label { display: none; }
.amount-nominal, .amount-due { display: block; margin-top: 4px; color: #a9bacf; font-size: .7rem; font-weight: 450; }
.amount-due { color: var(--warn); }
.register-row .amount-nominal { display: none; }
.register-row:has(.row-detail) .amount-nominal { display: block; }
.badge { display: inline-flex; align-items: center; width: max-content; gap: 4px; max-width: 100%; padding: 3px 7px; border: 1px solid #40516a; border-radius: 6px; color: #a8b8cc; background: #152030; font-size: .7rem; font-weight: 550; line-height: 1.25; white-space: nowrap; }
.badge.paid { color: #a0dfb8; border-color: #355647; background: #1a3027; }
.badge.unpaid, .badge.approved { color: #ebcd8b; border-color: #5a5036; background: #2d281e; }
.badge.rejected { color: var(--danger); border-color: #65443e; background: #30221f; }
.badge.muhely-source { color: #b4d3ff; border-color: #35557b; background: #192d46; }
.muhely-money-summary { display: block; margin-top: 5px; color: var(--muted); font-size: .7rem; font-weight: 400; }
.muhely-money-summary b { color: #c5d4e6; font-weight: 550; white-space: nowrap; }
.muhely-order .row-amount { white-space: normal; overflow-wrap: anywhere; }
.muhely-financials { display: flex; flex-wrap: wrap; gap: 12px 25px; margin-bottom: 14px; }
.muhely-financials > div { min-width: 105px; }
.muhely-financials span { display: block; color: var(--muted); font-size: .72rem; }
.muhely-financials strong { display: block; margin-top: 4px; font-size: .85rem; font-variant-numeric: tabular-nums; }
.muhely-open { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; color: #d4e5ff; border: 1px solid #385575; border-radius: 8px; text-decoration: none; font-size: .76rem; }
.muhely-open:hover { background: #20334a; }
.muhely-open:focus-visible { outline: 2px solid #a6cdff; outline-offset: 3px; }
@media (max-width: 600px) {
  .top-actions { flex-wrap: wrap; justify-content: flex-end; gap: 6px 10px; }
  .top-actions .muhely-sync { flex-basis: 100%; order: 3; text-align: right; }
}
.row-detail { padding: 18px 20px 20px; background: #101a27; border-top: 1px solid #30435b; font-size: .8rem; }
.row-detail > p { margin: 0 0 10px; }
.entry-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 22px; margin-bottom: 14px; }
.entry-detail-grid small, .entry-detail-grid span { color: var(--muted); font-size: .72rem; }
.entry-detail-grid strong { display: block; margin-top: 3px; font-size: .8rem; font-weight: 600; }
.private { padding: 10px 12px; color: #e8cf97; background: #28261e; border-left: 2px solid #73603b; border-radius: 0 6px 6px 0; overflow-wrap: anywhere; }
.payment-controls { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 10px; }
.payment-controls button, .row-detail > button { min-height: 44px; font-size: .76rem; }
.paid-history { background: #101a26; border-top: 1px solid var(--line); }
.paid-history-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 70px; padding: 16px 20px; color: #c6d5e8; background: transparent; border: 0; border-radius: 0; text-align: left; }
.paid-history-toggle:hover:not(:disabled) { background: #1d2b3f; }
.paid-history-toggle strong, .paid-history-toggle small { display: block; }
.paid-history-toggle strong { font-size: .8rem; font-weight: 600; }
.paid-history-toggle small { margin-top: 4px; color: #91a4be; font-size: .69rem; font-weight: 450; }
.paid-history-chevron { color: #89a9d0; font-size: .8rem; }
.paid-history-entries { min-width: 0; }
.attention > section + section { border-top: 1px solid var(--line); }
.attention .section-head { min-height: 76px; }
.attention-list { min-width: 0; }
.attention-item { padding: 16px 18px; border-bottom: 1px solid #293849; font-size: .8rem; }
.attention-item:last-child { border-bottom: 0; }
.attention-item header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.attention-item header strong { font-size: .82rem; }
.attention-item p { margin: 8px 0; }
.attention-item > small { display: block; margin: 5px 0 10px; font-size: .69rem; }
.monthly-current { margin: 0 16px 16px; padding: 17px; background: #1a283a; border: 1px solid #3a506d; border-radius: 11px; }
.monthly-current .monthly-obligation { padding: 0; border: 0; }
.monthly-current .monthly-amount { margin: 12px 0 5px; color: #ecf2fa; font-size: 1.5rem; font-weight: 650; letter-spacing: -.02em; }
.monthly-amount { font-variant-numeric: tabular-nums; }
.monthly-meta { display: block; margin-top: 6px; color: #a5b5ca; font-size: .7rem; line-height: 1.5; }
.monthly-current button { width: 100%; margin-top: 12px; font-size: .78rem; }
.monthly-group { margin: 0 16px; border-top: 1px solid #2c3e54; }
.monthly-group > summary { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 0; color: #bacadd; font-size: .76rem; font-weight: 550; cursor: pointer; }
.monthly-group > summary::after, .optional-fields > summary::after, .agreement > summary::after { content: '+'; flex-shrink: 0; color: #8fa8c8; font-size: 1rem; font-weight: 400; }
.monthly-group[open] > summary::after, .optional-fields[open] > summary::after, .agreement[open] > summary::after { content: '−'; }
.monthly-group > summary::-webkit-details-marker, .optional-fields > summary::-webkit-details-marker, .agreement > summary::-webkit-details-marker { display: none; }
.monthly-group-items { margin: 0 -2px 10px; }
.monthly-group .attention-item { padding: 14px 2px; }
.monthly-group .attention-item button { min-height: 44px; margin-top: 10px; font-size: .75rem; }
.agreement { margin: 0 16px; padding: 0; border-top: 1px solid #2c3e54; }
.agreement > summary { display: flex; align-items: center; justify-content: space-between; min-height: 54px; gap: 12px; color: #a6b8cf; font-size: .74rem; cursor: pointer; }
.agreement p { margin: 0 0 14px; font-size: .74rem; line-height: 1.6; }
.agreement form { padding-bottom: 16px; }
.agreement button { width: 100%; font-size: .74rem; }
.legacy-section .section-head { min-height: 66px; }
.legacy-section .section-head h2 { font-size: .82rem; }
#jobs > p { margin: 0; padding: 0 18px 18px; font-size: .76rem; line-height: 1.6; }
.mobile-tabs, .mobile-action { display: none; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 30; background: #05090fd1; backdrop-filter: blur(3px); }
.drawer { position: absolute; right: 0; top: 0; width: min(490px, 100%); height: 100%; padding: 0 26px 28px; overflow: auto; overscroll-behavior: contain; background: #131d2a; border-left: 1px solid #3a4e68; box-shadow: -24px 0 64px #0007; }
.drawer > header { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 -26px 26px; padding: 22px 26px; background: #131d2a; border-bottom: 1px solid #2d3e54; }
.drawer > header h2 { font-size: 1.15rem; }
.icon-button { flex: 0 0 44px; width: 44px; padding: 0; font-size: 1.45rem; font-weight: 400; }
.form-grid, .review-form { display: grid; gap: 20px; }
.form-grid > button[type="submit"] { min-height: 48px; margin-top: 4px; font-size: .85rem; }
.amount-field-group { padding: 18px; background: #1c2b3d; border: 1px solid #3b5270; border-radius: 12px; }
.amount-field { gap: 10px; color: #c4d6ec; }
.amount-field input { min-height: 58px; padding: 12px 14px; background: #0d1827; border-color: #4b6689; font-size: 1.35rem; font-weight: 600; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.amount-field input::placeholder { color: #9eafc6; font-size: 1rem; font-weight: 450; letter-spacing: 0; }
.amount-hint { margin: 12px 0 0; color: #b6c6db; font-size: .74rem; line-height: 1.6; }
.amount-hint.increase { color: var(--danger); }
.amount-hint.decrease { color: var(--ok); }
.customer-fields { display: grid; gap: 16px; }
.field-hint { margin: -6px 0 0; color: #9fb0c7; font-size: .72rem; line-height: 1.5; }
.optional-fields { min-width: 0; border: 1px solid #32455d; border-radius: 10px; background: #101a27; }
.optional-fields > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-height: 52px; padding: 13px 15px; color: #bdcce0; font-size: .8rem; cursor: pointer; }
.optional-fields > summary > span { color: #90a3bc; font-size: .69rem; }
.optional-fields > summary::after { margin-left: auto; }
.optional-fields-content { display: grid; gap: 18px; padding: 3px 16px 18px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: .8rem; }
.check input { width: 19px; min-height: 19px; height: 19px; margin: 0; accent-color: var(--accent); }
#entryLockMessage { margin: 0 0 20px; padding: 14px; border: 1px solid #554e3c; border-radius: 10px; background: #29271f; color: #e8d7ad; font-size: .78rem; line-height: 1.6; }
#deleteControls:empty { display: none; }
#deleteControls > .danger { width: 100%; }
.danger { width: auto; color: var(--danger); background: #302221; border: 1px solid #674943; }
.danger:hover:not(:disabled) { background: #45302d; }
.delete-confirmation { padding: 16px; color: #e7cbc6; background: #2c2021; border: 1px solid #72504a; border-radius: 11px; font-size: .8rem; }
.delete-confirmation p { margin-bottom: 16px; line-height: 1.6; }
.delete-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.delete-actions button { flex: 1; font-size: .8rem; }
.message { min-height: 1.2em; margin: 0; color: var(--ok); font-size: .8rem; line-height: 1.5; }
.message.error, .danger-text { color: var(--danger); }
#drawerMessage:not(:empty) { margin-bottom: 20px; padding: 12px 14px; background: #302221; border: 1px solid #674943; border-radius: 9px; }
#drawerMessage:empty, .global-message:empty { display: none; }
.global-message:not(:empty) { position: fixed; left: 50%; bottom: 24px; z-index: 20; width: max-content; max-width: calc(100% - 32px); transform: translateX(-50%); margin: 0; padding: 14px 20px; border: 1px solid #4a6358; border-radius: 12px; background: #182720; box-shadow: 0 12px 32px #0007; overflow-wrap: anywhere; }
.global-message.error { border-color: #77504b; background: #302221; }
.login-card { width: min(440px, 100%); display: grid; gap: 22px; margin: max(7vh, 36px) auto 0; padding: 34px; background: #121d2b; box-shadow: 0 26px 80px #0004; }
.login-brand { gap: 11px; }
.login-brand .eyebrow { margin: 0; color: #b5c6dd; font-size: .72rem; letter-spacing: .18em; }
.login-heading { margin: 6px 0 4px; }
.login-heading h1 { font-size: 1.8rem; letter-spacing: -.035em; }
.login-heading p { margin: 11px 0 0; font-size: .85rem; line-height: 1.6; }
.login-card label { font-size: .8rem; }
.login-card input, .login-card button { min-height: 48px; }
.login-card #loginMessage:empty { display: none; }
.login-footnote { margin: 0; padding-top: 18px; border-top: 1px solid var(--line); color: #94a8c0; text-align: center; font-size: .7rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
@media (min-width: 900px) and (max-width: 1199px) {
  .workspace { grid-template-columns: 1fr; }
  .attention { display: grid; grid-template-columns: 1fr; }
  .attention:has(.legacy-section:not([hidden])) { grid-template-columns: 1fr 1fr; }
  .attention > section + section { border-top: 0; border-left: 1px solid var(--line); }
  .attention > section[hidden] + section { border-left: 0; }
}
@media (max-width: 899px) {
  body { padding-bottom: 100px; }
  main { width: 100%; margin: 0; }
  .topbar { min-height: 64px; padding: 10px 18px; gap: 12px; }
  .brand-lockup { gap: 10px; }
  .brand-lockup .brand-mark { flex-basis: 34px; width: 34px; height: 34px; border-radius: 10px; font-size: .95rem; }
  .topbar .eyebrow { font-size: .55rem; margin-bottom: 3px; }
  .topbar h1 { font-size: 1.05rem; }
  .top-actions { gap: 10px; font-size: .7rem; }
  .top-actions #who { max-width: 70px; overflow: hidden; text-overflow: ellipsis; }
  .top-actions button { min-height: 44px; padding: 8px 10px; font-size: .72rem; }
  .summary-strip { grid-template-columns: 1fr; gap: 0; margin: 0 16px 12px; }
  .balance-card { padding: 12px 18px; border-radius: 14px 14px 0 0; }
  .balance-card > span:first-child { font-size: .73rem; }
  .balance-value { margin: 4px 0 0; font-size: 1.85rem; }
  .balance-note { display: none; }
  .month-summary { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 16px; border-radius: 0 0 14px 14px; border-top: 0; border-color: #354b66; }
  .month-summary-title { flex-direction: column; align-items: flex-start; gap: 5px; font-size: .73rem; }
  .month-summary-title h2, .month-summary-title strong { font-size: .78rem; }
  .month-summary-metrics { flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
  .month-summary-metrics > span { display: grid; gap: 2px; }
  .month-summary-metrics strong { font-size: 1.12rem; line-height: 1.2; }
  .month-summary-metrics small, .month-summary-metrics p { font-size: .72rem; line-height: 1.3; }
  .month-summary-metrics > p, .month-summary-metrics > small { max-width: 170px; }
  .mobile-tabs { position: sticky; top: 0; z-index: 10; display: flex; gap: 4px; margin: 0 12px 10px; padding: 4px; background: #101b29; border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 8px 24px #0002; }
  .tab { flex: 1; min-width: 0; min-height: 44px; padding: 8px 6px; border-radius: 7px; color: #a7b8cf; background: transparent; font-size: .8rem; }
  .tab.active { color: #e0edff; background: #2a405e; }
  .tab:hover:not(:disabled) { background: #233853; }
  .workspace { display: block; margin: 0 12px; }
  .panel { border-radius: 13px; box-shadow: none; }
  .section-head { min-height: 56px; padding: 12px 16px; gap: 10px; }
  .register-legend { display: none; }
  .section-head h2 { font-size: .88rem; }
  .section-head p:not(.eyebrow) { font-size: .72rem; }
  .section-head .primary-action { display: none; }
  .attention { overflow: visible; }
  .attention [data-view], .register[data-view] { display: none; }
  .attention [data-view].active, .register[data-view].active { display: block; }
  .attention:has([data-view].active) { display: block; }
  .attention:not(:has([data-view].active)) { display: none; }
  .attention > section + section { border: 0; }
  .register-tools { display: block; padding: 0 14px 10px; }
  .search input { padding-block: 9px; font-size: .77rem; }
  .filter-chips { gap: 3px; margin-top: 6px; }
  .chip { flex: 1; min-width: max-content; min-height: 44px; padding: 7px 9px; font-size: .74rem; }
  .register-head { display: none; }
  .register-row-main, .peter-history .register-row-main { grid-template-columns: minmax(0,1fr) minmax(84px,auto); grid-template-areas: "desc amount" "meta meta"; gap: 10px 12px; min-height: 100px; padding: 16px; }
  .row-description { grid-area: desc; }
  .row-description strong { font-size: .85rem; line-height: 1.45; }
  .row-description small { gap: 4px; margin-top: 6px; font-size: .71rem; }
  .register-row-main > time { grid-area: meta; font-size: .72rem; color: #92a7c1; }
  .row-reference { grid-area: meta; padding-left: 83px; color: #92a7c1; font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .register-row-main > .previous-balance { display: none; }
  .register-row-main > .balance-effect, .register-row-main > .row-amount, .register-row-main > .entry-amount { grid-area: amount; }
  .row-amount { font-size: .93rem; }
  .row-effect-note { max-width: 110px; margin-left: auto; font-size: .68rem; }
  .amount-nominal { font-size: .72rem; }
  .balance-effect { font-size: .9rem; }
  .row-detail { padding: 16px; }
  .entry-detail-grid { gap: 12px; }
  .row-detail .previous-balance { display: block; text-align: left; }
  .mobile-only-label { display: inline; }
  .paid-history-toggle { min-height: 72px; padding: 16px; }
  .paid-history-toggle strong { font-size: .77rem; }
  .monthly-current { margin-inline: 16px; }
  .monthly-group { margin-inline: 18px; }
  .mobile-action { position: fixed; left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 20; display: block; width: calc(100% - 32px); min-height: 50px; border: 1px solid #a1c6fa; border-radius: 11px; font-size: .86rem; box-shadow: 0 10px 28px #0009, 0 0 0 8px #0b1119db; }
  .drawer { top: auto; bottom: 0; width: 100%; height: min(94dvh, 860px); padding: 0 20px max(24px, env(safe-area-inset-bottom)); border: 1px solid #3b506d; border-bottom: 0; border-radius: 18px 18px 0 0; }
  .drawer > header { margin: 0 -20px 22px; padding: 18px 20px; }
  .drawer > header h2 { font-size: 1.08rem; }
  .form-grid { gap: 20px; }
  .form-grid input:not([name="amount"]):not([name="requestedAmount"]), .login-card input, .search input { font-size: 1rem; }
  .amount-field-group { padding: 16px; }
  .amount-field input { font-size: 1.3rem; }
  .global-message:not(:empty) { bottom: 84px; padding: 12px 16px; }
  .login-card { width: calc(100% - 32px); max-width: 420px; padding: 28px; margin: 6vh auto 0; }
  .login-heading h1 { font-size: 1.65rem; }
}
@media (max-width: 370px) {
  .topbar { padding-inline: 14px; }
  .top-actions #who { display: none; }
  .topbar h1 { font-size: 1rem; }
  .summary-strip { margin-inline: 12px; }
  .workspace { margin-inline: 8px; }
  .register-row-main, .peter-history .register-row-main { gap: 10px 8px; padding-inline: 13px; }
  .chip { padding-inline: 7px; font-size: .7rem; }
  .row-amount { font-size: .86rem; }
}
@media (prefers-reduced-motion: reduce) { button { transition: none; } }
