/* Smart Cashflow v20: modern minimal transaction entry; existing warm/brown theme preserved */
:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-record-form {display:grid; gap:22px;}
:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-record-top {padding:2px 0 20px;border-bottom:1px solid var(--line,#e8e5e3);display:grid;gap:18px;}
:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-type-area {max-width:none;width:100%;}
:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-type-area>div.flex {max-width:none;width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;}
:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-type-area>div.flex>button{width:100%;min-height:48px;}
:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-account-pair {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;}
:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-account-pair #account-area-from, :is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-account-pair #account-area-to {margin:0;padding:0;border:0;min-width:0;}
:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-account-pair #account-area-to.hidden {display:none;}
:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-record-bottom {display:grid;grid-template-columns:1.15fr .9fr .9fr;grid-template-areas:'cat date freq' 'details amount amount'; gap:20px 22px;}
:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-field{min-width:0;display:flex;flex-direction:column;gap:8px;}
:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-field>label,:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-field-label {font-size:12px;font-weight:600;color:var(--secondary,#6f6460);margin:0 0 4px;letter-spacing:-0.01em;}
:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-category{grid-area:cat;}:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-date{grid-area:date;}:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-frequency{grid-area:freq;}
:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-details{grid-area:details;}:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-amount{grid-area:amount;}
:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-field .mb-3{margin-bottom:0!important;}
:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-field select,:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-field input:not([type=checkbox]),:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-field textarea {width:100%;min-height:48px;margin:0!important;border-radius:11px;}
:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-category .ts-wrapper,:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-category .ts-wrapper.single{width:100%;}
:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-category .ts-control{width:100%;min-height:48px!important;border:1px solid var(--line,#e1e5eb)!important;border-radius:11px!important;background:#fff!important;display:flex;align-items:center;padding:8px 12px!important;}
:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-category .ts-control input{min-height:auto!important;padding:0!important;border:0!important;box-shadow:none!important;background:transparent!important;}
:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-date-wrap{position:relative;display:flex;align-items:center;}
:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-date-wrap input[type=text]{padding-right:46px!important;}
:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-date-picker-btn{position:absolute;right:10px;top:50%;transform:translateY(-50%);width:28px;height:28px;border:0;background:transparent;color:var(--secondary,#806F68);font-size:18px;line-height:1;display:grid;place-items:center;cursor:pointer;}
:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-native-date{position:absolute;left:0;top:0;width:1px;height:1px;opacity:0;pointer-events:none;}
:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-details {align-self:start;}
:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-details textarea {flex:none!important;height:68px!important;min-height:68px!important;max-height:68px!important;resize:none!important;overflow-y:auto;}
:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-amount input{font-size:32px;min-height:68px!important;text-align:right;}
:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-amount p{font-size:12px;color:var(--muted,#8b817d);line-height:1.55;margin:2px 0 0;}
:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-record-footer{border-top:1px solid var(--line,#e8e5e3);padding-top:18px;display:flex;justify-content:space-between;gap:14px;align-items:center;}
:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-record-footer #tx-message{font-size:12px;margin:0;}
:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-record-footer #tx-save{max-width:260px;width:100%;margin:0;}
:is(#view-transactions,.sc-drawer,#modal-statement-edit) #account-area-from button,:is(#view-transactions,.sc-drawer,#modal-statement-edit) #account-area-to button {min-height:42px;}
@media (min-width:1000px){:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-record-top:has(#account-area-to:not(.hidden)) .sc-type-area{max-width:none;width:100%;}}
@media (max-width:900px){:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-record-bottom{grid-template-columns:1fr 1fr;grid-template-areas:'cat cat' 'date freq' 'details amount';}}
@media (max-width:620px){:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-account-pair,:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-record-bottom{grid-template-columns:1fr;grid-template-areas:none;}:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-record-bottom>.sc-field{grid-area:auto;}:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-record-footer{flex-direction:column;align-items:stretch;}:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-record-footer #tx-save{max-width:none;}}

:is(#view-transactions,.sc-drawer,#modal-statement-edit) .sc-type-area .sc-field-label,:is(#view-transactions,.sc-drawer,#modal-statement-edit) #label-account-from{font-size:14px;font-weight:700;color:var(--brown,#493f3d);}

.sc-edit-record-form{padding:0}.sc-edit-record-form .sc-record-top{margin-bottom:10px}.sc-edit-record-form .sc-record-footer{border-top:1px solid var(--line);padding-top:16px;margin-top:12px}.sc-edit-record-form .sc-account-pick{min-height:44px}.sc-edit-record-form .sc-chip-active{background:var(--brown);border-color:var(--brown);color:#fff;box-shadow:0 2px 8px rgba(0,0,0,.06)}.sc-edit-record-form .sc-chip{background:#fff;border:1px solid #ddd3ce;color:var(--secondary)}.sc-edit-record-form .sc-chip:hover{border-color:#b7aca7}.sc-edit-record-form .sc-account-chip-active{border:2px solid var(--brown);background:#f8f5f3;color:var(--brown)}.sc-edit-record-form .sc-account-chip{background:#fff;border:1px solid #ddd3ce;color:var(--secondary)}

/* v40 — keep the edit form identical to the add-forecast form. */
#modal-statement-edit .sc-record-form{display:grid;gap:22px}
#modal-statement-edit .sc-type-area{max-width:580px;width:100%}
#modal-statement-edit .sc-type-area>div.flex{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
#modal-statement-edit .sc-type-area>div.flex button{width:100%;min-height:46px}
#modal-statement-edit .sc-account-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
#modal-statement-edit .sc-account-pair>div{min-width:0}
#modal-statement-edit .sc-record-bottom{display:grid;grid-template-columns:1.15fr .9fr .9fr;grid-template-areas:'cat date freq' 'details amount amount';gap:20px 22px}
#modal-statement-edit .sc-category{grid-area:cat}
#modal-statement-edit .sc-date{grid-area:date}
#modal-statement-edit .sc-frequency{grid-area:freq}
#modal-statement-edit .sc-details{grid-area:details}
#modal-statement-edit .sc-amount{grid-area:amount}
#modal-statement-edit .sc-record-footer{display:block}
#modal-statement-edit .sc-record-footer>div{display:flex;justify-content:space-between;align-items:center}
#modal-statement-edit #statement-edit-category{min-height:48px;border:1px solid #e1e5eb;border-radius:11px}
#modal-statement-edit #statement-edit-frequency:disabled{opacity:1;background:#f7f6f5;color:#6f6460}
@media(max-width:900px){#modal-statement-edit .sc-record-bottom{grid-template-columns:1fr 1fr;grid-template-areas:'cat cat' 'date freq' 'details amount'}}
@media(max-width:620px){#modal-statement-edit .sc-account-pair,#modal-statement-edit .sc-record-bottom{grid-template-columns:1fr;grid-template-areas:none}#modal-statement-edit .sc-record-bottom>.sc-field{grid-area:auto}#modal-statement-edit .sc-type-area{max-width:none}}

/* v50: reusable live summary at the bottom of the record form */
:is(#view-transactions,.sc-drawer) .sc-record-footer{flex-wrap:wrap;}
:is(#view-transactions,.sc-drawer) .sc-entry-summary{flex:1;min-width:0;display:flex;flex-direction:column;gap:7px;}
:is(#view-transactions,.sc-drawer) .sc-entry-summary-title{font-size:13px;font-weight:700;color:#493f3d;}
:is(#view-transactions,.sc-drawer) .sc-entry-summary-values{display:flex;gap:8px 15px;flex-wrap:wrap;color:#6b6160;font-size:12px;line-height:1.6;}
:is(#view-transactions,.sc-drawer) .sc-entry-summary-values .sc-entry-part{display:inline-flex;gap:5px;align-items:baseline;min-width:0;overflow-wrap:anywhere;}
:is(#view-transactions,.sc-drawer) .sc-entry-summary-values .sc-entry-key{color:#8a817e;}
:is(#view-transactions,.sc-drawer) .sc-entry-summary-values .sc-entry-value{font-weight:600;color:#493f3d;}
:is(#view-transactions,.sc-drawer) .sc-entry-feedback{width:100%;font-size:12px;margin:0;min-height:0;color:#6b6160;}
:is(#view-transactions,.sc-drawer) .sc-entry-feedback:empty{display:none;}
@media(max-width:620px){:is(#view-transactions,.sc-drawer) .sc-record-footer #tx-save{max-width:none;}}
