:root{
  --gold:#f2ad12;
  --gold-soft:#fff4d6;
  --gold-pale:#fffaf0;
  --ink:#25211c;
  --muted:#6e675e;
  --line:#eadfca;
  --success:#2f9e62;
  --danger:#b33a3a;
  --shadow:0 12px 30px rgba(87,67,32,.09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
*{box-sizing:border-box}
body{margin:0;background:#fffdf9;color:var(--ink)}
button,input{font:inherit}
.topbar{height:92px;display:flex;align-items:center;justify-content:space-between;padding:14px 5vw;background:#fff;border-bottom:1px solid #f1eadf;position:sticky;top:0;z-index:10}
.brand-logo{height:58px;width:auto;max-width:58vw;object-fit:contain}
.security-badge{display:flex;align-items:center;gap:8px;padding:11px 15px;border:1px solid #efd38f;border-radius:18px;background:#fffaf0;color:#8b6510;font-size:12px;font-weight:700;white-space:nowrap}
.shield{display:grid;place-items:center;width:24px;height:24px;border-radius:8px;background:var(--gold);color:#fff}
.app-shell{width:min(760px,100%);margin:0 auto;padding:28px 18px 72px}
.hero h1{font-family:Georgia,"Times New Roman",serif;font-size:clamp(36px,8vw,58px);line-height:1.05;margin:18px 0 10px}
.hero p{margin:0;color:var(--muted);font-size:16px;line-height:1.6}
.stepper{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:30px 0 22px}
.step{position:relative;text-align:center;color:#9e9890;font-size:11px;font-weight:700}
.step:not(:last-child)::after{content:"";position:absolute;top:18px;left:67%;right:-38%;height:2px;background:#e8e3db}
.step span{position:relative;z-index:2;display:grid;place-items:center;width:36px;height:36px;margin:0 auto 7px;border-radius:50%;border:1px solid #dcd7cf;background:#fff;font-size:15px}
.step small{display:block;line-height:1.25}
.step.active,.step.done{color:#b87800}
.step.active span,.step.done span{background:var(--gold);border-color:var(--gold);color:white}
.step.done span::before{content:"✓";font-weight:900}
.step.done span{font-size:0}
.panel{background:#fff;border:1px solid var(--line);border-radius:24px;padding:24px;box-shadow:var(--shadow)}
.panel.hidden{display:none}
.panel-heading h2{font-size:24px;margin:0 0 8px}
.panel-heading p{margin:0 0 22px;color:var(--muted);line-height:1.55}
.lookup-form,.payment-form{display:grid;gap:12px}
label{font-weight:800;font-size:14px}
.phone-input{display:grid;grid-template-columns:72px 1fr;border:1px solid #dcd5ca;border-radius:14px;overflow:hidden;background:#fff}
.country-code{display:grid;place-items:center;font-size:20px;font-weight:800;border-right:1px solid #dcd5ca;background:#fffdf8}
input{width:100%;border:1px solid #dcd5ca;border-radius:13px;padding:15px 16px;background:white;color:var(--ink);outline:none}
.phone-input input{border:0;border-radius:0}
input:focus,.phone-input:focus-within{border-color:var(--gold);box-shadow:0 0 0 3px rgba(242,173,18,.14)}
.example{margin:-4px 0 4px;color:#8c857b;font-size:13px}
.primary-btn,.secondary-btn{width:100%;border:0;border-radius:14px;min-height:54px;display:flex;align-items:center;justify-content:center;text-align:center;padding:14px 18px;font-weight:900;cursor:pointer}
.primary-btn{background:linear-gradient(135deg,#ffc430,#f2a400);color:#291f0c;box-shadow:0 8px 18px rgba(242,164,0,.22)}
.primary-btn:disabled{opacity:.48;cursor:not-allowed;box-shadow:none}
.secondary-btn{background:white;border:1px solid var(--gold);color:#9f6800}
.text-btn{display:block;margin:16px auto 0;background:none;border:0;color:#8d6a19;text-decoration:underline;cursor:pointer}
.message{margin-top:14px;min-height:1.4em;color:var(--danger);font-weight:700}
.student-list{display:grid;gap:16px}
.student-card{border:1px solid #ead7aa;border-radius:20px;padding:20px;background:linear-gradient(135deg,#fffdfa,#fff8e9)}
.student-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;border-bottom:1px dashed #e6c66e;padding-bottom:15px;margin-bottom:16px}
.student-label{font-size:13px;color:#7d756b;font-weight:700}
.student-name{display:block;font-family:Georgia,"Times New Roman",serif;font-size:36px;line-height:1.05;margin-top:4px;font-weight:800}
.student-check{width:24px;height:24px;accent-color:var(--gold);cursor:pointer}.student-card.selected{box-shadow:0 0 0 3px rgba(242,173,18,.16);border-color:#e7b744}
.student-meta{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:16px}
.meta-item span{display:block;color:var(--muted);font-size:12px;margin-bottom:3px}.meta-item strong{font-size:14px}
.amount-due{display:flex;align-items:flex-end;justify-content:space-between;border-top:1px solid #efe1bf;padding-top:14px}.amount-due span{color:var(--muted);font-size:13px}.amount-due strong{font-size:28px;color:#d98900}
.amount-entry{margin-top:16px}.amount-entry label{display:block;margin-bottom:7px}.amount-entry input{font-size:18px;font-weight:800}.fee-breakdown{display:grid;gap:6px;margin:0 0 14px;padding:12px 14px;border-radius:12px;background:#fff;border:1px solid #f0dfb9}.fee-line{display:flex;justify-content:space-between;gap:12px;font-size:13px}.fee-line span{color:var(--muted)}.fee-line strong{font-weight:800}
.balance-line{display:flex;justify-content:space-between;margin-top:8px;font-size:13px;color:var(--muted)}
.total-card{display:flex;justify-content:space-between;align-items:center;margin:20px 0;padding:18px;border-radius:16px;background:var(--gold-soft)}.total-card strong{font-size:25px;color:#c77d00}
.paynow-card{display:grid;grid-template-columns:minmax(145px,44%) 1fr;gap:18px;align-items:center;background:#fffaf0;border:1px solid #efd79d;border-radius:20px;padding:16px;margin-bottom:22px}
.paynow-card img{width:100%;border-radius:13px;background:white}.qr-column{display:grid;gap:10px}.qr-save-btn{display:flex;align-items:center;justify-content:center;min-height:42px;padding:10px 12px;border:1px solid var(--gold);border-radius:12px;background:#fff;color:#8d6200;font-size:13px;font-weight:900;text-decoration:none}.company-suffix{white-space:nowrap;font-size:.92em}.paynow-details h3{font-family:Georgia,"Times New Roman",serif;margin:4px 0 13px;font-size:22px}.eyebrow{margin:0;color:#b27300;font-size:11px;font-weight:900;letter-spacing:.13em}.paynow-details dl{margin:0}.paynow-details dl div{margin-top:10px}.paynow-details dt{font-size:12px;color:var(--muted)}.paynow-details dd{margin:2px 0 0;font-size:17px;font-weight:900}.paynow-details dd#paynow-total{font-size:26px;color:#d98900}
.upload-box{border:2px dashed #d7c9ae;border-radius:15px;padding:22px;background:#fffdfa}.upload-box input{border:0;padding:0}.upload-box span{display:block;color:var(--muted);font-size:12px;margin-top:10px}
.proof-preview{width:100%;max-height:420px;object-fit:contain;border:1px solid var(--line);border-radius:14px;background:#fafafa}.notice{padding:13px 14px;background:#fff8e8;border:1px solid #efddaf;border-radius:13px;font-size:13px;color:#6c5a31;line-height:1.5}
.success-title{display:flex;gap:13px;align-items:flex-start;padding:15px;border-radius:16px;background:#eaf8ef;border:1px solid #b9e3c8}.success-title h2{margin:0;font-size:22px}.success-title p{margin:5px 0 0;color:#557461}.success-check{display:grid;place-items:center;flex:0 0 34px;height:34px;border-radius:50%;background:var(--success);color:#fff;font-weight:900;font-size:20px}
.summary-student{margin-top:16px;border:1px solid #ead7aa;border-radius:16px;padding:16px}.summary-student h3{font-family:Georgia,"Times New Roman",serif;font-size:28px;margin:0 0 10px}.summary-student dl,.summary-details{display:grid;grid-template-columns:1fr 1fr;gap:8px 14px}.summary-student dt,.summary-details dt{color:var(--muted);font-size:12px}.summary-student dd,.summary-details dd{margin:0;font-weight:800;text-align:right}.summary-details{margin:18px 0;padding:16px;background:#fffaf0;border-radius:16px}.contact-box{display:grid;gap:7px;padding:15px;border:1px solid var(--line);border-radius:14px;font-size:13px}.receipt-note{padding:14px;text-align:center;background:#fffaf0;border-radius:13px;font-size:13px;color:#655c50;line-height:1.5}.summary-actions{display:grid;gap:12px;margin-top:18px}
footer{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 20px;padding:24px 18px 36px;border-top:1px solid #efe8dd;color:#71695e;font-size:12px;text-align:center}
@media (max-width:560px){.topbar{height:80px;padding:12px 14px}.brand-logo{height:48px;max-width:54vw}.security-badge{font-size:9px;line-height:1.15;padding:8px 10px;max-width:42vw;white-space:normal}.shield{width:21px;height:21px;flex:0 0 21px}.app-shell{padding:20px 13px 56px}.hero h1{font-size:38px}.step small{font-size:9px}.step span{width:31px;height:31px}.step:not(:last-child)::after{top:15px}.panel{padding:18px;border-radius:20px}.panel-heading h2{font-size:21px}.student-meta{grid-template-columns:1fr}.student-name{font-size:38px}.paynow-card{grid-template-columns:1fr}.paynow-card img{max-width:310px;margin:auto}.summary-student dl,.summary-details{grid-template-columns:1fr 1fr}}

.proof-preview.hidden{display:none!important}
.validation-message{padding:12px 14px;border-radius:12px;background:#fff2f2;border:1px solid #efbcbc;color:#9f2f2f;line-height:1.45}
.rejection-box{margin-top:12px;padding:16px 18px;border:1px solid #e4a4a4;border-radius:12px;background:#fff3f3;color:#333;line-height:1.55}.rejection-box strong{display:block;color:#9f2424;margin-bottom:10px}.rejection-box ul{margin:0 0 10px 20px;padding:0}.rejection-box li{margin:7px 0}.rejection-box p{margin:8px 0 0;font-weight:600}

/* V12.5 visual and mobile-save refinements */
.upload-box{display:flex!important;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:12px;padding:24px}.visually-hidden-file{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important}.upload-file-btn{display:inline-flex!important;justify-content:center;align-items:center;min-width:230px;min-height:52px;font-size:16px;cursor:pointer}.admin-header-actions{margin-left:auto;display:flex;gap:10px;align-items:center}.admin-home-btn{text-decoration:none;display:inline-flex;align-items:center;justify-content:center}.table-scroll{max-height:62vh;overflow:auto}.table-scroll thead th{position:sticky;top:0;z-index:3}.deep-yellow{color:#b78300!important}


/* V13.1 — shared read-only AI Assistant */
.sph-ai-button{position:relative;display:inline-flex!important;align-items:center;justify-content:center;overflow:visible!important}
.sph-ai-star{position:absolute;left:-10px;top:-12px;width:25px;height:25px;object-fit:contain;filter:drop-shadow(0 2px 3px #0003);pointer-events:none}
.sph-ai-modal{position:fixed;inset:0;z-index:100000;background:rgba(30,24,13,.58);display:flex;align-items:center;justify-content:center;padding:18px}
.sph-ai-modal.hidden{display:none!important}
.sph-ai-card{width:min(940px,96vw);height:min(84vh,820px);background:#fff;border:1px solid #eadfc9;border-radius:20px;box-shadow:0 24px 70px #0004;padding:20px;display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;gap:12px;overflow:hidden}
.sph-ai-modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;border-bottom:1px solid #eee6d8;padding-bottom:12px}
.sph-ai-modal-head h2{margin:0 0 5px;font-size:24px}.sph-ai-modal-head p{margin:0;color:#6b6258;font-size:13px;max-width:650px}
.sph-ai-head-actions{display:flex;align-items:center;gap:9px;flex:0 0 auto}.sph-ai-close{width:38px;height:38px;border:1px solid #e4d5b9;border-radius:11px;background:#fff;color:#5a451d;font-size:28px;line-height:1;cursor:pointer;display:grid;place-items:center}.sph-ai-close:hover{background:#fff5d6}
.sph-ai-chat{min-height:0;overflow-y:auto;overscroll-behavior:contain;border:1px solid #eadfc9;border-radius:15px;background:#f8f6f1;padding:16px;scrollbar-gutter:stable}
.sph-ai-msg{width:fit-content;max-width:84%;padding:11px 14px;border-radius:14px;margin:9px 0;white-space:pre-wrap;line-height:1.55;overflow-wrap:anywhere}
.sph-ai-assistant{background:#fff;border:1px solid #ece5d9;margin-right:auto;color:#27231e}.sph-ai-user{background:#fff0bb;border:1px solid #f0d47b;margin-left:auto;color:#30250d}
.sph-ai-status{min-height:20px;color:#8a6b28;font-size:13px;padding:0 3px}
.sph-ai-compose{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:stretch}.sph-ai-compose textarea{width:100%;height:154px;min-height:154px;max-height:154px;resize:none;border:1px solid #d9c9aa;border-radius:14px;background:#fff;padding:13px 14px;font:inherit;line-height:1.45}.sph-ai-compose textarea:focus{outline:2px solid #f2c55266;border-color:#dba91f}.sph-ai-send{width:92px;align-self:stretch;border-radius:14px}
@media(max-width:700px){.sph-ai-card{height:92vh;padding:14px}.sph-ai-modal-head{gap:8px}.sph-ai-modal-head p{display:none}.sph-ai-head-actions .secondary-btn{padding:8px 10px}.sph-ai-compose{grid-template-columns:1fr}.sph-ai-compose textarea{height:125px;min-height:125px;max-height:125px}.sph-ai-send{width:100%;min-height:44px}.sph-ai-msg{max-width:92%}}

/* V17.2: screenshot selection stays inside its upload box. */
#proof-upload-box .hidden{display:none!important}
#proof-status{margin:0;font-size:14px;line-height:1.5;color:#6c5a31}
#proof-status:empty{display:none}
#replace-proof{margin:0;min-height:44px}
#frasers-notice p{margin:8px 0 0}
#frasers-notice a{color:inherit;text-decoration:underline}
