.student-payment-editor{padding:20px 0;border-block:1px solid var(--line,#e5e5e5);margin:18px 0 24px;font-size:12px;color:var(--ink,#292d2e)}
.student-payment-heading,.student-payment-plan-heading,.student-payment-row-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.student-payment-heading h3{font-size:13px;font-weight:550;margin:0}
.student-payment-plan{margin-top:18px}.student-payment-plan+.student-payment-plan{border-top:1px solid var(--line,#e5e5e5);padding-top:18px}
.student-payment-plan-heading{align-items:flex-start;flex-wrap:wrap}.student-payment-plan-heading strong,.student-payment-row-heading strong{font-size:12px;font-weight:500}
.student-payment-plan-heading>span,.student-payment-state,.student-payment-received{font-size:11px;color:var(--muted,#6b7475)}
.student-payment-state[data-payment-status=paid]{display:inline-flex;align-items:center;padding:2px 7px;border-radius:4px;background:#dcfce7;color:#166534;font-weight:600;line-height:16px}
.student-payment-row{padding:12px 0;border-bottom:1px solid var(--line,#e5e5e5)}
.student-payment-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;margin-top:9px}
.student-payment-field{display:flex;flex-direction:column;gap:5px;min-width:0}.student-payment-field>span{font-size:11px;color:var(--muted,#6b7475)}
.student-payment-editor .input{box-sizing:border-box;width:100%;min-width:0;font:inherit;padding:8px 9px;background:var(--surface,#fff);border:1px solid var(--line,#dedede);border-radius:6px;color:inherit}
.student-payment-editor .input:focus-visible,.student-payment-editor button:focus-visible{outline:2px solid var(--accent,#247b82);outline-offset:2px}
.student-payment-message{font-size:11px;line-height:1.5;color:var(--muted,#6b7475);margin:8px 0 0}.student-payment-message:empty{display:none}
.student-payment-recovery{display:flex;flex-wrap:wrap;gap:8px}.student-payment-recovery:has(>button:not([hidden])){margin:7px 0 3px}.student-payment-editor [hidden]{display:none!important}
.student-payment-row[data-save-state=error] .student-payment-message{color:#ad4a34}
.student-payment-readonly{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;margin-top:8px}.student-payment-received{display:block;margin-top:5px}
.student-payment-plan>.btn{margin-top:12px}.student-payment-new-plan{margin-top:12px}.student-payment-new-plan>.btn{margin:12px 7px 0 0}
.student-payment-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0;padding-bottom:16px;border-bottom:1px solid var(--line,#e5e5e5)}
.student-payment-summary>div{min-width:0;display:flex;flex-direction:column;gap:6px}.student-payment-summary span{font-size:11px;color:var(--muted,#6b7475)}
.student-payment-summary strong{font-size:16px;font-weight:550;overflow-wrap:anywhere}.student-payment-summary>div:last-child:not([data-payment-due-state=overdue]) strong{font-size:12px;line-height:1.5}
.student-payment-summary>[data-payment-due-state=overdue]{border-left:2px solid currentColor;padding-left:10px;color:#a33932}
.student-payment-summary>[data-payment-due-state=overdue] span{color:inherit}
.student-payment-summary>[data-payment-due-state=overdue] strong{font-weight:600}
.theme-dark .student-payment-summary>[data-payment-due-state=overdue]{color:#f3a69b}
.student-payment-total{max-width:220px;margin:14px 0}.student-payment-unscheduled{color:#965720}.student-payment-unscheduled:empty{display:none}
.student-payment-new-plan h4{font-size:12px;font-weight:550;margin:22px 0 0}.student-payment-create-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:18px}
.student-payment-create-actions>.btn:first-child{background:var(--ink,#292d2e);color:var(--surface,#fff)}
.student-payment-field strong{font-size:12px;font-weight:500}.student-payment-heading{flex-wrap:wrap}
.student-payment-plan-heading:empty{display:none}
@media(max-width:340px){.student-payment-fields,.student-payment-readonly{grid-template-columns:1fr}.student-payment-summary{grid-template-columns:1fr 1fr}}

/* Student context and the schedule share one centered, scrollable workspace. */
body.minimal-calm #drawer:has(.ful-student-details){inset:24px;margin:auto;padding:0;width:min(1160px,calc(100vw - 48px));max-width:calc(100vw - 48px);height:fit-content;max-height:min(900px,calc(100dvh - 48px));border:0;border-radius:8px;overflow:hidden;box-sizing:border-box}
body.minimal-calm #drawer[open]:has(.ful-student-details){animation:none;transform:none}
body.minimal-calm #drawer:has(.ful-student-details) .drawer-head{padding:10px 20px;min-height:48px;box-sizing:border-box}
body.minimal-calm #drawer:has(.ful-student-details) .drawer-head h2{font-size:16px;letter-spacing:0;overflow-wrap:anywhere;margin:0}
body.minimal-calm #drawer:has(.ful-student-details) .drawer-body{padding:16px 20px;min-height:0;flex:0 1 auto;overscroll-behavior:contain}
body.minimal-calm .ful-student-details{display:grid;grid-template-columns:minmax(0,420px) minmax(0,1fr);gap:18px;align-items:start;color:var(--ink)}
body.minimal-calm .ful-student-context{min-width:0;padding-right:18px;border-right:1px solid var(--line)}
body.minimal-calm .ful-student-overview{grid-column:1/-1;min-width:0;border-bottom:1px solid var(--line);padding-bottom:12px}
body.minimal-calm .ful-student-identity-row{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
body.minimal-calm .ful-student-overview .ful-person{min-width:0;max-width:100%}
body.minimal-calm .ful-student-overview .ful-identity{min-width:0;overflow-wrap:anywhere}
body.minimal-calm .ful-student-overview .ful-student-links{display:flex;gap:8px;margin:0;align-items:center}
body.minimal-calm .ful-student-overview .ful-mini-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));max-width:560px;margin:10px 0 0;padding:0;gap:16px;border:0}
body.minimal-calm .ful-student-overview .ful-mini-stats>div{min-width:0}
body.minimal-calm .ful-student-overview .ful-mini-stats strong{font-size:15px;letter-spacing:0;overflow-wrap:anywhere}
body.minimal-calm .ful-student-overview [data-student-trash-action]:has(.icon){width:32px;height:32px;min-height:32px;padding:0;display:inline-flex;align-items:center;justify-content:center;color:var(--secondary)}
body.minimal-calm .ful-student-overview [data-student-trash-action]:hover{color:#a33932}
body.minimal-calm .ful-student-documents{padding-bottom:12px;margin-bottom:12px;border-bottom:1px solid var(--line);min-width:0}
body.minimal-calm .ful-student-documents .forms-student-panel{margin:0;padding:0;border:0}
body.minimal-calm .ful-student-documents .forms-section-head{margin-bottom:8px}
body.minimal-calm .ful-student-documents .forms-student-create{margin-bottom:0}
body.minimal-calm .ful-student-documents .forms-student-record{padding:8px 0}
body.minimal-calm .ful-student-onboarding-summary{display:flex;align-items:center;gap:8px 16px;flex-wrap:wrap;margin-top:12px;font-size:11px}
.student-onboarding-forms-summary{display:flex;gap:8px 16px;flex-wrap:wrap;align-items:center;min-width:0}
.student-onboarding-forms-summary p{margin:0;color:var(--secondary)}
.student-onboarding-item{display:inline-flex;gap:6px;align-items:center;flex-wrap:wrap}
.student-onboarding-state{display:inline-flex;padding:2px 6px;border-radius:4px;background:var(--soft);color:var(--secondary);line-height:16px}
.student-onboarding-state[data-complete=true]{background:#dcfce7;color:#166534;font-weight:550}
body.minimal-calm .ful-student-onboarding-summary [data-view-onboarding]{margin-left:auto;white-space:normal;text-align:left;font-size:11px;min-height:28px;padding:3px 7px}
body.minimal-calm .ful-student-note-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px}
body.minimal-calm .ful-student-details.ful-student-intake-view{display:block;max-width:720px;margin:0 auto}
.student-intake-forms{margin-top:24px;min-width:0;font-size:13px;line-height:1.6;letter-spacing:0;overflow-wrap:anywhere}
.student-intake-form{padding:16px 0;border-bottom:1px solid var(--line)}
.student-intake-form:first-child{padding-top:0}
.student-intake-form summary{cursor:pointer;font-weight:600}
.student-intake-form summary:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.student-intake-form time,.student-intake-match{display:block;font-size:11px;font-weight:400;color:var(--secondary)}
.student-intake-form dl{display:block;margin:20px 0 0;font:inherit}
.student-intake-form dt{font-weight:550;margin-top:20px;white-space:pre-wrap;color:var(--ink)}
.student-intake-form dd{margin:6px 0 0;white-space:pre-wrap;color:var(--secondary)}
body.minimal-calm .ful-student-documents .forms-text-link{overflow-wrap:anywhere;white-space:normal;text-align:left}
body.minimal-calm .ful-student-context .ful-field{margin:0 0 10px;gap:4px}
body.minimal-calm .ful-student-note-grid .ful-field{margin:0;min-width:0}
body.minimal-calm .ful-student-context textarea{min-height:70px;height:70px;padding:7px 9px;box-sizing:border-box}
body.minimal-calm #ful-live-student>p{margin:6px 0 10px;font-size:11px}
body.minimal-calm .ful-student-context .ful-student-actions{margin-top:16px}
body.minimal-calm #ful-student-payment-plan{min-width:0}
body.minimal-calm .ful-student-details .student-payment-editor{margin:0;padding:0;border:0;letter-spacing:0}
body.minimal-calm .ful-student-details .student-payment-plan{margin-top:10px}
body.minimal-calm .student-payment-editor h3{margin:0;font-size:14px}
body.minimal-calm .student-payment-editor .student-payment-summary{margin:10px 0;padding-bottom:10px;gap:16px}
body.minimal-calm .student-payment-editor .student-payment-total{max-width:180px;margin:8px 0 12px}
body.minimal-calm .student-payment-editor .student-payment-columns{display:grid;grid-template-columns:112px minmax(0,1fr) minmax(0,1fr);gap:12px;padding:0 0 6px;font-size:11px;color:var(--secondary);border-bottom:1px solid var(--line)}
body.minimal-calm .student-payment-editor .student-payment-row{display:grid;grid-template-columns:112px minmax(0,1fr);align-items:center;column-gap:12px;row-gap:0;padding:6px 0;min-height:48px;box-sizing:border-box}
body.minimal-calm .student-payment-editor .student-payment-row-heading{display:flex;flex-direction:column;align-items:flex-start;gap:1px;min-width:0;line-height:1.4}
body.minimal-calm .student-payment-editor .student-payment-fields,body.minimal-calm .student-payment-editor .student-payment-readonly{margin:0;gap:12px;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
body.minimal-calm .student-payment-editor .student-payment-row .student-payment-field>span:first-child:not(:last-child){position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
body.minimal-calm .student-payment-editor .student-payment-row .student-payment-field{gap:0}
body.minimal-calm .student-payment-editor .student-payment-row .student-payment-message,body.minimal-calm .student-payment-editor .student-payment-row .student-payment-recovery,body.minimal-calm .student-payment-editor .student-payment-row>.student-payment-received{grid-column:2;margin:4px 0 0}
body.minimal-calm .student-payment-editor .student-payment-recovery:not(:has(>button:not([hidden]))){display:none}
body.minimal-calm .student-payment-editor .student-payment-message{margin:4px 0 0}
body.minimal-calm .student-payment-editor .input{height:36px;padding:7px 9px;border-radius:5px;font-variant-numeric:tabular-nums}
body.minimal-calm .student-payment-editor .student-payment-row-heading .btn{padding:0;min-height:24px;height:24px;border:0;box-shadow:none;font-size:11px;color:var(--secondary)}
body.minimal-calm .student-payment-editor .student-payment-new-plan h4{margin:20px 0 12px}
body.minimal-calm .student-payment-editor .student-payment-received:empty{display:none}
body.minimal-calm .student-payment-editor .student-payment-row:has(.student-payment-row-tools){grid-template-columns:112px minmax(0,1fr) 60px}
body.minimal-calm .student-payment-editor .student-payment-row-heading{grid-column:1;grid-row:1}
body.minimal-calm .student-payment-editor .student-payment-row>.student-payment-fields,body.minimal-calm .student-payment-editor .student-payment-row>.student-payment-readonly{grid-column:2;grid-row:1}
body.minimal-calm .student-payment-editor .student-payment-row-tools{grid-column:3;grid-row:1;display:flex;gap:4px;align-items:center}
body.minimal-calm .student-payment-editor .student-payment-row-tools .btn{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;min-height:28px;padding:0;border:0;box-shadow:none;background:transparent;color:var(--secondary)}
body.minimal-calm .student-payment-editor .student-payment-row-tools .btn:hover{background:var(--soft);color:var(--ink)}
body.minimal-calm .student-payment-editor .student-payment-row-tools .icon{width:14px;height:14px}
body.minimal-calm .student-payment-editor .student-payment-columns:has(+.student-payment-installments .student-payment-row-tools){padding-right:72px}
body.minimal-calm .student-payment-editor .student-payment-remove-confirm{grid-column:1/-1;padding-top:8px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
body.minimal-calm .student-payment-editor .student-payment-remove-confirm p{flex-basis:100%;margin:0}
body.minimal-calm .student-payment-editor .student-payment-remove-confirm [data-payment-action=confirm-remove]{color:#a33932}
body.minimal-calm .student-payment-editor .student-payment-row:has(.student-payment-remove-confirm:not([hidden]))>.student-payment-recovery{display:none}
.payment-date-field{position:relative;min-width:0;width:100%}
body.minimal-calm .student-payment-editor .student-payment-retainer{font-size:12px;color:var(--ink);line-height:1.5}
.student-payment-notes{margin-top:18px;font-size:11px;color:var(--secondary);line-height:1.5;overflow-wrap:anywhere}
.student-payment-notes summary{cursor:pointer;width:fit-content}
.student-payment-notes summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.student-payment-notes p{margin:8px 0 0}
body.minimal-calm .student-payment-editor .payment-date-field .input{padding-right:28px;cursor:pointer}
.payment-date-icon{position:absolute;right:9px;top:50%;transform:translateY(-50%);pointer-events:none;color:var(--secondary);display:flex}
.payment-date-icon .icon{width:14px;height:14px}
#drawer .payment-calendar{--payment-calendar-width:min(294px,calc(100vw - 50px));font-family:inherit;font-size:12px;letter-spacing:0;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:8px;box-shadow:0 8px 28px rgb(20 35 30 / .15);padding:8px;box-sizing:content-box;width:var(--payment-calendar-width)}
#drawer .payment-calendar::before,#drawer .payment-calendar::after{display:none}
#drawer .payment-calendar .flatpickr-days,#drawer .payment-calendar .dayContainer{width:var(--payment-calendar-width);min-width:var(--payment-calendar-width);max-width:var(--payment-calendar-width)}
#drawer .payment-calendar .flatpickr-day{max-width:42px;height:36px;line-height:36px;border-radius:5px;color:var(--ink)}
#drawer .payment-calendar .flatpickr-day.prevMonthDay,#drawer .payment-calendar .flatpickr-day.nextMonthDay{color:var(--secondary);opacity:.55}
#drawer .payment-calendar .flatpickr-day.selected{background:var(--ink);border-color:var(--ink);color:var(--surface)}
#drawer .payment-calendar .flatpickr-day:not(.selected):hover,#drawer .payment-calendar .flatpickr-day:focus{background:var(--soft);border-color:var(--line)}
#drawer .payment-calendar .flatpickr-day.today{border-color:var(--secondary)}
#drawer .payment-calendar .flatpickr-month,#drawer .payment-calendar .flatpickr-current-month,#drawer .payment-calendar .flatpickr-weekday{color:var(--ink);fill:var(--ink)}
#drawer .payment-calendar .flatpickr-current-month{font-size:13px;padding-top:8px}
#drawer .payment-calendar .flatpickr-prev-month,#drawer .payment-calendar .flatpickr-next-month{top:8px;fill:var(--ink);color:var(--ink)}
#drawer .payment-calendar .flatpickr-prev-month{left:8px}#drawer .payment-calendar .flatpickr-next-month{right:8px}
#drawer .payment-calendar .flatpickr-prev-month:hover svg,#drawer .payment-calendar .flatpickr-next-month:hover svg{fill:var(--ink)}
#drawer .payment-calendar .numInputWrapper input{padding:0 4px;font:inherit;height:auto;min-height:0;border:0;border-radius:0;background:transparent}
#drawer .payment-calendar{max-height:calc(100dvh - 80px);overflow-y:auto;overscroll-behavior:contain}
#drawer .payment-calendar .payment-date-shortcuts{border-top:1px solid var(--line);margin-top:8px;padding-top:8px;display:grid;gap:10px}
#drawer .payment-calendar .payment-date-shortcut-group[hidden]{display:none}
#drawer .payment-calendar .payment-date-shortcut-group>span{display:block;font-size:11px;color:var(--secondary);margin-bottom:4px}
#drawer .payment-calendar .payment-date-shortcut-group>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
#drawer .payment-calendar .payment-date-shortcut-group button{font:inherit;font-size:11px;letter-spacing:0;min-width:0;height:30px;padding:0 4px;border:0;border-radius:4px;background:var(--soft);color:var(--ink);cursor:pointer}
#drawer .payment-calendar .payment-date-shortcut-group button:hover{background:var(--line)}
#drawer .payment-calendar .payment-date-shortcut-group button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
@media(max-width:800px){
  body.minimal-calm #drawer:has(.ful-student-details){inset:8px;width:calc(100vw - 16px);max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}
  body.minimal-calm #drawer:has(.ful-student-details) .drawer-head{padding:12px 16px}
  body.minimal-calm #drawer:has(.ful-student-details) .drawer-body{padding:20px 16px}
  body.minimal-calm .ful-student-details{grid-template-columns:minmax(0,1fr);gap:24px}
  body.minimal-calm .ful-student-overview{grid-row:1}
  body.minimal-calm .ful-student-overview .ful-mini-stats{gap:8px}
  body.minimal-calm .ful-student-overview .ful-mini-stats strong{font-size:13px}
  body.minimal-calm .ful-student-context{display:contents}
  body.minimal-calm .ful-student-onboarding-summary{gap:8px 12px}
  body.minimal-calm .ful-student-onboarding-summary [data-view-onboarding]{margin-left:0}
  body.minimal-calm .ful-student-note-grid{grid-template-columns:1fr}
  body.minimal-calm .ful-student-documents{grid-row:2;margin:0;padding-bottom:20px}
  body.minimal-calm #ful-live-student{grid-row:4}
  body.minimal-calm #ful-student-payment-plan{grid-row:3;padding-bottom:24px;border-bottom:1px solid var(--line)}
  body.minimal-calm .student-payment-editor .student-payment-row{grid-template-columns:86px minmax(0,1fr);column-gap:8px}
  body.minimal-calm .student-payment-editor .student-payment-row:has(.student-payment-row-tools){grid-template-columns:86px minmax(0,1fr)}
  body.minimal-calm .student-payment-editor .student-payment-row-tools{grid-column:1;grid-row:2;margin-top:3px}
  body.minimal-calm .student-payment-editor .student-payment-row:has(.student-payment-row-tools)>.student-payment-fields,body.minimal-calm .student-payment-editor .student-payment-row:has(.student-payment-row-tools)>.student-payment-readonly{grid-row:1/3}
  body.minimal-calm .student-payment-editor .student-payment-columns:has(+.student-payment-installments .student-payment-row-tools){padding-right:0}
  body.minimal-calm .student-payment-editor .student-payment-row-heading strong{font-size:11px}
  body.minimal-calm .student-payment-editor .student-payment-columns{grid-template-columns:86px minmax(0,1fr) minmax(0,1fr);gap:8px}
  body.minimal-calm .student-payment-editor .student-payment-fields,body.minimal-calm .student-payment-editor .student-payment-readonly{gap:8px}
  body.minimal-calm .student-payment-editor .student-payment-summary{gap:8px}
  body.minimal-calm .student-payment-editor .student-payment-summary strong{font-size:14px}
  body.minimal-calm .student-payment-editor .student-payment-summary>div:last-child:not([data-payment-due-state=overdue]) strong{font-size:12px}
  body.minimal-calm .student-payment-editor .payment-date-field .input{padding:7px 4px;font-size:11px}
  .payment-date-icon{display:none}
}
@media(min-width:801px) and (max-width:1100px){
  body.minimal-calm .ful-student-details{grid-template-columns:minmax(0,1fr) minmax(0,1.4fr)}
  body.minimal-calm .ful-student-note-grid{grid-template-columns:1fr}
}
@media(min-width:1101px){
  body.minimal-calm .ful-student-overview{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px 24px}
  body.minimal-calm .ful-student-overview .ful-mini-stats{margin:0;max-width:none}
  body.minimal-calm .ful-student-onboarding-summary{grid-column:1/-1;margin-top:0}
}

/* 2026-09-25 simple payments tab in the student pop-up: totals first, one aligned table, one status per row.
   Scoped through #drawer so it wins over student-profile.css and the shared badge look in components.css. */
/* The due date column never drops below a full "May 28, 2026" plus the calendar icon (about 140px);
   the payment and amount columns give way first. */
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor{--pay-cols:minmax(0,.8fr) minmax(0,1fr) minmax(150px,1fr) 124px 32px;--pay-gap:12px;--pay-inset:13px;--pay-input:36px;--pay-late:var(--tone-red,#c2413b);--pay-good:var(--tone-green,#1f8a5b);display:flex;flex-direction:column;font-size:14px}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor>.student-payment-heading{order:1;margin:4px 0 0}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor>.student-payment-heading>[data-payment-action=add-plan]{margin-top:0}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor [data-payment-empty]{margin:0;font-size:14px;color:var(--secondary)}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor>.student-payment-heading h3{display:none}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor>.student-payment-heading:not(:has(>.btn:not([hidden]))){display:none}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-plan{margin:0}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-plan+.student-payment-plan{margin-top:28px;padding-top:0;border:0}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-plan-heading{margin:0 0 10px;font-size:13px;color:var(--secondary)}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-plan>strong{display:block;margin:0 0 8px;font-size:13px;font-weight:600}

/* summary strip: left to pay, received, next due (or overdue), then the editable plan total */
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-strip{display:flex;align-items:stretch;margin:0 0 20px;padding:14px 16px;border-radius:12px;background:var(--soft)}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-summary{flex:1 1 auto;min-width:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:0;padding:0;border:0}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-summary>div{display:flex;flex-direction:column;justify-content:flex-start;gap:4px;min-width:0;padding:0;border:0;color:var(--ink)}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-summary span{font-size:12px;line-height:1.35;color:var(--secondary)}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-summary strong{font-size:17px;font-weight:600;line-height:1.3;letter-spacing:0;font-variant-numeric:tabular-nums;overflow-wrap:normal;color:inherit}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-summary>div:last-child:not([data-payment-due-state=overdue]) strong{font-size:14px;font-weight:500;line-height:1.5}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-summary>[data-payment-due-state=overdue],body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-summary>[data-payment-due-state=overdue] span{color:var(--pay-late)}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-strip>.student-payment-total{flex:0 0 164px;max-width:none;margin:0 0 0 16px;padding:0 0 0 16px;border-left:1px solid var(--line)}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-total>.student-payment-field{gap:4px}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-total>.student-payment-field>span{font-size:12px;line-height:1.35;color:var(--secondary)}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-total{--pay-input:32px}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-total .input{font-weight:600}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-total .student-payment-message{margin:6px 0 0;font-size:12px}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-total .student-payment-recovery .btn{min-height:28px;padding:2px 8px;font-size:12px}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-unscheduled{margin:-10px 0 16px;font-size:13px;color:var(--tone-amber,#965720)}

/* one grid for the header and every row: payment | amount | due date | status | remove */
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-columns{display:grid;grid-template-columns:var(--pay-cols);column-gap:var(--pay-gap);padding:0 0 8px;margin:0;border-bottom:1px solid var(--line);font-size:12px;color:var(--secondary)}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-columns>span:is(:nth-child(2),:nth-child(3)){padding-left:var(--pay-inset)}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor :is(.student-payment-installments,.student-payment-draft-schedule)>.student-payment-row{display:grid;grid-template-columns:var(--pay-cols);align-items:center;column-gap:var(--pay-gap);row-gap:4px;min-height:54px;margin:0;padding:9px 0;border:0;border-bottom:1px solid var(--line);box-sizing:border-box}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-installments>.student-payment-row>.student-payment-row-heading{display:contents}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor :is(.student-payment-installments,.student-payment-draft-schedule)>.student-payment-row [data-payment-label],body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-draft-schedule>.student-payment-row>.student-payment-row-heading{grid-column:1;grid-row:1;min-width:0;font-size:14px;font-weight:500;line-height:1.35}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-installments>.student-payment-row .student-payment-state{grid-column:4;grid-row:1;justify-self:start}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-installments>.student-payment-row:has(>.student-payment-status-control) .student-payment-state{display:none}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-installments>.student-payment-row .student-payment-state[data-payment-status=paid]{--tone:var(--pay-good)}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-row>:is(.student-payment-fields,.student-payment-readonly){grid-column:2/4;grid-row:1;display:grid;grid-template-columns:subgrid;column-gap:var(--pay-gap);margin:0;min-width:0}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-row .student-payment-field{position:relative;display:flex;flex-direction:column;gap:0;min-width:0}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-row .student-payment-field>span:first-child:not(:last-child){position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-readonly>.student-payment-field>:last-child{padding-left:var(--pay-inset);font-size:14px;font-weight:400;line-height:1.4;color:var(--ink);font-variant-numeric:tabular-nums}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-readonly>.student-payment-field:first-child>strong{font-weight:500}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .input{height:var(--pay-input);min-height:var(--pay-input);padding:0 12px;font-size:14px;line-height:1.2;font-variant-numeric:tabular-nums}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .payment-date-field .input{padding-right:34px;cursor:pointer}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .payment-date-icon{display:flex;right:12px}

/* amounts read as money while the value stays a plain number like 2250.00 */
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-field{position:relative}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor :is(.student-payment-plan,.student-payment-new-plan)[data-currency=USD] .student-payment-field:has(>:is([data-payment-field=amount],[data-payment-field=planTotal]))::before{content:'$';position:absolute;left:var(--pay-prefix-left,var(--pay-inset));bottom:0;height:var(--pay-input);display:flex;align-items:center;font-size:14px;color:var(--secondary);pointer-events:none}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor :is(.student-payment-plan,.student-payment-new-plan)[data-currency=USD] :is([data-payment-field=amount],[data-payment-field=planTotal]){padding-left:25px}

/* status: "mark paid" on unpaid rows; paid rows say paid once with a small undo */
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-row>.student-payment-status-control{display:contents}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-status-actions{grid-column:4;grid-row:1;display:flex;align-items:center;gap:6px;min-width:0}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor [data-payment-action=set-paid]{display:inline-flex;align-items:center;justify-content:center;height:32px;min-height:32px;min-width:0;margin:0;padding:0 12px;border:1px solid var(--control-border,var(--line));border-radius:8px;background:var(--surface);box-shadow:none;color:var(--ink);font-size:13px;font-weight:500;text-decoration:none;white-space:nowrap}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor [data-payment-action=set-paid]:hover:not(:disabled){background:var(--soft);border-color:var(--secondary)}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor [data-payment-action=set-paid][aria-pressed=true]{height:28px;min-height:28px;padding:0 6px;border-color:transparent;background:transparent;color:var(--secondary);font-size:12px;font-weight:400;text-decoration:underline;text-underline-offset:3px}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor [data-payment-action=set-paid][aria-pressed=true]:hover:not(:disabled){background:transparent;border-color:transparent;color:var(--ink)}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-paid{display:inline-flex;align-items:center;height:24px;padding:0 9px;border-radius:6px;background:color-mix(in srgb,var(--pay-good) 12%,var(--surface));color:color-mix(in srgb,var(--pay-good) 82%,var(--ink));font-size:12px;font-weight:600;white-space:nowrap}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-row>.student-payment-status-control>.student-payment-message{grid-column:2/-1;margin:0;font-size:12px;color:var(--pay-late)}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-row :is(button,input):disabled{opacity:.55;cursor:default}

/* overdue: unpaid and past its due day */
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-row[data-overdue=true] [data-payment-label]::after{content:'overdue';display:block;margin-top:1px;font-size:12px;font-weight:500;color:var(--pay-late)}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-row[data-overdue=true] .student-payment-fields>.student-payment-field:nth-child(2) :is(input,.payment-date-icon),body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-row[data-overdue=true] .student-payment-readonly>.student-payment-field:nth-child(2)>span:last-child{color:var(--pay-late)}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-row[data-overdue=true] .student-payment-fields>.student-payment-field:nth-child(2) input{border-color:color-mix(in srgb,var(--pay-late) 45%,var(--line))}

/* remove stays in the last column, only on rows that can still change */
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-row>.student-payment-row-tools{grid-column:5;grid-row:1;display:flex;justify-content:center;margin:0}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor [data-payment-action=insert-payment]{display:none}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-row-tools [data-payment-action=remove-payment]{width:32px;height:32px;min-height:32px;border-radius:8px}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-row-tools [data-payment-action=remove-payment]:hover{color:var(--pay-late)}
/* an unsaved row has one remove control: the trash until a save is tried, then "remove unsaved payment" */
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-installments>.student-payment-row:not([data-attempted]):has(>.student-payment-fields):not(:has(>.student-payment-status-control)) [data-payment-action=discard]{display:none}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-installments>.student-payment-row[data-attempted]:has(>.student-payment-fields):not(:has(>.student-payment-status-control)) [data-payment-action=remove-payment]{display:none}

/* per-row notes sit under the amount; saving is announced without making the row jump */
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-row>:is(.student-payment-received,.student-payment-message,.student-payment-recovery,.student-payment-remove-confirm){grid-column:2/-1;margin:0}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-row>.student-payment-received{padding-left:var(--pay-inset);font-size:12px;color:var(--secondary)}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-row>.student-payment-message{font-size:12px}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-row[data-save-state=saving]>.student-payment-message{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-row :is(.student-payment-recovery,.student-payment-remove-confirm) .btn{min-height:30px;padding:2px 10px;font-size:13px}

/* quiet add buttons under the table */
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor :is([data-payment-action=add-payment],[data-payment-action=add-draft-payment],[data-payment-action=add-plan]){display:inline-flex;align-items:center;gap:6px;align-self:flex-start;width:auto;height:32px;min-height:32px;margin:10px 0 0 -8px;padding:0 8px;border:0;border-radius:8px;background:transparent;box-shadow:none;color:var(--secondary);font-size:13px;font-weight:500;text-decoration:none}
/* the plus is drawn, not typed, so the buttons are still named "add payment" and "add payment plan" */
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor :is([data-payment-action=add-payment],[data-payment-action=add-draft-payment],[data-payment-action=add-plan])::before{content:'';flex:none;width:11px;height:11px;background:linear-gradient(currentColor,currentColor) center/100% 1.5px no-repeat,linear-gradient(currentColor,currentColor) center/1.5px 100% no-repeat}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor :is([data-payment-action=add-payment],[data-payment-action=add-draft-payment],[data-payment-action=add-plan]):hover{background:var(--soft);color:var(--ink)}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-plan>[data-payment-action=add-payment]{display:flex;width:max-content}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-notes{margin-top:16px;font-size:12px}

/* new plan form uses the same table without the status column */
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-new-plan{--pay-cols:minmax(0,.8fr) minmax(0,1fr) minmax(0,1fr);margin:0}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-new-plan>.student-payment-fields{display:block;max-width:180px;margin:0 0 4px}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-new-plan>.student-payment-fields .student-payment-field{position:relative;gap:4px}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-new-plan h4{margin:18px 0 8px;font-size:13px;font-weight:600}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-draft-schedule>.student-payment-row>.student-payment-row-heading{display:flex;flex-direction:row;align-items:center;gap:8px}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-draft-schedule>.student-payment-row>.student-payment-row-heading>strong{font-size:14px;font-weight:500}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor [data-payment-action=remove-draft-payment]{height:24px;min-height:24px;padding:0 4px;border:0;background:none;box-shadow:none;color:var(--secondary);font-size:12px;text-decoration:underline;text-underline-offset:3px}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-create-actions{margin-top:16px}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-create-actions>[type=submit]{background:var(--ink);border-color:var(--ink);color:var(--surface)}

@media(max-width:720px){
  /* narrow pop-up: name and status on top, amount and date underneath. The five-column table needs
     about 720px of window to keep a full due date ("Sep 13, 2026") and a readable name and amount. */
  body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor{--pay-cols:minmax(0,1fr) auto 32px;--pay-gap:10px}
  body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-columns{display:none}
  body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-installments>.student-payment-row{padding:12px 0;row-gap:8px}
  body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-installments>.student-payment-row .student-payment-state,body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-status-actions{grid-column:2;justify-self:end}
  body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-row>.student-payment-row-tools{grid-column:3}
  body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-row>:is(.student-payment-fields,.student-payment-readonly){grid-column:1/-1;grid-row:2;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-row>:is(.student-payment-received,.student-payment-message,.student-payment-recovery,.student-payment-remove-confirm),body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-row>.student-payment-status-control>.student-payment-message{grid-column:1/-1}
  body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .payment-date-field .input{padding-right:12px;font-size:14px}
  body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .payment-date-icon{display:none}
  body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-new-plan{--pay-cols:minmax(0,1fr) minmax(0,1fr)}
  body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-draft-schedule>.student-payment-row>.student-payment-row-heading{grid-column:1/-1}
  body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-draft-schedule>.student-payment-row>.student-payment-fields{grid-column:1/-1;grid-row:2}
}
@media(max-width:640px){
  /* phone: the summary strip stacks, one stat per line, plan total last */
  body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-strip{flex-direction:column;padding:12px 14px}
  body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-summary{grid-template-columns:minmax(0,1fr);gap:6px}
  body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-summary>div{flex-direction:row;justify-content:space-between;align-items:baseline;gap:12px}
  body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-summary strong,body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-summary>div:last-child:not([data-payment-due-state=overdue]) strong{font-size:14px;font-weight:600;text-align:right}
  body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-strip>.student-payment-total{flex:none;margin:10px 0 0;padding:10px 0 0;border-left:0;border-top:1px solid var(--line)}
  body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-total>.student-payment-field{flex-direction:row;align-items:center;justify-content:space-between;gap:12px}
  body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-total .input{width:132px}
  body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-total{--pay-prefix-left:calc(100% - 132px + var(--pay-inset))}
}

/* 2026-09-26: the summary strip is a white card with a thin border (no gray fill), like the rest of the pop-up. */
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-strip{background:var(--surface,#fff);border:1px solid var(--line);box-shadow:0 1px 2px rgba(15,23,42,.04)}
/* Reorder: a grip sits just left of each unpaid payment; drag it (or press up / down on it) to move the payment. */
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-installments>.student-payment-row{position:relative}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-grip{position:absolute;left:-24px;top:50%;display:inline-flex;align-items:center;justify-content:center;width:20px;height:28px;min-height:0;margin:0;padding:0;border:0;border-radius:6px;background:transparent;box-shadow:none;color:var(--secondary);opacity:.45;cursor:grab;transform:translateY(-50%);touch-action:none}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-grip svg{fill:currentColor}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-row:hover>.student-payment-grip,body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-grip:focus-visible{opacity:1;background:var(--soft);color:var(--ink)}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-grip:active{cursor:grabbing}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-row[data-dragging="true"]{opacity:.45}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-row[data-drop="before"]{box-shadow:inset 0 2px 0 var(--ink)}
body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-row[data-drop="after"]{box-shadow:inset 0 -2px 0 var(--ink)}
@media(max-width:700px){body.balanced-blue.minimal-calm #drawer .student-profile-simple .student-payment-editor .student-payment-grip{left:-18px;width:16px}}
