/* Shared visual system. Financial behavior, fields and scrolling live in villa.css. */
:root{
  --bg:#f5f7fb;--surface:#fff;--ink:#1b2d46;--muted:#5b6c83;
  --line:#dce4ef;--brand:#235bd7;--brand-soft:#edf3ff;--brand-deep:#1e4298;
  --success:#16734b;--success-soft:#eaf6ef;--red:#b13c49;--red-soft:#fff0f1;
  --orange:#925b16;--orange-soft:#fff5e5;--shadow:0 6px 24px #1937640a;
  --radius:18px;--ui-radius:14px;--ui-space:16px;line-height:1.7;
}
body{font-size:.875rem;font-weight:400;background:var(--bg)}
.ui-icon{display:inline-block;width:22px;height:22px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle}
.icon-sprite{position:absolute;width:0;height:0;overflow:hidden;pointer-events:none}
h1,h2,h3,strong,b{font-weight:700;letter-spacing:0}
h1{font-size:1.5rem;line-height:1.5}h2{font-size:1.125rem;line-height:1.6}h3{font-size:1rem;line-height:1.65}
.small,small,.eyebrow,.help-text{font-size:.8125rem;line-height:1.65;font-weight:400}
.eyebrow{color:var(--muted);font-weight:700}.muted,.page-footer{color:var(--muted)}
.app-shell{max-width:1120px}.page-header{margin-bottom:18px}.brand-lockup{gap:12px;min-width:0}
.brand-mark{width:42px;height:42px;border-radius:13px;background:var(--brand-soft);color:var(--brand)}
.brand-mark .ui-icon{width:25px;height:25px}.header-actions{gap:10px}.toolbar{margin-bottom:18px}
.app-page-heading{gap:16px;margin-bottom:20px;padding-block:6px 16px}
.app-page-heading h2{font-size:1.25rem;font-weight:700}.back-link{font-size:.8125rem;font-weight:700}
.back-link .ui-icon{width:18px;height:18px}.page-footer{font-size:.75rem;line-height:1.7;margin-top:28px}
.button{font-size:.875rem;font-weight:700;border-radius:11px;min-height:44px;padding:10px 16px;line-height:1.6;transition:background-color .15s,border-color .15s,box-shadow .15s}
.button.primary{background:var(--brand);box-shadow:0 3px 10px #235bd71a}.button.primary:hover{background:var(--brand-deep)}
.button.secondary{border-color:#b9c9e0;color:var(--brand-deep);background:var(--surface)}
.button.secondary:hover{border-color:var(--brand);background:var(--brand-soft)}
.button.ghost{color:var(--muted)}.button.ghost:hover{background:#eaf0f9;color:var(--ink)}
.button.danger{background:var(--red-soft);color:var(--red);border-color:#e8bbc2}
.small-button{font-size:.8125rem;min-height:44px;padding:8px 12px}.icon-button{width:44px;height:44px;background:#f0f4fa;color:var(--muted)}
button:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid var(--brand);outline-offset:3px}
input:focus,select:focus,textarea:focus,.file-control:focus-within{outline:2px solid var(--brand);outline-offset:2px;border-color:var(--brand)}
input[aria-invalid=true]:focus,select[aria-invalid=true]:focus,textarea[aria-invalid=true]:focus{outline-color:var(--red)}
label{font-size:.875rem;line-height:1.65;font-weight:700;gap:7px}
input,select,textarea,.filters input,.filters select{font-family:inherit;font-weight:400;font-size:1rem;line-height:1.5;min-height:48px;padding:11px 12px;border-color:#8492a7;border-radius:11px;background:white}
input::placeholder,textarea::placeholder{color:#65748a;opacity:1}input[readonly]{background:#f0f3f8;color:var(--muted)}
input[aria-invalid=true],select[aria-invalid=true],textarea[aria-invalid=true]{border-color:var(--red);background:#fff9fa}
.field-error{font-size:.875rem;line-height:1.6;color:var(--red)}.required-star{color:var(--brand)}
.filters,.form-grid{gap:14px;margin-bottom:18px}.filters label{font-size:.8125rem}
.help-text{font-weight:400;color:var(--muted)}.check-label{font-size:.875rem;font-weight:400;min-height:44px}
.notice{font-size:.875rem;line-height:1.75;padding:14px 16px;border-radius:12px;background:var(--brand-soft);color:var(--brand-deep)}
.notice.error{background:var(--red-soft);color:var(--red)}.notice.warning{background:var(--orange-soft);color:var(--orange)}
.home-summary{padding:24px;border-radius:20px;background:linear-gradient(115deg,#1e4298,#235bd7);box-shadow:0 8px 24px #235bd714}
.home-cost h2{font-size:.875rem;line-height:1.7;color:#e4edff;font-weight:400}.home-total{font-size:2.25rem;line-height:1.4;font-weight:700}
.home-balances{gap:18px;margin-top:20px;padding-top:18px}.home-balances span{font-size:.8125rem;color:#e4edff}
.home-balances strong{font-size:1.25rem;line-height:1.5;font-weight:700}
.app-navigation{margin-top:26px}.app-navigation>h2{font-size:1rem;margin-bottom:12px}
.app-menu{border:1px solid var(--line);border-radius:16px;overflow:hidden;background:var(--surface)}
.app-menu a{padding:15px 16px;gap:12px;min-height:76px}.menu-label{font-size:.9375rem;font-weight:700;line-height:1.65;gap:3px}
.menu-label small{font-size:.8125rem;font-weight:400;color:var(--muted)}.menu-icon{width:34px;height:34px;flex-basis:34px;border-radius:10px;background:var(--brand-soft);color:var(--brand)}
.menu-icon .ui-icon{width:20px;height:20px}.menu-arrow .ui-icon{width:18px;height:18px}
.summary-grid{gap:12px}.summary-card{padding:16px;border-radius:var(--ui-radius);gap:7px;background:var(--surface);border-color:var(--line)}
.summary-card .label{font-size:.875rem;line-height:1.65;color:var(--muted);font-weight:400}
.summary-card .amount{font-size:1.375rem;line-height:1.5;font-weight:700;white-space:normal;overflow-wrap:anywhere}.summary-card .hint{font-size:.75rem;line-height:1.6;color:var(--muted)}
.summary-card.highlight{background:var(--brand-soft);border-color:#c5d5f5}
.brothers-grid{gap:14px}.brother-card{padding:18px;border-radius:16px;gap:14px;border-color:var(--line);box-shadow:0 2px 8px #19376403}
.brother-name strong{font-size:1rem}.avatar{background:var(--brand-soft);color:var(--brand);border-radius:12px;font-weight:700}
.data-row{gap:14px}.data-row .label{font-size:.875rem;color:var(--muted);font-weight:400}.data-row .value{font-size:.9375rem;font-weight:700}
.brother-balance strong{font-size:1.125rem}.badge{font-size:.75rem;line-height:1.6;font-weight:700;padding:3px 8px;border-radius:7px}
.count{font-size:.75rem;font-weight:700;background:var(--brand-soft);color:var(--brand-deep)}
.badge.green{background:var(--success-soft);color:var(--success)}.badge.red{background:var(--red-soft);color:var(--red)}.badge.orange{background:var(--orange-soft);color:var(--orange)}
.fund-card,.mini-card{padding:16px;border-radius:var(--ui-radius);background:#f1f5fc;border-color:var(--line)}
.fund-card strong{font-size:1.375rem;font-weight:700}.mini-card h3{font-size:.9375rem}.mini-card .data-row{margin-block:7px}
.record-list{gap:12px;margin-top:16px}.record{padding:16px;border-radius:var(--ui-radius);gap:9px;background:white;border-color:var(--line)}
.record.cancelled{background:#f0f3f8}.record-title{font-size:.9375rem;font-weight:700;line-height:1.7}
.record-subtitle,.record-meta{font-size:.8125rem;line-height:1.7;color:var(--muted);font-weight:400}.record-meta{gap:6px 14px}
.record-amount{font-size:1rem;font-weight:700}.record-actions{gap:6px;padding-top:10px;margin-top:3px;border-color:var(--line)}
.record-head>*{min-width:0;max-width:100%}.record .money{white-space:normal;overflow-wrap:anywhere;max-width:100%}
.record-actions .button{font-size:.8125rem;min-height:44px;padding:8px 10px}
.screen-metadata{font-size:.8125rem;line-height:1.8;padding-bottom:14px;margin-bottom:18px;border-bottom:1px solid var(--line)}
.screen-metadata strong{font-weight:700;color:var(--ink)}.screen-subtitle{font-size:1rem;margin-top:24px!important}
.screen-shares{border-color:var(--line)}.screen-shares .hero-share span{font-size:.8125rem;color:var(--muted)}.screen-shares .hero-share strong{font-size:1rem;color:var(--ink)}
.section-actions{gap:12px;margin:12px 0 18px}.section-actions p{font-size:.8125rem;line-height:1.75}
.app-screen>.section-body>h3{margin-block:20px 12px}.empty-state{padding:24px 16px;border-radius:var(--ui-radius);font-size:.875rem;line-height:1.75;background:#f0f5fc;border-color:#c6d5e9;color:var(--muted)}
.empty-state p+p{font-size:.8125rem}.alert-item{padding:16px 0;border-color:var(--line)}.alert-item strong{font-size:.9375rem}.alert-item p{font-size:.875rem;line-height:1.75;color:var(--muted)}
#report-form{margin-top:18px}#report-form>.inline-actions{gap:10px;padding-top:16px;border-top:1px solid var(--line)}#report-feedback{margin-top:12px;font-size:.875rem}
.sheet{border-radius:20px;border-color:var(--line);box-shadow:0 22px 70px #142a4b2b;font-size:.875rem}
.sheet-header{padding:18px 22px;border-color:var(--line)}.sheet-header h2{font-size:1.25rem;line-height:1.6}.sheet-header .eyebrow{font-size:.75rem;margin-bottom:2px}
.sheet-body{padding:22px 22px 28px}.sheet-body h3:not(:first-child){margin-top:24px;margin-bottom:12px}.sheet-body>.stack{gap:18px}
.sheet-body>.sheet-form-layout{margin:0}.sheet-footer{border-color:var(--line)}.sheet-footer .button{font-size:.875rem;font-weight:700}
.choice-grid{gap:12px}.choice-button{padding:16px;gap:8px;min-height:108px;border-radius:var(--ui-radius);border-color:var(--line);background:#f7f9fe;font-size:.875rem;font-weight:700}
.choice-button .choice-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:var(--brand-soft);color:var(--brand)}
.choice-icon .ui-icon{width:23px;height:23px}.choice-button .help-text{font-size:.75rem;font-weight:400;line-height:1.65}
.form-section{margin-block:22px}.repeat-rows{gap:12px}.repeat-row{padding:16px;background:#f6f8fc;border-color:var(--line);border-radius:var(--ui-radius)}
.repeat-row .icon-button{width:44px;height:44px;background:var(--red-soft);color:var(--red)}.repeat-row .row-heading strong{font-size:.875rem;font-weight:700}
.detail-list .data-row{padding:12px 0;border-color:var(--line);gap:14px}.detail-list .label{font-size:.875rem;font-weight:400}.detail-list .value{font-size:.875rem;font-weight:700}
.detail-total{padding:16px;margin:18px 0;border-radius:var(--ui-radius);background:var(--brand-soft)}.detail-total strong{font-size:1.125rem}
.sheet-body details{border:1px solid var(--line);border-radius:11px;overflow:hidden;background:white}
.sheet-body details>summary{min-height:44px;padding:10px 12px;font-size:.875rem;font-weight:700;color:var(--brand-deep);cursor:pointer;background:#f5f8fd}
.sheet-body details[open]>summary{border-bottom:1px solid var(--line)}.sheet-body details>.detail-list{padding:0 12px}
.sheet-body hr{border:0;border-top:1px solid var(--line);margin:16px 0}
.file-control{border-color:#8492a7;border-radius:11px;background:#f6f8fc}.file-name{font-size:.8125rem}.file-control .button{font-size:.8125rem}
.attachment-list{gap:8px}.attachment-list a{font-size:.8125rem;line-height:1.6;min-height:44px;border-color:var(--line);border-radius:9px}
.audit-values{font-size:.875rem;line-height:1.75;background:#f4f7fc;border-radius:11px}
.draft-banner{border-color:#c6d6f3;background:var(--brand-soft);border-radius:var(--ui-radius);padding:14px 16px}
.draft-banner strong{font-size:.875rem}.draft-banner p{font-size:.8125rem;color:var(--muted)}
.draft-status{font-size:.75rem;line-height:1.7}.draft-status-heading strong{font-size:.8125rem;font-weight:700}.draft-saved-at{font-size:.75rem;color:var(--muted)}
.draft-status-message{font-size:.75rem;line-height:1.7;max-height:3.4em}.draft-retry{font-size:.8125rem;font-weight:700;border-color:#b9c9e0}
.draft-proof{font-size:.8125rem;border-radius:11px;border-color:var(--line);background:var(--brand-soft)}
.discard-dialog{border-radius:18px;border-color:var(--line)}.discard-content h2{font-size:1.125rem}.discard-content p{font-size:.875rem;line-height:1.8}
.discard-actions .button{font-size:.875rem}.toast{font-size:.875rem;line-height:1.7;border-radius:12px;background:var(--brand-deep)}.toast.error{background:var(--red)}
.login-card{padding:30px;border-radius:20px;border-color:var(--line);box-shadow:var(--shadow)}.login-card h1{font-size:1.625rem;line-height:1.5}
.login-card>.muted{font-size:.875rem;line-height:1.8}.login-card form{margin:24px 0;gap:18px}.login-card .brand-mark{width:48px;height:48px;margin-bottom:20px}
.add-movement{font-size:.9375rem;font-weight:700}.add-movement .add-button-label{font-size:.9375rem;line-height:1.6}.add-movement .add-icon{width:24px;height:24px}
.mobile-bottom-nav a{font-weight:400}.mobile-bottom-nav a[aria-current=page]{font-weight:700}
@media screen and (max-width:720px){
  .app-shell{font-size:.875rem;line-height:1.7;padding-inline:16px;padding-top:16px}
  .app-shell h1{font-size:1.25rem;line-height:1.5}.app-shell h2{font-size:1.0625rem;line-height:1.6}.app-shell h3{font-size:.9375rem;line-height:1.65}
  .page-header{margin-bottom:10px}.brand-lockup{gap:10px}.brand-mark{width:38px;height:38px;border-radius:11px}.brand-lockup .eyebrow{font-size:.75rem}
  .header-actions{flex-direction:row;align-items:center}.header-actions .button{font-size:.75rem}.toolbar{margin-bottom:14px;gap:6px}
  .toolbar>.small{font-size:.75rem}.toolbar .button{font-size:.75rem;padding-inline:8px}
  .app-page-heading{padding-block:4px 14px;margin-bottom:18px;gap:14px}.app-page-heading h2{font-size:1.125rem;line-height:1.6}.back-link{font-size:.8125rem}
  .home-summary{padding:20px 18px;border-radius:18px}.home-total{font-size:2rem}.home-cost h2{font-size:.875rem}
  .home-balances{gap:14px;margin-top:16px;padding-top:16px}.home-balances span{font-size:.75rem;line-height:1.7}.home-balances strong{font-size:1.125rem}
  .app-navigation{margin-top:22px}.app-navigation>h2{font-size:1rem}.app-menu a{padding:14px 12px;gap:10px;min-height:76px}.menu-label{font-size:.875rem}.menu-label small{font-size:.75rem}
  .summary-card{padding:14px 12px;border-radius:14px;gap:8px}.summary-card .label{font-size:.8125rem;line-height:1.65}.summary-card .amount{font-size:1.125rem;line-height:1.5}.summary-card .hint{font-size:.75rem}
  .brother-card{padding:14px;border-radius:15px;gap:12px}.brother-name strong{font-size:1rem}.brother-balance strong{font-size:1.0625rem}
  .brother-card .brother-values .label{font-size:.8125rem}.brother-card .brother-values .value{font-size:.9375rem;font-weight:700}
  .record{padding:14px;gap:8px}.record-title{font-size:.875rem}.record-meta,.record-subtitle{font-size:.8125rem;line-height:1.7}
  .record-actions .button{font-size:.8125rem;padding:8px 10px}.screen-metadata{font-size:.8125rem;gap:8px 16px;padding-bottom:12px}
  .fund-card,.mini-card{padding:14px}.fund-card strong{font-size:1.25rem}.empty-state{padding:22px 14px}
  label,.filters label{font-size:.875rem}.button{font-size:.875rem}.small-button{font-size:.8125rem}
  input,select,textarea,.filters input,.filters select{font-size:1rem;min-height:48px;padding:11px 12px}.filters,.form-grid{gap:12px;margin-bottom:16px}
  .notice{font-size:.8125rem;padding:12px 14px}.field-error{font-size:.875rem;line-height:1.6}
  .sheet{border-radius:18px 18px 0 0}.sheet-header{padding:14px 16px}.sheet-header h2{font-size:1.125rem;line-height:1.6}.sheet-body{padding:18px 16px}
  .sheet-body.has-docked-form{padding:0}.sheet-form-fields{padding:16px}.sheet-body h3:not(:first-child){margin-top:22px;margin-bottom:12px}
  .choice-grid{gap:10px}.choice-button{padding:14px 12px;min-height:108px;gap:8px}.choice-button .help-text{font-size:.75rem}
  .repeat-row{padding:14px}.detail-list .data-row{padding:11px 0}.detail-list .label,.detail-list .value{font-size:.875rem}
  .detail-total{padding:14px}.detail-total strong{font-size:1.125rem}.draft-status-heading strong{font-size:.8125rem}
  .sheet-form-layout>.draft-status{padding:8px 16px;background:#f6f8fc;border-color:var(--line)}
  .sheet-form-layout>.sheet-footer{padding-inline:16px;padding-top:12px}.sheet-form-layout>.sheet-footer .button{font-size:.875rem}
  .add-movement-wrap .add-movement{box-shadow:0 4px 12px #235bd733;border:3px solid white;width:54px;height:54px;min-height:54px;border-radius:50%;padding:0}
  .add-movement .add-icon{width:27px;height:27px}.mobile-bottom-nav a{font-size:.75rem;border-radius:10px}.mobile-bottom-nav a[aria-current=page]{color:var(--brand);background:var(--brand-soft)}
  .login-card{padding:24px}.login-card h1{font-size:1.5rem}.page-footer{font-size:.75rem;margin-top:24px}
}
@media screen and (max-width:540px){.header-actions>#greeting{display:none}}
@media (prefers-reduced-motion:reduce){.button{transition:none}}
