:root {
  color-scheme: light;
  --paper: #f6f7f2;
  --ink: #172923;
  --muted: #718078;
  --green: #176b55;
  --green-dark: #125a48;
  --green-soft: #e7f2ec;
  --orange: #a45a2a;
  --orange-soft: #f8eee6;
  --line: #e7ebe4;
  --white: #fff;
  --shadow: 0 15px 40px rgba(33, 58, 43, 0.07);
  font-family: "IBM Plex Sans Arabic", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(23, 107, 85, .26); outline-offset: 3px; }
.page-frame { width: min(1120px, calc(100% - 56px)); margin: 0 auto; }
.topbar { min-height: 90px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(23, 41, 35, .08); }
.brand { display: inline-flex; flex-direction: row; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand__mark { width: 44px; height: 44px; object-fit: cover; border-radius: 15px; box-shadow: 0 5px 12px rgba(23, 107, 85, .13); }
.brand__copy { display: grid; gap: 1px; }
.brand__copy strong { font-size: 20px; line-height: 1.2; font-weight: 850; letter-spacing: -.5px; }
.brand__copy small { color: var(--muted); font-size: 11px; }
.topbar__actions { display: flex; align-items: center; gap: 16px; }
.privacy-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid #dbe7dd; border-radius: 99px; background: rgba(231, 242, 236, .66); color: #53675b; font-size: 11px; font-weight: 650; }
.privacy-chip__dot { width: 7px; height: 7px; border-radius: 50%; background: #57a178; box-shadow: 0 0 0 4px rgba(87, 161, 120, .12); }
.button { border: 0; border-radius: 13px; min-height: 44px; padding: 0 17px; display: inline-flex; justify-content: center; align-items: center; gap: 7px; font-size: 12px; font-weight: 750; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0) scale(.985); }
.button--primary { background: var(--green); color: #fff; box-shadow: 0 6px 14px rgba(23, 107, 85, .16); }
.button--primary:hover { background: var(--green-dark); box-shadow: 0 8px 20px rgba(23, 107, 85, .22); }
.button--outline { border: 1px solid #d5e1d8; color: var(--green); background: #fff; }
.button--outline:hover { background: var(--green-soft); }
.button__plus { font-size: 18px; line-height: 1; font-weight: 400; }
.main-content { padding: 32px 0 0; }
.welcome { min-height: 186px; position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; padding: 4px 8px 23px; }
.welcome__copy { position: relative; z-index: 1; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; color: var(--green); font-size: 11px; font-weight: 750; }
.eyebrow__line { width: 18px; height: 2px; border-radius: 3px; background: #77a88c; }
h1 { margin: 0; font-size: clamp(30px, 4vw, 43px); line-height: 1.33; letter-spacing: -1.1px; font-weight: 850; }
.welcome__description { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.welcome__aside { width: 225px; height: 145px; position: relative; align-self: flex-end; margin-left: 32px; }
.aside-orbit { position: absolute; border: 1px solid #d8e7dc; border-radius: 50%; }
.aside-orbit--one { width: 152px; height: 152px; top: 15px; left: 13px; }
.aside-orbit--two { width: 102px; height: 102px; top: 39px; left: 38px; border-color: #e3ece2; }
.aside-note { position: absolute; top: 58px; left: 64px; width: 128px; min-height: 54px; display: flex; align-items: center; gap: 9px; padding: 8px 11px; border: 1px solid rgba(255,255,255,.8); border-radius: 15px; background: rgba(255,255,255,.82); box-shadow: 0 10px 25px rgba(33,58,43,.08); color: #65776d; font-size: 10px; line-height: 1.65; }
.aside-note__mark { display: grid; place-items: center; width: 31px; height: 31px; flex: 0 0 31px; border-radius: 11px; background: var(--green); color: white; font-size: 17px; font-weight: 800; }
.summary-grid { display: grid; grid-template-columns: minmax(1.45fr, 1.45fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.summary-card { position: relative; min-height: 145px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #fff; padding: 20px; box-shadow: 0 5px 17px rgba(33, 58, 43, .025); }
.summary-card--total { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 10px 23px rgba(23, 107, 85, .13); }
.summary-card__top, .summary-card__foot { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; }
.summary-card__top { color: #d6e8dd; font-size: 11px; font-weight: 650; }
.summary-card__symbol { color: #c4dccc; font-size: 17px; }
.summary-card__total { display: block; position: relative; z-index: 1; margin: 4px 0 13px; font-size: 27px; letter-spacing: -.45px; font-weight: 850; }
.summary-card__rule { height: 1px; position: relative; z-index: 1; background: rgba(255,255,255,.19); }
.summary-card__foot { margin-top: 11px; color: #d1e4d9; font-size: 10px; }
.summary-count { border-radius: 30px; background: rgba(255,255,255,.12); padding: 5px 8px; }
.summary-count b { color: #fff; margin-left: 3px; }
.summary-card__decoration { position: absolute; left: -50px; top: -76px; width: 170px; height: 170px; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; }
.summary-card--owed, .summary-card--owe { display: flex; flex-direction: column; justify-content: center; }
.summary-card__label { display: flex; align-items: center; gap: 7px; color: #54655b; font-size: 11px; font-weight: 700; }
.summary-card__dot { width: 7px; height: 7px; border-radius: 50%; }
.summary-card__dot--green { background: #4a9a6a; }
.summary-card__dot--orange { background: #ca8954; }
.summary-card__amount { margin-top: 9px; font-size: 20px; font-weight: 830; letter-spacing: -.3px; }
.summary-card--owed .summary-card__amount { color: var(--green); }
.summary-card--owe .summary-card__amount { color: var(--orange); }
.summary-card__hint { margin-top: 3px; color: #98a199; font-size: 10px; }
.summary-card__icon { position: absolute; left: 16px; bottom: 15px; display: grid; place-items: center; width: 27px; height: 27px; border-radius: 10px; background: #f3f7f3; color: #76a488; font-size: 17px; }
.summary-card--owe .summary-card__icon { background: #fbf4ee; color: #c28354; }
.ledger { padding-top: 41px; }
.ledger__heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.eyebrow--small { margin: 0 0 3px; font-size: 10px; }
h2 { margin: 0; font-size: 22px; line-height: 1.4; letter-spacing: -.45px; font-weight: 830; }
.ledger__subtitle { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.toolbar { display: flex; align-items: center; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.77); }
.searchbox { height: 40px; min-width: 190px; flex: 1; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid #e8ece6; border-radius: 11px; background: #fff; }
.searchbox__icon { color: #819188; font-size: 22px; line-height: 1; transform: translateY(-1px); }
.searchbox input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 11px; }
.searchbox input::placeholder { color: #a3ada5; }
.searchbox__hint { border: 1px solid #edf0eb; border-radius: 5px; padding: 2px 5px; color: #a0aaa2; font: inherit; font-size: 9px; white-space: nowrap; }
.filters { display: flex; align-items: center; gap: 5px; }
.filter-chip, .settled-toggle { min-height: 34px; border: 0; border-radius: 9px; padding: 0 12px; color: #6f7e73; background: transparent; font-size: 10px; font-weight: 650; transition: .18s ease; }
.filter-chip:hover, .settled-toggle:hover { background: #f1f4ee; }
.filter-chip.is-active { color: #fff; background: var(--ink); }
.settled-toggle { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #e8ece6; white-space: nowrap; }
.settled-toggle.is-active { color: var(--green); border-color: #cfe1d4; background: var(--green-soft); }
.settled-toggle__dot { width: 6px; height: 6px; border-radius: 50%; background: #a7b2a9; }
.settled-toggle.is-active .settled-toggle__dot { background: var(--green); }
.storage-status { margin-top: 14px; padding: 11px 13px; border: 1px solid #ead5bf; border-radius: 12px; color: #80552e; background: #fff8f1; font-size: 11px; }
.debt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 13px; }
.debt-card { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 4px 13px rgba(33,58,43,.025); animation: card-enter .25s ease both; }
@keyframes card-enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.debt-card__head { display: flex; align-items: center; gap: 11px; }
.person-avatar { width: 43px; height: 43px; display: grid; flex: 0 0 43px; place-items: center; border-radius: 15px; font-size: 16px; font-weight: 820; }
.person-avatar--owed { color: var(--green); background: var(--green-soft); }
.person-avatar--owe { color: var(--orange); background: var(--orange-soft); }
.debt-card__identity { min-width: 0; flex: 1; }
.debt-card__name-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.debt-card__name { overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.debt-badge { padding: 4px 7px; border-radius: 8px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.debt-badge--owed { color: var(--green); background: var(--green-soft); }
.debt-badge--owe { color: var(--orange); background: var(--orange-soft); }
.debt-card__date { margin-top: 3px; color: #929d95; font-size: 9px; }
.delete-button { width: 31px; height: 31px; display: grid; flex: 0 0 31px; place-items: center; border: 0; border-radius: 10px; color: #87948b; background: transparent; font-size: 18px; transition: .18s ease; }
.delete-button:hover { color: #ac4e48; background: #fbefed; }
.debt-card__note { margin: 11px 0 0; color: #68776d; font-size: 10px; line-height: 1.75; overflow-wrap: anywhere; }
.debt-card__balance { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-top: 14px; }
.debt-card__balance-label { color: var(--muted); font-size: 10px; }
.debt-card__balance-value { font-size: 16px; font-weight: 820; white-space: nowrap; }
.debt-card__balance-value--owed { color: var(--green); }
.debt-card__balance-value--owe { color: var(--orange); }
.progress { height: 5px; display: flex; direction: rtl; overflow: hidden; margin-top: 10px; border-radius: 99px; background: #edf0eb; }
.progress__fill { height: 100%; border-radius: inherit; transition: width .35s ease; }
.progress__fill--owed { background: #4c9970; }
.progress__fill--owe { background: #cb8953; }
.progress-labels { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; color: #89958c; font-size: 9px; }
.payment-button { width: 100%; min-height: 37px; margin-top: 13px; border: 0; border-radius: 10px; color: var(--green); background: #eef6f0; font-size: 10px; font-weight: 750; transition: .18s ease; }
.payment-button:hover { background: #e3f0e7; }
.payment-button--owe { color: var(--orange); background: #fbf3ec; }
.payment-button--owe:hover { background: #f5e9dd; }
.settled-label { display: inline-flex; align-items: center; gap: 6px; margin-top: 13px; padding: 6px 9px; border-radius: 8px; color: var(--green); background: var(--green-soft); font-size: 9px; font-weight: 700; }
.empty-state { min-height: 248px; display: flex; flex-direction: column; align-items: center; justify-content: center; margin-top: 13px; padding: 26px; border: 1px dashed #dce4db; border-radius: 18px; background: rgba(255,255,255,.58); text-align: center; }
.empty-state__symbol { width: 55px; height: 55px; display: grid; place-items: center; margin-bottom: 13px; border-radius: 19px; color: var(--green); background: var(--green-soft); font-size: 27px; }
.empty-state__title { margin: 0; font-size: 14px; font-weight: 800; }
.empty-state__text { max-width: 310px; margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.8; }
.empty-state__action { margin-top: 14px; border: 0; border-radius: 10px; padding: 9px 13px; color: #fff; background: var(--green); font-size: 10px; font-weight: 750; }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 42px; padding: 17px 4px 22px; border-top: 1px solid rgba(23,41,35,.08); color: #87948b; font-size: 10px; }
.footer__lock { margin-left: 4px; color: #77a488; }
.dialog { width: min(460px, calc(100% - 28px)); max-height: min(88vh, 760px); overflow-y: auto; padding: 0; border: 0; border-radius: 24px; color: var(--ink); background: var(--paper); box-shadow: 0 24px 90px rgba(17, 35, 25, .22); }
.dialog::backdrop { background: rgba(15, 29, 21, .42); backdrop-filter: blur(3px); }
.dialog[open] { animation: dialog-enter .22s ease both; }
@keyframes dialog-enter { from { opacity: 0; transform: translateY(9px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
.dialog__panel { padding: 12px 24px 24px; }
.dialog__handle { width: 38px; height: 4px; margin: 0 auto 16px; border-radius: 5px; background: #cbd2ca; }
.dialog__heading { display: flex; align-items: start; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.dialog__heading h2 { font-size: 19px; }
.dialog__heading p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 34px; border: 0; border-radius: 11px; color: #607067; background: #e9ede7; font-size: 22px; }
.direction-picker { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 15px; padding: 4px; border: 0; border-radius: 12px; background: #eaede7; }
.direction-picker legend { flex: 0 0 100%; padding: 0 0 8px; color: var(--ink); font-size: 11px; font-weight: 750; }
.direction-option { min-height: 39px; flex: 1; display: grid; place-items: center; border-radius: 9px; color: #69776f; font-size: 10px; font-weight: 650; cursor: pointer; }
.direction-option input { position: absolute; opacity: 0; pointer-events: none; }
.direction-option:has(input:checked) { color: white; background: var(--green); box-shadow: 0 4px 10px rgba(23,107,85,.15); }
.direction-option:has(input[value="owe"]:checked) { background: var(--orange); }
.field-label { display: block; margin: 14px 0 7px; color: var(--ink); font-size: 11px; font-weight: 750; }
.field-label__optional { color: #8c9890; font-weight: 450; }
.field-input { width: 100%; min-height: 45px; padding: 10px 13px; border: 1px solid #e1e7df; border-radius: 11px; outline: 0; color: var(--ink); background: #fff; font-size: 12px; transition: border .16s ease, box-shadow .16s ease; }
.field-input:focus { border-color: #8ab79b; box-shadow: 0 0 0 3px rgba(23,107,85,.08); }
.field-input::placeholder { color: #a4ada7; }
.field-input--note { min-height: 76px; resize: vertical; line-height: 1.7; }
.amount-input { position: relative; }
.amount-input .field-input { padding-left: 52px; }
.amount-input__currency { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #7a887e; font-size: 10px; font-weight: 700; pointer-events: none; }
.button--wide { width: 100%; min-height: 47px; margin-top: 20px; }
.form-error { margin: 10px 0 0; color: #af4c45; font-size: 10px; }
@media (max-width: 850px) {
  .page-frame { width: min(100% - 36px, 720px); }
  .welcome__aside { width: 170px; margin-left: 5px; transform: scale(.85); transform-origin: left center; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .summary-card--total { grid-column: 1 / -1; }
  .toolbar { flex-wrap: wrap; }
  .searchbox { flex-basis: 100%; }
  .filters { flex: 1; }
}
@media (max-width: 580px) {
  .page-frame { width: calc(100% - 30px); }
  .topbar { min-height: 74px; }
  .brand__mark { width: 39px; height: 39px; border-radius: 13px; }
  .brand__copy strong { font-size: 18px; }
  .privacy-chip { padding: 8px 9px; font-size: 9px; }
  .topbar__actions { gap: 7px; }
  .button--top { min-height: 38px; padding: 0 11px; font-size: 10px; }
  .main-content { padding-top: 23px; }
  .welcome { min-height: unset; padding: 4px 1px 20px; }
  .welcome__aside { display: none; }
  h1 { font-size: clamp(28px, 8vw, 36px); line-height: 1.42; }
  .welcome__description { max-width: 330px; font-size: 11px; line-height: 1.8; }
  .summary-grid { gap: 9px; }
  .summary-card { min-height: 124px; padding: 15px; border-radius: 16px; }
  .summary-card--total { min-height: 144px; }
  .summary-card__total { font-size: 25px; }
  .summary-card__amount { font-size: 16px; }
  .summary-card__hint { max-width: 125px; font-size: 9px; }
  .summary-card__icon { left: 11px; bottom: 11px; width: 23px; height: 23px; }
  .ledger { padding-top: 32px; }
  .ledger__heading { align-items: center; margin-bottom: 15px; }
  h2 { font-size: 20px; }
  .ledger__subtitle { max-width: 210px; font-size: 9px; }
  .button--outline { min-height: 38px; padding: 0 10px; font-size: 9px; white-space: nowrap; }
  .toolbar { gap: 7px; padding: 9px; border-radius: 14px; }
  .searchbox { min-width: 0; height: 39px; }
  .searchbox__hint { display: none; }
  .filters { justify-content: space-between; gap: 2px; }
  .filter-chip { min-height: 32px; padding: 0 10px; font-size: 9px; }
  .settled-toggle { min-height: 32px; padding: 0 8px; font-size: 9px; }
  .debt-grid { grid-template-columns: 1fr; gap: 9px; }
  .debt-card { padding: 15px; }
  .footer { align-items: start; flex-direction: column; margin-top: 30px; padding-bottom: 18px; font-size: 9px; }
  .dialog { position: fixed; inset: auto 0 0; width: 100%; max-width: none; max-height: 90vh; margin: 0; border-radius: 23px 23px 0 0; }
  .dialog__panel { padding: 10px 19px calc(22px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* Installable web app */
.install-button { min-height: 40px; padding-inline: 13px; color: var(--green); font-size: 10px; white-space: nowrap; }
.install-button:hover { border-color: #bad3c2; background: var(--green-soft); }
.install-button:disabled { cursor: default; color: var(--green); opacity: .82; }
.install-instructions { padding: 14px 15px; border: 1px solid #dce8de; border-radius: 13px; color: #52665a; background: #f0f6f0; font-size: 11px; line-height: 1.9; }
.install-instructions strong { color: var(--ink); }
@media (max-width: 580px) {
  .privacy-chip { display: none; }
  .topbar__actions { gap: 6px; }
  .install-button { min-height: 38px; padding-inline: 9px; font-size: 9px; }
}


/* الحساب المشفّر، الاستحقاقات والتقارير */
[hidden] { display: none !important; }
.topbar__actions { flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.header-action { min-height: 38px; padding-inline: 11px; font-size: 10px; white-space: nowrap; }
.privacy-chip--busy { color: #8a632e; border-color: #eadcbd; background: #fff8e9; }
.privacy-chip--warning { color: #9b483f; border-color: #efd0ca; background: #fff2ef; }
.summary-card--due { border-color: #f0ded9; background: #fffaf8; }
.summary-card--due .summary-card__amount { color: #a94f43; }
.summary-card--soon { border-color: #efe6cf; background: #fffdf7; }
.summary-card--soon .summary-card__amount { color: #9a762d; }
.summary-card__dot--red { background: #bd5d50; }
.summary-card__dot--gold { background: #bc9849; }
.storage-status--success { border-color: #d4e8d8; color: #426c4f; background: #f1f8f1; }
.storage-status--warning { border-color: #ead5bf; color: #80552e; background: #fff8f1; }
.due-alert { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; padding: 13px 15px; border: 1px solid #f0dfc5; border-radius: 14px; color: #74572a; background: #fffaf0; }
.due-alert strong { font-size: 12px; }
.due-alert p { margin: 3px 0 0; color: #927c58; font-size: 10px; }
.due-alert__actions { display: flex; align-items: center; gap: 8px; }
.due-alert .button { min-height: 35px; font-size: 9px; }
.due-alert .icon-button { width: 30px; height: 30px; flex-basis: 30px; }
.debt-due { display: inline-flex; align-items: center; gap: 5px; margin-top: 11px; padding: 5px 8px; border-radius: 8px; color: #64746a; background: #f1f5ef; font-size: 9px; font-weight: 650; }
.debt-due--late { color: #a34c43; background: #fff0ed; }
.debt-due--today { color: #9c622f; background: #fff5e7; }
.debt-due--soon { color: #8d712f; background: #fff9e9; }
.vault-gate { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; overflow-y: auto; padding: 28px 18px; background: radial-gradient(circle at 20% 10%, rgba(225, 238, 227, .75), transparent 34%), var(--paper); }
.vault-gate__card { width: min(470px, 100%); padding: 27px; border: 1px solid #e4ebe2; border-radius: 25px; background: rgba(255,255,255,.9); box-shadow: 0 22px 65px rgba(33,58,43,.09); }
.vault-gate__card > img { display: block; width: 58px; height: 58px; margin-bottom: 20px; border-radius: 18px; box-shadow: 0 7px 18px rgba(23,107,85,.13); }
.vault-gate__card h1 { font-size: clamp(25px, 5vw, 34px); }
.vault-gate__body { margin-top: 13px; }
.gate-copy { margin: 0 0 16px; color: #66776d; font-size: 12px; line-height: 1.9; }
.gate-footnote { margin: 13px 0 0; color: #89958d; font-size: 10px; line-height: 1.8; }
.vault-gate__foot { display: flex; align-items: center; gap: 8px; margin-top: 24px; padding-top: 14px; border-top: 1px solid #edf0eb; color: #718178; font-size: 10px; }
.vault-gate__foot span { color: var(--green); }
.check-row { display: flex; align-items: flex-start; gap: 9px; margin-top: 15px; color: #65756b; font-size: 10px; line-height: 1.8; cursor: pointer; }
.check-row input { width: 17px; height: 17px; flex: 0 0 17px; margin: 1px 0 0; accent-color: var(--green); }
.check-row--recovery { padding: 12px; border: 1px solid #e1e9df; border-radius: 12px; background: #f8faf6; }
.recovery-code { overflow-wrap: anywhere; margin: 12px 0; padding: 15px 12px; border: 1px dashed #aac5b0; border-radius: 13px; color: #174f3e; background: #f1f8f2; font: 750 15px/1.9 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .4px; text-align: center; }
.text-button { display: block; margin: 13px auto 0; border: 0; padding: 6px; color: var(--green); background: transparent; font-size: 10px; font-weight: 700; }
.text-button:hover { text-decoration: underline; }
.field-input--code { min-height: 76px; direction: ltr; font: 12px/1.8 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.field-grid .field-label { margin-top: 0; }
.report-summary { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin-top: 16px; }
.report-stat { display: flex; flex-direction: column; gap: 6px; padding: 11px; border: 1px solid #e5ebe3; border-radius: 12px; background: #fff; }
.report-stat span { color: #7d8a81; font-size: 9px; }
.report-stat strong { color: var(--green); font-size: 13px; }
.report-actions { display: flex; gap: 8px; margin-top: 16px; }
.report-actions .button { min-height: 42px; flex: 1; padding-inline: 10px; font-size: 10px; }
.dialog-note { margin: 12px 0 0; color: #818d84; font-size: 9px; line-height: 1.8; }
.dialog-success { margin: 12px 0 0; color: #42734d; font-size: 10px; line-height: 1.8; }
.restore-panel { margin-top: 16px; padding-top: 12px; border-top: 1px solid #e5ebe3; }
.restore-panel .button { margin-top: 11px; }
.payment-conflict-alert { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 16px 0; padding: 16px 18px; border: 1px solid #edc795; border-radius: 16px; background: #fff8ed; color: #71491b; }
.payment-conflict-alert strong { display: block; font-size: 13px; }
.payment-conflict-alert p { margin: 4px 0 0; color: #8b6a3d; font-size: 10px; line-height: 1.7; }
.payment-conflict-alert .button { flex-shrink: 0; min-height: 39px; }
.payment-conflict-list { display: grid; gap: 10px; margin-top: 14px; }
.payment-conflict-item { padding: 13px; border: 1px solid #e8e6d9; border-radius: 13px; background: #fbfaf6; }
.payment-conflict-item__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; color: #3d4c43; font-size: 11px; }
.payment-conflict-item__detail { margin: 6px 0 0; color: #78847b; font-size: 9px; line-height: 1.7; }
.payment-conflict-item__actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.payment-conflict-item__actions .button { min-height: 35px; padding-inline: 10px; font-size: 9px; }
.print-report { display: none; }
@media (max-width: 850px) {
  .topbar__actions { max-width: 72%; }
}
@media (max-width: 580px) {
  .topbar { align-items: flex-start; gap: 8px; padding-block: 12px; }
  .topbar__actions { max-width: 72%; gap: 5px; }
  .header-action { min-height: 34px; padding-inline: 8px; font-size: 9px; }
  .privacy-chip { display: none; }
  .install-button { min-height: 34px; padding-inline: 8px; font-size: 9px; }
  .due-alert { align-items: flex-start; flex-direction: column; }
  .due-alert__actions { width: 100%; justify-content: space-between; }
  .payment-conflict-alert { align-items: stretch; flex-direction: column; padding: 13px; }
  .payment-conflict-alert .button { width: 100%; }
  .payment-conflict-item__actions { flex-direction: column; }
  .payment-conflict-item__actions .button { width: 100%; }
  .summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .summary-card--total { grid-column: 1 / -1; }
  .field-grid { grid-template-columns: 1fr; }
  .vault-gate { align-items: start; padding-top: max(22px, env(safe-area-inset-top)); }
  .vault-gate__card { margin-block: auto; padding: 21px; border-radius: 21px; }
  .vault-gate__card h1 { font-size: 27px; }
  .recovery-code { font-size: 12px; }
  .report-actions { flex-direction: column; }
}
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  body { background: #fff !important; color: #172923 !important; }
  body > * { display: none !important; }
  #print-report, #print-report[hidden] { display: block !important; width: 100%; color: #172923; direction: rtl; font-family: Tahoma, Arial, sans-serif; }
  #print-report header { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 2px solid #176b55; }
  #print-report header img { border-radius: 11px; }
  #print-report h1 { margin: 0; font-size: 22px; }
  #print-report header p, .print-summary { margin: 5px 0 0; color: #53665b; font-size: 11px; }
  #print-report table { width: 100%; margin-top: 18px; border-collapse: collapse; font-size: 9px; }
  #print-report th, #print-report td { padding: 8px 6px; border: 1px solid #dce5dc; text-align: right; }
  #print-report th { color: #174f3e; background: #eef5ef !important; print-color-adjust: exact; }
  #print-report footer { margin-top: 18px; color: #7a887f; font-size: 8px; }
}
