/* V14 uses the approved compact two-month calendar. Do NOT change calendar structure. */
#calendar-main .month-card .stats{margin-bottom:5px!important;gap:5px!important}
#calendar-main .month-card .stat{padding:8px 2px!important;min-width:0!important}
#calendar-main .month-card .stat span,
#calendar-main .month-card .td14-total-label{display:block;font-size:clamp(10px,2.45vw,13px)!important;line-height:1.25;font-weight:650!important;letter-spacing:0}
#calendar-main .month-card .stat strong,
#calendar-main .month-card .td14-total-amount{display:block;font-size:clamp(14px,3.25vw,19px)!important;line-height:1.25;font-weight:750!important;letter-spacing:-.025em;font-variant-numeric:tabular-nums}
#calendar-main .month-card .stat strong small{font-size:.59em!important;font-weight:500!important;display:inline!important;margin-left:1px!important}
#calendar-main .td14-total{display:flex;align-items:center;justify-content:space-between;gap:6px;min-height:39px;background:#e8f3fa;color:#174b60;border-radius:9px;padding:8px 9px;margin-bottom:10px}
#calendar-main .td14-total-label{min-width:0;white-space:nowrap}
#calendar-main .td14-total-amount{min-width:0;text-align:right;white-space:nowrap;font-size:clamp(12px,2.9vw,18px)!important}
#calendar-main .td14-total.is-loading{color:#61786f;background:#eff5f1}
#calendar-main .td14-total.is-loading .td14-total-amount{font-size:12px!important}
#account-btn{display:none!important}
/* Hide historical multi-action admin login in the day popup; new cost editor uses 8-digit PIN. */
#sheet-content.td14-enriched .action-stack,#sheet-content.td14-enriched .action-heading,#sheet-content.td14-enriched .sheet-footer-note{display:none!important}
.td14-day-card{border:1px solid #d8e9e0;background:#f7fbf8;border-radius:15px;padding:12px;margin:12px 0 4px;color:#234736}
.td14-day-title{font-weight:760;font-size:16px;margin-bottom:7px}
.td14-day-grid{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px 10px;font-size:13px;line-height:1.3}
.td14-day-grid span{color:#648276}.td14-day-grid strong{text-align:right;font-size:14px;font-variant-numeric:tabular-nums}
.td14-emphasis{padding:9px 0;border-top:1px solid #dfeee5;margin-top:10px}
.td14-card-action{display:flex;align-items:center;justify-content:center;width:100%;background:#0b8256;color:white;border:0;border-radius:13px;min-height:50px;font-weight:700;font-size:15px;margin-top:12px;cursor:pointer}
.td14-batch-sheet{font-family:inherit;max-width:570px;margin:0 auto;color:#194132}
.td14-batch-header{border:1px solid #daebdf;border-radius:15px;padding:13px;background:#f7fbf8;margin:4px 0 10px}
.td14-batch-header h3{font-size:18px;font-weight:750;margin:0 0 7px}.td14-note{font-size:12px;color:#688475;line-height:1.35;margin:7px 0}
.td14-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:11px 0;border-bottom:1px solid #edf3ef}
.td14-row span{color:#617c70;font-size:14px}.td14-row b{font-size:14px;font-variant-numeric:tabular-nums}
.td14-summary{border-radius:13px;background:#e2f5e9;padding:13px;margin:14px 0}
.td14-summary .td14-row{border-color:#cae6d8}.td14-summary .td14-row:last-child{border:0}
.td14-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 9px;margin-top:10px}
.td14-field{display:flex;flex-direction:column;gap:5px;min-width:0;font-size:13px;color:#496d5c;font-weight:650}
.td14-field input{width:100%;min-width:0;height:48px;border:1px solid #cbddd3;border-radius:12px;background:#fff;font-family:inherit;font-size:16px;font-weight:600;line-height:1.2;color:#183b30;padding:7px 10px;box-sizing:border-box;font-variant-numeric:tabular-nums}
.td14-field input:focus{outline:2px solid #7bc9a4;outline-offset:1px}
.td14-field.wide{grid-column:1/-1}
.td14-form-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr);gap:9px;grid-column:1/-1}
.td14-form-actions button{min-height:50px;border-radius:12px;border:1px solid #bcdacd;background:white;color:#0a7e4e;font-size:15px;font-weight:700}
.td14-form-actions button[type=submit]{background:#077e52;border-color:#077e52;color:#fff}
.td14-error{color:#b03826;font-size:13px;line-height:1.5;grid-column:1/-1}
.td14-editor{border-radius:15px;border:1px solid #cddfd2;padding:12px;margin:12px 0;background:#fff}
@media(max-width:370px){#calendar-main .month-card .stat span,#calendar-main .month-card .td14-total-label{font-size:10px!important}#calendar-main .month-card .stat strong{font-size:14px!important}#calendar-main .td14-total{padding:7px 6px;gap:4px}#calendar-main .td14-total-amount{font-size:12px!important}}
@media(prefers-reduced-motion:reduce){.td14-card-action{transition:none!important}}

#sheet-content.td14-enriched>.hint{display:none!important}

/* V14.2: standardized icons and readable single-column cost details. */
.td14-icon-line{display:grid;grid-template-columns:22px minmax(0,1fr) auto;align-items:center;gap:9px;padding:10px 0;border-bottom:1px solid #e4ede7;color:#59756a;font-size:14px}
.td14-icon-line:last-child{border-bottom:0}
.td14-icon-line strong{color:#174331;font-size:14px;white-space:nowrap;text-align:right;font-variant-numeric:tabular-nums}
.td14-icon{display:inline-flex;width:20px;height:20px;align-items:center;color:#4c8574}
.td14-icon svg{width:20px;height:20px;stroke-linecap:round;stroke-linejoin:round}
.td14-day-emphasis{border-top:1px solid #dce9e0;margin-top:4px;padding-top:5px}
.td14-day-emphasis .td14-icon-line{font-weight:650}
.td14-day-emphasis .td14-icon-line strong{font-size:15px}
.td14-batch-header .td14-icon-line{padding:9px 0}
.td14-costs{border-radius:14px;border:1px solid #dfebe4;padding:0 12px;background:white}
.td14-cost-item{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:11px 0;border-bottom:1px solid #e5eee8}
.td14-cost-item:last-child{border-bottom:0}
.td14-cost-copy{display:flex;flex-direction:column;min-width:0;gap:3px}
.td14-cost-copy>strong{font-size:14px;color:#244838}
.td14-cost-copy small{font-size:12px;color:#688374;line-height:1.3}
.td14-cost-item>b{white-space:nowrap;font-size:14px;color:#1c4b3d;font-variant-numeric:tabular-nums}
@media(max-width:355px){.td14-icon-line{font-size:12px;gap:6px}.td14-icon-line strong{font-size:12px}.td14-day-emphasis .td14-icon-line strong{font-size:13px}.td14-cost-item>b{font-size:12px}}

/* V14.5 — compact two-screen day → batch detail (mobile first) */
.td145-day{display:grid;gap:12px;padding:2px 0 8px}
.td145-count{font-size:13px;color:#617970;font-weight:650;padding:0 2px}
.td145-event{appearance:none;-webkit-appearance:none;border:1px solid #dceae3;background:#fff;border-radius:18px;padding:15px 14px;text-align:left;width:100%;color:#153a31;font:inherit;display:block;cursor:pointer}
.td145-event:active{background:#f2faf5}.td145-event:focus-visible{outline:3px solid #338d65;outline-offset:2px}
.td145-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.td145-top strong{font-size:17px;font-weight:750;flex:1;min-width:130px}
.td145-type{font-size:12px;font-weight:700;border-radius:9px;padding:6px 9px;white-space:nowrap}
.td145-type.intake{color:#965018;background:#fff0dc}.td145-type.sale{color:#126742;background:#e0f5e9}
.td145-chevron{font-size:22px;color:#46856a}
.td145-fields>div,.td145-money>div{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 0;border-bottom:1px solid #e7eee9}
.td145-fields span,.td145-money span{font-size:14px;color:#637a70}
.td145-fields b,.td145-money b{font-size:14px;font-weight:710;text-align:right;font-variant-numeric:tabular-nums}
.td145-money{background:#eaf8f0;border-radius:13px;margin-top:10px;padding:7px 12px}
.td145-money>div:last-child{border:0}.td145-money b{font-size:16px;color:#076943}
.td145-open{display:flex;justify-content:center;gap:8px;padding:13px 6px 1px;font-size:14px;font-weight:720;color:#087248}
.td145-empty{padding:20px;color:#5b746b}
.td145-back{display:block;background:#ecf6f1;border:0;border-radius:12px;padding:11px 13px;margin:0 0 14px;color:#0e714e;font:inherit;font-size:14px;font-weight:700;min-height:44px;cursor:pointer}
@media(max-width:355px){.td145-event{padding:12px 10px}.td145-top strong{font-size:15px}.td145-fields b,.td145-fields span{font-size:12px}.td145-money b{font-size:14px}}


/* V15: faithfully implemented two-view batch details and edit bottom sheet.
   Main calendar, expense page and bottom navigation are intentionally unchanged. */
.td15-layer,.td15-editor-back{font-family:inherit;position:fixed;inset:0;z-index:1200;box-sizing:border-box}
.td15-layer *, .td15-editor-back *{box-sizing:border-box}
.td15-layer{background:#f3faf7;display:flex;justify-content:center;overscroll-behavior:contain}
.td15-page{width:100%;max-width:560px;height:100dvh;min-height:0;display:flex;flex-direction:column;background:#f4faf7;color:#102f2d}
.td15-pagehead{background:#f4faf7;flex:none;min-height:72px;display:grid;grid-template-columns:46px minmax(0,1fr) 46px;align-items:center;gap:8px;padding:calc(12px + env(safe-area-inset-top)) 18px 10px}
.td15-pagehead h2{margin:0;font-size:clamp(19px,5vw,24px);font-weight:780;letter-spacing:-.025em;text-align:center;line-height:1.16;color:#0d3831}
.td15-back{width:44px;height:44px;border:0;background:transparent;color:#0c5945;border-radius:12px;display:grid;place-items:center}
.td15-back .td15-icon{width:30px;height:30px}
.td15-icon{width:23px;height:23px;display:inline-block;flex-shrink:0}
.td15-scroll{overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;min-height:0;flex:1;padding:10px 15px 23px;scrollbar-width:thin}
.td15-card{background:#fff;border-radius:20px;border:1px solid #d9ebe5;box-shadow:0 6px 20px #255f4810;padding:16px 15px;margin-bottom:12px}
.td15-batch-title{display:flex;gap:9px;align-items:center;padding-bottom:12px;border-bottom:1px solid #e0ebe6}
.td15-batch-title h3{font-size:clamp(19px,5vw,23px);margin:0;letter-spacing:-.035em;color:#0a332b;font-weight:780;min-width:0;flex:1}
.td15-duck-mark{background:#e5f6ed;color:#0b7c55;display:grid;place-items:center;border-radius:50%;width:57px;height:57px;flex:none}
.td15-duck-mark .td15-icon{width:38px;height:38px;stroke-width:1.7}
.td15-pill{font-size:12px;white-space:nowrap;border-radius:30px;background:#e0f6ea;color:#0a915a;font-weight:700;padding:8px 9px}
.td15-data-line{display:grid;grid-template-columns:29px minmax(0,1fr) auto;align-items:center;gap:8px;min-height:49px;border-bottom:1px solid #e5edf0;font-size:15px}
.td15-data-line:last-child{border-bottom:0}
.td15-line-icon{display:grid;place-items:center;color:#658396}
.td15-line-icon .td15-icon{width:22px;height:22px}
.td15-line-label{color:#607987}
.td15-data-line strong{font-weight:650;color:#182a48;text-align:right;font-size:15px;font-variant-numeric:tabular-nums;white-space:nowrap}
.td15-money-card{border-radius:18px;padding:8px 14px;background:#e2f8ed;margin-bottom:12px}
.td15-money-card .td15-data-line{min-height:54px;border-color:#c9e7da}
.td15-money-card .td15-line-label{font-weight:650;color:#124736}
.td15-money-card .td15-data-line strong{font-size:clamp(17px,5vw,22px);font-weight:800;color:#093d33}
.td15-money-card .td15-line-icon{color:#078b5c}
.td15-expense-card h3{font-size:22px;margin:0 0 5px;color:#11342e;font-weight:760}
.td15-cost-line{display:grid;grid-template-columns:43px minmax(0,1fr) auto;gap:9px;align-items:center;min-height:67px;border-top:1px solid #e4ebf1;padding:11px 0}
.td15-cost-emoji{display:grid;place-items:center;width:37px;height:37px;font-size:28px;color:#c94b68}
.td15-cost-copy{display:flex;flex-direction:column;gap:3px;min-width:0}
.td15-cost-copy strong{font-weight:630;font-size:15px;color:#172c4b}
.td15-cost-copy small{font-size:12px;color:#688094}
.td15-cost-line b{color:#1b2948;font-size:15px;font-weight:700;white-space:nowrap;font-variant-numeric:tabular-nums}
.td15-primary{width:100%;min-height:56px;background:#078b62;color:#fff;font-size:17px;font-weight:780;border:0;border-radius:15px;display:flex;align-items:center;justify-content:center;gap:12px;cursor:pointer;margin-top:4px}
.td15-primary .td15-icon{width:25px;height:25px;stroke-width:2.1}
.td15-footnote{font-size:11px;line-height:1.4;color:#6b8477;margin:13px 4px 4px}
.td15-tabbar{flex:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:center;padding:10px 18px max(11px,env(safe-area-inset-bottom));border-top:1px solid #deebe6;background:#fff}
.td15-tabbar button{min-height:57px;display:flex;flex-direction:column;align-items:center;justify-content:center;border:0;border-radius:14px;background:#e7f8ef;color:#05714d;font-size:14px;gap:3px;font-weight:700}
.td15-tabbar button+button{background:transparent;color:#688580}
.td15-switch{margin:0 0 13px;font-size:13px;color:#51766a}
.td15-switch>span{display:block;margin-bottom:6px}
.td15-switch>div{display:flex;gap:7px;flex-wrap:wrap}
.td15-switch button{min-height:43px;padding:8px 11px;border-radius:12px;border:1px solid #c9e4d4;background:#fff;color:#1c624c;font-size:14px;font-weight:700}
.td15-switch button[aria-pressed="true"]{background:#0d8155;color:#fff;border-color:#0d8155}
.td15-editor-back{z-index:1400;display:flex;justify-content:center;align-items:flex-end;background:#13262584;overscroll-behavior:contain}
.td15-editor-sheet{background:#fff;display:flex;flex-direction:column;width:100%;max-width:560px;max-height:94dvh;border-radius:26px 26px 0 0;padding:0 15px max(env(safe-area-inset-bottom),12px);color:#113b32;box-shadow:0 -12px 30px #162e2829}
.td15-handle{width:47px;height:5px;border-radius:20px;background:#aec5c2;margin:11px auto 13px;flex:none}
.td15-editor-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;margin-bottom:8px}
.td15-editor-heading h2{font-size:clamp(21px,5vw,27px);font-weight:790;letter-spacing:-.025em;margin:0;color:#073b30;line-height:1.18}
.td15-editor-heading button{background:transparent;border:0;display:grid;place-items:center;color:#0c5040;min-width:44px;min-height:44px}
.td15-editor-scroll{overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;min-height:0;flex:1;padding:4px 1px 7px}
.td15-editor-barn{display:flex;align-items:center;gap:12px;margin-bottom:10px}
.td15-editor-barn .td15-duck-mark{width:57px;height:57px}
.td15-editor-barn strong{display:block;font-size:19px;font-weight:760}
.td15-editor-barn small{display:block;font-size:13px;color:#748c92;margin-top:3px}
.td15-input-list{border:1px solid #dfeaf0;border-radius:17px;padding:4px 12px;background:#fff}
.td15-field{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);align-items:center;gap:7px;border-bottom:1px solid #e4ebef;padding:6px 0;min-height:52px;color:#41616c;font-size:14px}
.td15-field:last-child{border-bottom:0}
.td15-star{color:#d33427}
.td15-inputbox{display:flex;align-items:center;border-radius:11px;background:#f3f8f7;min-width:0}
.td15-inputbox input{min-width:0;flex:1;width:100%;font:inherit;font-size:17px;border:1px solid #d1e1e7;background:#fff;border-radius:11px;padding:10px 9px;color:#102d50;min-height:44px;outline-offset:1px}
.td15-inputbox small{flex:none;min-width:47px;text-align:center;padding:0 6px;font-size:11px;color:#68828b}
.td15-pin{display:block;background:#fff8ed;border-radius:16px;margin:12px 0;padding:12px 13px}
.td15-pin-header{display:flex;align-items:center;gap:8px;font-weight:700;font-size:16px;color:#244c41}
.td15-pin-header .td15-icon{width:20px;color:#087657}
.td15-pin b{color:#d33427}
.td15-pin-control{display:flex;align-items:center;margin-top:8px;border:1px solid #cfe0e5;border-radius:11px;background:#fff;min-height:49px}
.td15-pin-control input{font-size:18px;padding:10px 12px;flex:1;width:100%;min-width:0;border:0;background:transparent;outline:none}
.td15-pin-control button{flex:none;background:transparent;border:0;min-width:44px;height:42px;color:#728892;display:grid;place-items:center}
.td15-form-error{color:#b33123;font-size:13px;min-height:0;line-height:1.4;padding:3px 2px}
.td15-editor-buttons{flex:none;display:grid;grid-template-columns:1fr 1fr;gap:11px;background:#fff;padding-top:9px}
.td15-editor-buttons button{min-height:51px;border-radius:12px;border:1px solid #8bcab4;background:#fff;color:#0c7855;font-size:17px;font-weight:750}
.td15-editor-buttons .td15-submit{background:#058a60;color:#fff;border-color:#058a60}
.td15-editor-buttons .td15-submit:disabled{opacity:.5}
@media(max-width:365px){.td15-pagehead{padding-left:11px;padding-right:11px}.td15-scroll{padding-left:10px;padding-right:10px}.td15-card{padding:13px 11px}.td15-batch-title h3{font-size:18px}.td15-duck-mark{width:46px;height:46px}.td15-data-line{font-size:13px;gap:5px}.td15-data-line strong{font-size:13px}.td15-cost-line{grid-template-columns:33px minmax(0,1fr) auto;gap:6px}.td15-cost-emoji{width:30px;font-size:24px}.td15-cost-copy strong,.td15-cost-line b{font-size:13px}.td15-cost-copy small{font-size:11px}.td15-money-card .td15-data-line strong{font-size:16px}.td15-field{font-size:12px}.td15-inputbox input{font-size:15px}.td15-inputbox small{min-width:42px;font-size:10px}}
@media(min-width:740px){.td15-layer{background:#1d3c3466;align-items:center}.td15-page{height:min(94vh,930px);border-radius:21px;overflow:hidden;box-shadow:0 15px 80px #122a222e}.td15-editor-back{align-items:center}.td15-editor-sheet{border-radius:25px;max-height:88dvh;box-shadow:0 15px 60px #10261c61}}
@media(prefers-reduced-motion:reduce){.td15-layer *,.td15-editor-back *{scroll-behavior:auto!important;transition:none!important}}
