/* TD Supplier AutoPay v1.0.26 monthly multi-bank batch workflow: cache-busted asset */
:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:#18202a;background:#f4f6f8}*{box-sizing:border-box}body{margin:0}.shell{max-width:1050px;margin:0 auto;padding:42px 22px 70px}header{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:26px}h1{font-size:34px;margin:5px 0 8px}h2{margin-top:0}p{line-height:1.6;color:#5e6875}.eyebrow{font-weight:800;letter-spacing:.12em;font-size:13px;color:#28735b}.admin-link,.actions a,.tabs a{text-decoration:none;color:#155eef;font-weight:700}.panel{background:#fff;border:1px solid #e2e6eb;border-radius:18px;padding:24px;margin:18px 0;box-shadow:0 8px 28px rgba(24,32,42,.05)}.upload-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.dropbox{min-height:220px;border:2px dashed #c8d0d9;border-radius:16px;padding:22px;display:flex;flex-direction:column;gap:10px;cursor:pointer;transition:.2s}.dropbox:hover{border-color:#5890ff;background:#f8fbff}.dropbox input{margin-top:auto}.step{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#ecf8f2;color:#247158;font-weight:800}.filename{font-size:13px;color:#7b8591}.primary,button{border:0;border-radius:12px;padding:13px 20px;font-weight:800;cursor:pointer}.primary{display:block;width:100%;margin-top:20px;background:#155eef;color:#fff;font-size:17px}.primary:disabled{opacity:.55;cursor:wait}.progress{display:flex;align-items:center;gap:18px}.spinner{width:34px;height:34px;border:4px solid #dbe3ee;border-top-color:#155eef;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.hidden{display:none!important}.success-mark,.error-mark{width:54px;height:54px;border-radius:50%;display:grid;place-items:center;font-size:30px;font-weight:900}.success-mark{background:#dcf7e8;color:#18794e}.error-mark{background:#fff0ef;color:#c52a20}.summary-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin:18px 0}.summary-grid div{background:#f6f8fa;border-radius:12px;padding:14px}.summary-grid span{display:block;font-size:12px;color:#7b8591;margin-bottom:5px}.summary-grid strong{overflow-wrap:anywhere}.actions{display:flex;gap:14px;margin-top:18px}.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px}.tabs{display:flex;gap:16px;flex-wrap:wrap;margin-bottom:8px}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.settings-grid label{display:flex;flex-direction:column;gap:6px;font-weight:700;font-size:13px}.settings-grid input,.settings-grid textarea,.settings-grid select,.supplier-add input{width:100%;padding:11px 12px;border:1px solid #ccd3db;border-radius:10px;background:#fff;font:inherit}.wide{grid-column:1/-1}.secret-state{padding:12px;background:#f6f8fa;border-radius:10px}.supplier-add{display:grid;grid-template-columns:1.2fr 1.2fr 1fr 1fr auto;gap:10px;margin-bottom:18px}.supplier-add button{background:#18202a;color:#fff}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;font-size:13px}th,td{text-align:left;padding:11px;border-bottom:1px solid #e7eaee;vertical-align:top}th{color:#687382;background:#fafbfc;position:sticky;top:0}.reason{font-size:16px;color:#b42318;font-weight:700}@media(max-width:760px){.upload-grid,.settings-grid,.summary-grid{grid-template-columns:1fr}.supplier-add{grid-template-columns:1fr}.wide{grid-column:auto}header{flex-direction:column}h1{font-size:28px}}
table input,table select{min-width:120px;padding:7px 8px;border:1px solid #d1d7de;border-radius:8px;font:inherit}table button{padding:7px 10px;background:#18202a;color:#fff;border-radius:8px}
.notice{margin:10px 0 16px;padding:11px 13px;border-radius:10px;font-weight:700;font-size:13px}.notice.success{background:#ecfdf3;color:#18794e;border:1px solid #b7ebca}.notice.error{background:#fff1f0;color:#b42318;border:1px solid #ffc9c5}.template-settings{margin-top:16px}.template-upload-form{margin-top:10px;display:flex;gap:10px;align-items:center;flex-wrap:wrap}.template-upload-form input{padding:9px;border:1px solid #ccd3db;border-radius:10px;background:#fff}.template-upload-form button{background:#18202a;color:#fff}

/* v1.0.6 upload / drag / paste / structured-input UI */
.upload-zone { position: relative; min-height: 230px; cursor: default; outline: none; transition: border-color .15s, box-shadow .15s, background .15s; }
.upload-zone.active-zone { box-shadow: 0 0 0 3px rgba(36,111,232,.12); border-color: #246fe8; }
.upload-zone.drag-over { background: #eef6ff; border-color: #246fe8; }
.choose-btn { margin: 12px 0 6px; padding: 9px 14px; border: 1px solid #c9d3e1; border-radius: 9px; background: #fff; cursor: pointer; font-weight: 650; }
.paste-tip { margin: 14px 0 18px; color: #566278; font-size: 14px; }
.file-list { display: grid; gap: 8px; width: 100%; margin-top: 10px; }
.file-chip { display: grid; grid-template-columns: 48px 1fr 32px; gap: 9px; align-items: center; padding: 7px; border: 1px solid #dfe6ef; border-radius: 10px; background: rgba(255,255,255,.75); text-align: left; }
.file-chip img { width: 48px; height: 48px; object-fit: cover; border-radius: 7px; background: #f2f4f7; }
.file-chip b { display: block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.file-chip small { display: block; margin-top: 3px; color: #7b8492; }
.remove-file { border: 0; background: #f0f2f5; border-radius: 50%; width: 27px; height: 27px; font-size: 20px; line-height: 1; cursor: pointer; color: #657080; }
.remove-file:hover { background: #ffe4e4; color: #a82020; }

.structured-panel { margin: 18px 0; border: 1px solid #d9dee7; border-radius: 14px; background: #fbfcfe; }
.structured-panel summary { cursor: pointer; font-weight: 700; padding: 14px 16px; user-select: none; }
.structured-inner { padding: 0 16px 16px; }
.structured-inner p { margin-top: 0; color: #5d6675; line-height: 1.6; }
#structuredData { width: 100%; min-height: 220px; resize: vertical; border: 1px solid #cdd4df; border-radius: 10px; padding: 12px; font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; box-sizing: border-box; background: white; }
#structuredData:focus { outline: 2px solid rgba(36,99,235,.18); border-color: #2463eb; }
.structured-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; color: #5d6675; font-size: 13px; }

/* v1.0.7: structured input is a first-class visible third input area */
.structured-card{margin:18px 0 0;border:1px solid #d9dee7;border-radius:16px;background:#fbfcfe;padding:18px}.structured-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px}.structured-heading>div{display:grid;grid-template-columns:38px 1fr;column-gap:10px;align-items:center}.structured-heading strong{font-size:16px}.structured-heading small{grid-column:2;color:#6b7481;line-height:1.5;margin-top:3px}.structured-heading .secondary{background:#fff;border:1px solid #cfd6df;padding:9px 14px}.structured-status{border-radius:9px;padding:9px 11px;margin-top:9px;font-weight:750}.structured-status[data-state="empty"]{background:#f1f3f5;color:#626b76}.structured-status[data-state="valid"]{background:#ecfdf3;color:#18794e;border:1px solid #b7ebca}.structured-status[data-state="invalid"]{background:#fff1f0;color:#b42318;border:1px solid #ffc9c5}
@media(max-width:760px){.structured-heading{flex-direction:column}.structured-heading .secondary{align-self:flex-start}}

/* v1.0.7 SMTP Setup Mode */
.setup-shell{max-width:720px;margin:0 auto;padding:56px 20px}.setup-panel h1{margin-bottom:8px}.setup-form{display:grid;gap:15px;margin-top:22px}.setup-form label{display:grid;gap:7px;font-weight:750}.setup-form input{width:100%;padding:13px 14px;border:1px solid #cbd3de;border-radius:11px;font:inherit}.setup-form input:focus{outline:2px solid rgba(21,94,239,.16);border-color:#155eef}.setup-server-note{padding:11px 12px;background:#f6f8fa;border-radius:10px;color:#5e6875;font-size:13px}.setup-flow{display:flex;gap:8px;flex-wrap:wrap;margin-top:20px;padding:14px;border-radius:12px;background:#f7f9fc;color:#536071;font-size:13px}.setup-flow b{width:100%;color:#18202a}

/* v1.0.12 Microsoft OAuth setup */
.oauth-panel{margin:18px 0;padding:18px;border:1px solid rgba(120,160,255,.28);border-radius:14px;background:rgba(70,105,180,.08)}
.oauth-status-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px 16px;margin:14px 0;padding:12px;border-radius:10px;background:rgba(255,255,255,.04)}
.setup-actions-inline{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px}.setup-actions-inline form{margin:0}

/* v1.0.15: structured-first + fast critical bank verifier + original bank attachment */
.workflow-note{display:flex;gap:12px;align-items:flex-start;border-left:4px solid #155eef;padding:16px 18px}.workflow-note b{white-space:nowrap;color:#123d91}.workflow-note span{color:#536071;line-height:1.6}.workflow-note code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;background:#eef3ff;padding:2px 5px;border-radius:5px}.structured-primary{border:2px solid #b8cdf8;background:#f8fbff;margin-top:0}.structured-primary .step{background:#e4edff;color:#155eef}.input-grid-secondary{margin-top:18px}.upload-zone em{font-style:normal;font-weight:650;color:#687382;font-size:12px}.bank-required{border-color:#9fc5ac;background:#fbfffc}.bank-required .step{background:#e7f7ec;color:#18794e}.bank-quality{margin-top:8px;padding:9px 10px;border-radius:9px;font-size:12px;font-weight:750}.bank-quality[data-state="empty"]{background:#f1f3f5;color:#626b76}.bank-quality[data-state="good"]{background:#ecfdf3;color:#18794e;border:1px solid #b7ebca}.bank-quality[data-state="bad"]{background:#fff7ed;color:#b54708;border:1px solid #fed7aa}.rules-lock{margin-top:18px;padding:14px 16px;border-radius:12px;background:#fff7ed;border:1px solid #fed7aa;display:grid;gap:6px}.rules-lock b{color:#9a3412}.rules-lock span{color:#6b4d34;line-height:1.55;font-size:13px}

/* v1.0.26 monthly bank batch */
.bank-file-chip{grid-template-columns:48px 1fr 32px}.bank-file-chip span{display:block;margin-top:5px;font-size:13px;font-weight:800;color:#26364a}.bank-file-chip[data-preview-status="READY"]{border-color:#b7ebca;background:#f4fff8}.bank-file-chip[data-preview-status="NEED REVIEW"],.bank-file-chip[data-preview-status="SENDER CHECK FAILED"]{border-color:#ffc9c5;background:#fff8f7}.preview-error{color:#b42318!important}.batch-summary{margin-top:18px;border:1px solid #d8e0ea;border-radius:14px;padding:16px;background:#f8fafc}.batch-summary-title{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:12px}.batch-summary-title>strong{font-size:12px;letter-spacing:.06em;color:#697586}.batch-summary[data-state="ready"]{border-color:#9fd5b2;background:#f5fff8}.batch-summary[data-state="ready"] .batch-summary-title>strong{color:#18794e}.batch-summary[data-state="reading"] .batch-summary-title>strong{color:#155eef}.batch-summary-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.batch-summary-grid>div{padding:10px 12px;border-radius:10px;background:#fff;border:1px solid #edf0f3}.batch-summary-grid span{display:block;color:#7b8591;font-size:11px;margin-bottom:4px}.batch-summary-grid b{font-size:13px}.payment-result-list{color:#4b5868;line-height:1.8}.evidence-gap{display:grid;gap:5px;padding:12px 14px;background:#fff7ed;border:1px solid #fed7aa;border-radius:10px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.actions{flex-wrap:wrap}
@media(max-width:760px){.batch-summary-grid{grid-template-columns:1fr}.batch-summary-title{align-items:flex-start;flex-direction:column}}

/* v1.0.31 duplicate monthly-batch review / preview / audited resend controls */
.actions button{background:#18202a;color:#fff;padding:10px 14px;border-radius:10px}.sent-log-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}.sent-log-actions a{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}.resend-admin{margin-top:10px}.resend-admin form{display:grid;gap:8px;margin-top:8px;min-width:250px}.resend-admin label{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;font-weight:700}.resend-admin input{width:100%;margin-top:5px;padding:8px;border:1px solid #ccd3db;border-radius:8px}.resend-admin button{background:#9f1c14;color:#fff}


/* AutoPay automation control center */
.automation-shell{max-width:1180px}.automation-header-actions{display:flex;gap:14px;align-items:center;flex-wrap:wrap}.automation-header-actions form{margin:0}.secondary{background:#fff;border:1px solid #cfd6df;color:#18202a}.automation-overview{padding:22px}.status-head{display:flex;justify-content:space-between;align-items:center;gap:18px;flex-wrap:wrap}.status-head>div:first-child{display:flex;gap:10px;align-items:center}.status-head strong{font-size:22px}.status-head span:not(.status-dot){color:#6c7684}.status-dot{width:12px;height:12px;border-radius:50%;background:#9aa4b2;display:inline-block}.status-running{background:#155eef;box-shadow:0 0 0 5px rgba(21,94,239,.10)}.status-sent_verified,.status-already_sent{background:#18794e}.status-blocked{background:#b42318}.next-run{padding:9px 12px;background:#f6f8fa;border-radius:10px;color:#536071}.progress-track{height:10px;background:#edf1f5;border-radius:99px;margin:18px 0;overflow:hidden}.progress-fill{height:100%;background:#155eef;border-radius:99px;transition:width .35s}.automation-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.automation-cards>div{border:1px solid #e6eaf0;border-radius:12px;padding:13px;background:#fbfcfd}.automation-cards span{display:block;color:#7b8591;font-size:11px;margin-bottom:5px}.automation-cards b{display:block;overflow-wrap:anywhere}.automation-cards small{display:block;margin-top:4px;color:#7b8591}.automation-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.automation-grid .panel{margin:0}.schedule-form{display:grid;grid-template-columns:1fr 1fr;gap:14px}.schedule-form label{display:grid;gap:6px;font-size:13px;font-weight:750}.schedule-form input[type=number],.schedule-form select{padding:11px;border:1px solid #ccd3db;border-radius:10px;background:#fff;font:inherit}.schedule-toggle{grid-column:1/-1;display:flex!important;align-items:center;gap:8px!important}.schedule-toggle input{width:18px;height:18px}.schedule-meta{grid-column:1/-1;color:#687382;font-size:12px;background:#f6f8fa;padding:10px;border-radius:9px}.schedule-form .primary{grid-column:1/-1;margin-top:0}.control-actions{display:grid;gap:10px}.control-actions form{margin:0}.control-actions button{width:100%;background:#18202a;color:#fff}.control-actions .primary{margin:0;background:#155eef}.control-actions button:disabled{opacity:.5;cursor:not-allowed}.control-note{margin-top:14px;color:#687382;font-size:12px;line-height:1.6;padding:11px 12px;background:#f6f8fa;border-radius:10px}.last-sent-grid{grid-template-columns:repeat(4,1fr)}
@media(max-width:860px){.automation-grid,.automation-cards,.last-sent-grid{grid-template-columns:1fr 1fr}}@media(max-width:620px){.automation-grid,.automation-cards,.last-sent-grid,.schedule-form{grid-template-columns:1fr}.schedule-toggle,.schedule-meta,.schedule-form .primary{grid-column:auto}.status-head{align-items:flex-start}.automation-header-actions{flex-direction:column;align-items:flex-start}}
