/* New Beginnings Finance v4.2 — debt management workspace */

.debt-v42-page{display:grid;gap:22px}.debt-v42-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.debt-v42-head h2{margin:0 0 6px;font-size:clamp(1.55rem,2.5vw,2.1rem)}.debt-v42-head p{margin:0;color:var(--muted);max-width:760px}.debt-add-button{white-space:nowrap;box-shadow:0 10px 25px rgba(190,18,60,.2)}
.debt-metric-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}.debt-metric-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px;min-height:112px;display:flex;flex-direction:column;justify-content:space-between;box-shadow:var(--shadow-sm)}.debt-metric-card span{color:var(--muted);font-size:.78rem;font-weight:700;text-transform:uppercase;letter-spacing:.045em}.debt-metric-card strong{font-size:1.35rem;line-height:1.1}.debt-metric-card small{color:var(--muted);font-size:.76rem}.debt-metric-card.alert{border-color:#fecaca;background:#fff8f8}.debt-metric-card.positive{border-color:#bbf7d0;background:#f7fff9}
.debt-filter-panel{background:#fff;border:1px solid var(--line);border-radius:18px;padding:14px;display:grid;grid-template-columns:repeat(6,minmax(120px,1fr));gap:10px;align-items:end}.debt-filter-panel label{display:grid;gap:6px;font-size:.76rem;font-weight:700;color:var(--muted)}.debt-filter-panel select,.debt-filter-panel input{width:100%;border:1px solid var(--line);border-radius:10px;padding:9px 10px;background:#fff;color:var(--text);font:inherit}.debt-filter-panel .filter-actions{display:flex;align-items:center;gap:8px}
.debt-attention-panel{background:#fff;border:1px solid var(--line);border-radius:20px;padding:18px;box-shadow:var(--shadow-sm)}.debt-attention-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;gap:14px}.debt-attention-head h3{margin:0}.debt-attention-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px}.debt-attention-toggle{display:inline-flex;align-items:center;gap:6px;border:1px solid transparent;border-radius:8px;padding:6px 8px;background:transparent;color:#6b4774;font:inherit;font-size:.78rem;font-weight:800;cursor:pointer;transition:background .18s ease,color .18s ease}.debt-attention-toggle:hover{background:#f3edf5;color:#51355a}.debt-attention-toggle:focus-visible{outline:3px solid rgba(112,72,120,.2);outline-offset:2px}.debt-attention-toggle-icon{font-size:1rem;line-height:.8;transition:transform .24s ease}.debt-attention-panel.is-collapsed .debt-attention-toggle-icon{transform:translateY(-1px)}.debt-alert-list{display:grid;gap:9px;max-height:1200px;overflow:hidden;opacity:1;transition:max-height .3s ease,opacity .22s ease,margin-top .3s ease}.debt-attention-panel.is-collapsed .debt-attention-head{margin-bottom:0}.debt-attention-panel.is-collapsed .debt-alert-list{max-height:0;margin-top:-12px;opacity:0;pointer-events:none}.debt-alert-row{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;padding:12px;border:1px solid var(--line);border-radius:14px;background:#fff}.debt-alert-dot{width:11px;height:11px;border-radius:50%;background:#64748b}.debt-alert-row[data-severity="critical"] .debt-alert-dot{background:#b91c1c}.debt-alert-row[data-severity="urgent"] .debt-alert-dot{background:#ea580c}.debt-alert-row[data-severity="attention"] .debt-alert-dot{background:#d97706}.debt-alert-copy strong{display:block;margin-bottom:2px}.debt-alert-copy small{color:var(--muted)}
.debt-section-block{display:grid;gap:12px}.debt-section-title{display:flex;justify-content:space-between;align-items:flex-end;gap:12px}.debt-section-title h3{margin:0}.debt-section-title span{color:var(--muted);font-size:.82rem}.debt-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.debt-v42-card{--debt-accent:#be123c;background:#fff;border:1px solid var(--line);border-top:4px solid var(--debt-accent);border-radius:20px;padding:17px;display:grid;gap:14px;box-shadow:var(--shadow-sm);position:relative;overflow:hidden}.debt-v42-card.draft{border-style:dashed;background:#fffbeb}.debt-card-header{display:flex;justify-content:space-between;gap:12px}.debt-card-title{display:flex;gap:11px;min-width:0}.debt-card-title h3{margin:1px 0 3px;font-size:1.03rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.debt-card-title p{margin:0;color:var(--muted);font-size:.78rem}.debt-card-icon{width:39px;height:39px;border-radius:12px;background:color-mix(in srgb,var(--debt-accent) 12%,white);color:var(--debt-accent);display:grid;place-items:center;flex:0 0 auto}.debt-card-icon svg{width:21px;height:21px}.debt-status-pill{display:inline-flex;align-items:center;border-radius:999px;padding:5px 8px;background:#f1f5f9;font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.03em;height:max-content}.debt-status-pill.overdue,.debt-status-pill.default,.debt-status-pill.delinquent{background:#fee2e2;color:#991b1b}.debt-status-pill.draft{background:#fef3c7;color:#92400e}.debt-card-balance span{display:block;color:var(--muted);font-size:.76rem}.debt-card-balance strong{font-size:1.65rem}.debt-card-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.debt-card-meta div{background:#f8fafc;border-radius:11px;padding:9px}.debt-card-meta span{display:block;color:var(--muted);font-size:.68rem;margin-bottom:2px}.debt-card-meta strong{font-size:.86rem}.debt-progress-label{display:flex;justify-content:space-between;color:var(--muted);font-size:.72rem}.debt-card-actions{display:flex;justify-content:space-between;align-items:center;gap:8px}.debt-card-actions .text-button{padding-left:0}.debt-structure-preview{display:flex;gap:6px;flex-wrap:wrap}.debt-structure-preview span{font-size:.7rem;border:1px solid var(--line);border-radius:999px;padding:4px 7px;background:#fafafa}
.debt-wizard-dialog{width:min(1120px,calc(100vw - 24px));max-width:none;border:0;padding:0;border-radius:24px;box-shadow:0 28px 80px rgba(15,23,42,.3);background:#fff}.debt-wizard-dialog::backdrop{background:rgba(15,23,42,.55);backdrop-filter:blur(3px)}.debt-wizard-shell{min-height:min(760px,calc(100vh - 32px));display:grid;grid-template-rows:auto 1fr auto}.debt-wizard-header{padding:20px 24px 15px;border-bottom:1px solid var(--line);display:grid;gap:14px}.debt-wizard-header-row{display:flex;justify-content:space-between;align-items:flex-start;gap:18px}.debt-wizard-header h2{margin:2px 0 0}.debt-wizard-header p{margin:0;color:var(--muted);font-size:.78rem}.debt-wizard-progress{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}.debt-wizard-progress button{border:0;background:transparent;padding:0;display:grid;gap:5px;text-align:left;cursor:pointer}.debt-wizard-progress i{height:5px;border-radius:99px;background:#e2e8f0}.debt-wizard-progress button.active i,.debt-wizard-progress button.complete i{background:#be123c}.debt-wizard-progress span{font-size:.66rem;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.debt-wizard-progress button.active span{color:#881337;font-weight:800}.debt-wizard-body{padding:24px;overflow:auto}.debt-wizard-step{max-width:940px;margin:0 auto;display:grid;gap:20px}.debt-step-intro h3{margin:0 0 6px;font-size:1.35rem}.debt-step-intro p{margin:0;color:var(--muted)}.debt-wizard-footer{padding:14px 22px;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:12px;background:#fff;position:sticky;bottom:0}.debt-wizard-footer>div{display:flex;gap:8px}.debt-draft-note{display:flex;align-items:center;color:var(--muted);font-size:.75rem}.debt-selection-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.debt-select-card{border:1px solid var(--line);border-radius:16px;background:#fff;padding:16px;text-align:left;display:grid;gap:8px;cursor:pointer;transition:border-color .18s,transform .18s,box-shadow .18s}.debt-select-card:hover{transform:translateY(-1px);box-shadow:var(--shadow-sm)}.debt-select-card.selected{border:2px solid #be123c;background:#fff7f9;box-shadow:0 0 0 3px rgba(190,18,60,.08)}.debt-select-card .select-icon{width:42px;height:42px;border-radius:13px;background:#f1f5f9;display:grid;place-items:center;color:#475569}.debt-select-card.selected .select-icon{background:#ffe4e6;color:#be123c}.debt-select-card strong{font-size:.96rem}.debt-select-card span{font-size:.76rem;color:var(--muted);line-height:1.35}.debt-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.debt-form-grid .full{grid-column:1/-1}.debt-field{display:grid;gap:6px}.debt-field label,.debt-field>span{font-size:.76rem;color:var(--muted);font-weight:800}.debt-field input,.debt-field select,.debt-field textarea{width:100%;border:1px solid var(--line);border-radius:11px;padding:10px 11px;background:#fff;color:var(--text);font:inherit}.debt-field textarea{min-height:92px;resize:vertical}.debt-field input:focus,.debt-field select:focus,.debt-field textarea:focus{outline:3px solid rgba(190,18,60,.13);border-color:#be123c}.debt-help{color:var(--muted);font-size:.72rem;line-height:1.4}.debt-inline-check{display:flex;align-items:center;gap:9px;border:1px solid var(--line);border-radius:12px;padding:10px 12px}.debt-inline-check input{width:auto}.debt-panel{border:1px solid var(--line);border-radius:17px;padding:16px;background:#fff;display:grid;gap:13px}.debt-panel h4{margin:0}.debt-panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.debt-repeat-list{display:grid;gap:12px}.debt-repeat-card{border:1px solid #dbe2ea;border-radius:15px;padding:14px;background:#fbfdff;display:grid;gap:12px}.debt-repeat-head{display:flex;justify-content:space-between;align-items:center}.debt-repeat-head strong{font-size:.88rem}.debt-sublist{display:grid;gap:9px;margin-left:18px;padding-left:14px;border-left:3px solid #e2e8f0}.debt-mini-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.debt-discrepancy{padding:11px 12px;border:1px solid #fed7aa;border-radius:12px;background:#fff7ed;color:#9a3412;font-size:.8rem}.debt-review-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}.debt-review-card{border:1px solid var(--line);border-radius:14px;padding:13px;background:#fff}.debt-review-card span{display:block;color:var(--muted);font-size:.7rem;margin-bottom:4px}.debt-review-card strong{font-size:.94rem}.debt-missing-list{display:grid;gap:6px}.debt-missing-item{display:flex;gap:8px;align-items:center;padding:9px;border-radius:10px;background:#fff7ed;color:#9a3412;font-size:.78rem}
.debt-detail-shell{display:grid;gap:18px}.debt-detail-hero{--debt-accent:#be123c;background:linear-gradient(135deg,color-mix(in srgb,var(--debt-accent) 10%,white),#fff);border:1px solid color-mix(in srgb,var(--debt-accent) 25%,white);border-radius:19px;padding:18px;display:grid;grid-template-columns:auto 1fr auto;gap:15px;align-items:center}.debt-detail-hero .debt-card-icon{width:52px;height:52px}.debt-detail-hero h3{margin:1px 0;font-size:1.55rem}.debt-detail-hero p{margin:2px 0 0;color:var(--muted)}.debt-detail-tabs{display:flex;gap:4px;overflow:auto;border-bottom:1px solid var(--line)}.debt-detail-tabs button{border:0;background:transparent;padding:11px 13px;font:inherit;font-size:.78rem;font-weight:750;color:var(--muted);border-bottom:3px solid transparent;white-space:nowrap;cursor:pointer}.debt-detail-tabs button.active{color:#9f1239;border-color:#be123c}.debt-detail-content{display:grid;gap:14px}.debt-detail-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.debt-detail-stat{border:1px solid var(--line);border-radius:13px;padding:12px;background:#fff}.debt-detail-stat span{display:block;color:var(--muted);font-size:.69rem}.debt-detail-stat strong{font-size:1rem}.debt-table{width:100%;border-collapse:collapse;font-size:.78rem}.debt-table th,.debt-table td{padding:10px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}.debt-table th{color:var(--muted);font-size:.67rem;text-transform:uppercase;letter-spacing:.04em}.debt-structure-tree{display:grid;gap:10px}.debt-tree-group{border:1px solid var(--line);border-radius:14px;overflow:hidden}.debt-tree-group summary{padding:12px 14px;cursor:pointer;background:#f8fafc;font-weight:800}.debt-tree-children{padding:10px;display:grid;gap:7px}.debt-tree-item{display:flex;justify-content:space-between;gap:12px;padding:9px 10px;border-radius:10px;background:#fff;border:1px solid #eef2f7}.debt-simple-chart{height:180px;border:1px solid var(--line);border-radius:15px;background:linear-gradient(to top,#f8fafc,#fff);padding:14px;position:relative}.debt-simple-chart svg{width:100%;height:100%;overflow:visible}.debt-simple-chart polyline{fill:none;stroke:#be123c;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1000;stroke-dashoffset:1000;animation:debtDraw .45s ease forwards}.debt-simple-chart circle{fill:#fff;stroke:#be123c;stroke-width:2}.debt-subdialog{border:0;border-radius:20px;padding:0;width:min(620px,calc(100vw - 24px));box-shadow:0 26px 70px rgba(15,23,42,.28)}.debt-subdialog::backdrop{background:rgba(15,23,42,.5)}.debt-subdialog-shell{padding:20px;display:grid;gap:16px}.debt-subdialog-head{display:flex;justify-content:space-between;align-items:flex-start}.debt-subdialog-head h3{margin:0}.debt-subdialog-actions{display:flex;justify-content:flex-end;gap:8px}.debt-danger-note{font-size:.74rem;color:#9f1239;background:#fff1f2;border-radius:10px;padding:9px}
@keyframes debtDraw{to{stroke-dashoffset:0}}@keyframes debtRise{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}.debt-v42-card,.debt-metric-card,.debt-alert-row{animation:debtRise .3s ease both}
@media(max-width:1180px){.debt-metric-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.debt-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.debt-filter-panel{grid-template-columns:repeat(3,minmax(0,1fr))}.debt-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.debt-v42-head{display:grid}.debt-add-button{width:100%}.debt-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.debt-card-grid{grid-template-columns:1fr}.debt-filter-panel{grid-template-columns:1fr 1fr}.debt-selection-grid{grid-template-columns:1fr}.debt-form-grid,.debt-mini-grid,.debt-review-grid{grid-template-columns:1fr}.debt-wizard-dialog{width:100vw;height:100dvh;max-height:none;border-radius:0}.debt-wizard-shell{min-height:100dvh;max-height:100dvh}.debt-wizard-header{padding:14px 15px 10px}.debt-wizard-body{padding:16px 14px}.debt-wizard-progress{overflow-x:auto;grid-template-columns:repeat(7,90px);padding-bottom:4px}.debt-wizard-footer{padding:11px 12px;position:sticky;bottom:0}.debt-wizard-footer .debt-draft-note{display:none}.debt-wizard-footer>div{flex:1}.debt-wizard-footer button{min-height:44px;flex:1}.debt-detail-hero{grid-template-columns:auto 1fr}.debt-detail-hero>div:last-child{grid-column:1/-1;display:flex;gap:8px}.debt-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.debt-alert-row{grid-template-columns:auto 1fr}.debt-alert-row button{grid-column:2}.debt-attention-head{align-items:flex-start;flex-direction:column}.debt-attention-actions{width:100%;justify-content:space-between}.debt-filter-panel{grid-template-columns:1fr}.debt-sublist{margin-left:4px}.debt-table{min-width:700px}.debt-table-wrap{overflow:auto}}
@media(prefers-reduced-motion:reduce){.debt-v42-card,.debt-metric-card,.debt-alert-row,.debt-simple-chart polyline{animation:none!important;transition:none!important}.debt-select-card:hover{transform:none}}
.debt-lifecycle-rail{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:8px 0}.debt-lifecycle-chip,.debt-lifecycle-flag{display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;background:#fff1f2;color:#9f1239;font-size:.7rem;font-weight:700}.debt-lifecycle-chip.is-standing{background:#881337;color:#fff}.debt-lifecycle-chip.is-history{background:#fff7ed;color:#9a3412}.debt-lifecycle-chip.is-overlay{background:#f5f3ff;color:#6d28d9}.debt-lifecycle-chip.is-info{background:#eff6ff;color:#1d4ed8}.debt-lifecycle-chip.is-neutral{background:#f1f5f9;color:#475569}.debt-lifecycle-consequences{margin-top:14px;padding:12px;border-radius:10px;background:#fff7ed;color:#9a3412}.debt-lifecycle-consequences p{margin:5px 0 0}.debt-lifecycle-flags{display:flex;flex-wrap:wrap;gap:7px;margin-top:14px}.debt-lifecycle-panel .debt-panel-head{align-items:flex-start}.debt-card-ops{display:flex;justify-content:flex-end;margin-top:7px}.debt-lifecycle-impact{grid-column:1/-1;padding:10px 12px;border:1px solid #bfdbfe;border-radius:10px;background:#eff6ff;color:#1e3a8a;font-size:.84rem;line-height:1.4}.debt-lifecycle-confirmation{grid-column:1/-1;display:flex;align-items:flex-start;gap:9px;padding:10px 2px;color:#334155;font-size:.86rem;line-height:1.4}.debt-lifecycle-confirmation input{width:18px;height:18px;margin-top:1px;accent-color:#881337}@media(max-width:720px){.debt-card-ops{width:100%;justify-content:stretch;margin-top:2px}.debt-card-ops .text-button{width:100%;min-height:46px;border:1px solid #cbd5e1;border-radius:9px;background:#fff;text-align:center}.record-dialog .dialog-header .icon-button{width:46px;min-width:46px;height:46px;min-height:46px}.debt-lifecycle-confirmation{padding-bottom:6px}}
.debt-strategy-panel{display:grid;gap:14px;padding:20px;background:#fff;border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow-sm)}.debt-strategy-panel h3{margin:0 0 4px}.debt-strategy-panel p{margin:0;color:var(--muted);line-height:1.45}.debt-strategy-panel form{display:grid;gap:6px;justify-items:start}.debt-strategy-panel form label{font-size:.78rem;font-weight:800;color:var(--muted)}.debt-strategy-panel form>div{display:flex;align-items:center;gap:8px}.debt-strategy-panel input{width:140px;padding:10px;border:1px solid var(--line);border-radius:10px;font:inherit}.debt-strategy-panel form span{font-weight:800}.debt-strategy-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.debt-strategy-cards article{display:grid;gap:5px;padding:15px;border:1px solid var(--line);border-radius:14px;background:#f8fafc}.debt-strategy-cards span{font-size:.75rem;font-weight:800;color:var(--muted)}.debt-strategy-cards strong{font-size:1.3rem}.debt-strategy-cards small{color:var(--muted)}.debt-strategy-panel .debt-strategy-note{color:var(--text);font-size:.85rem}.debt-strategy-panel .debt-strategy-disclaimer{font-size:.76rem}.debt-strategy-excluded{font-size:.82rem}.debt-strategy-excluded summary{cursor:pointer;font-weight:750}.debt-strategy-excluded li{margin:5px 0}.debt-strategy-panel .debt-strategy-warning{font-size:.82rem;color:#92400e}@media(max-width:720px){.debt-strategy-cards{grid-template-columns:1fr}.debt-strategy-panel form>div{flex-wrap:wrap}}
