:root{font-family:Inter,"Noto Sans TC","Microsoft JhengHei",sans-serif;color:#17304b;background:#f3f6fa;color-scheme:light;font-synthesis:none;font-size:15px;line-height:1.65}
*{box-sizing:border-box}html{scroll-padding-top:20px}body{margin:0}button,input,textarea,select{font:inherit}
button,a{touch-action:manipulation}button,.button{cursor:pointer;border:1px solid transparent;border-radius:9px;padding:9px 16px;font-weight:650;color:#17304b;background:#e9eff6;min-height:42px;line-height:1.5}
.button{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
button:hover,.button:hover{filter:brightness(.96)}button:disabled{opacity:.6;cursor:wait}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #68a5f4;outline-offset:2px}
.primary{background:#175dba;color:#fff}.quiet{background:#fff;border-color:#cbd7e5}.danger{color:#a52632;background:#fff1f2;border-color:#efc2c5}
header{min-height:82px;padding:16px max(24px,calc((100vw - 1320px)/2));background:#fff;border-bottom:1px solid #dce4ee;display:flex;align-items:center;justify-content:space-between;gap:20px}
.brand{display:flex;align-items:center;gap:12px;font-size:22px;font-weight:750;color:#17304b;text-decoration:none;white-space:nowrap}.brand span{font-size:14px;font-weight:500;margin-left:10px;color:#526982}
main{max-width:1320px;margin:auto;padding:30px 24px}h1{font-size:27px;line-height:1.35;margin:7px 0 10px}h2{font-size:22px;line-height:1.4;margin:0}p{margin:8px 0}.muted,.hint{color:#536a82}.small,.hint{font-size:13px}
.card{background:#fff;border:1px solid #dce4ee;border-radius:15px;padding:24px;box-shadow:0 4px 16px #18324c04}.login{max-width:510px;margin:35px auto 65px;padding:35px}
.eyebrow{font-size:12px;font-weight:750;letter-spacing:1.1px;color:#175dba;margin:0 0 4px}.login form{margin-top:24px;display:grid;gap:16px}
.login aside{background:#f3f7fc;border-radius:9px;padding:17px;margin-top:26px;font-size:14px;color:#526982}a{color:#175dba}
label{display:grid;gap:6px;font-size:14px;font-weight:600}
input,textarea,select{width:100%;border:1px solid #becddd;border-radius:8px;padding:10px 12px;background:#fff;color:#17304b;min-width:0}
select{min-height:44px}input:disabled,textarea:disabled,select:disabled{background:#eff3f7;color:#526982;opacity:1}textarea{resize:vertical}
.pagehead{display:flex;align-items:center;justify-content:space-between;gap:30px;margin-bottom:18px}.pagehead .button{white-space:nowrap}
.sectionnav{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 22px}.sectionnav a{padding:7px 13px;background:#fff;border:1px solid #cbd7e5;border-radius:8px;text-decoration:none;font-size:14px;font-weight:650}
.sectionhead{display:flex;align-items:center;justify-content:space-between;gap:18px}.sectionhead>button{white-space:nowrap}.sectionintro{max-width:950px;font-size:14px;margin:12px 0 19px}
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:22px}.stat{padding:15px 20px;border:1px solid #dce4ee;border-radius:12px;background:#fff;color:#536a82;font-size:13px}.stat strong{display:block;color:#17304b;font-size:26px;line-height:1.4}
.toolbar{display:flex;gap:14px;align-items:end;justify-content:space-between;margin-bottom:19px}.search{max-width:400px;width:100%}.applicationtools{justify-content:flex-start}.applicationtools>label:last-child{min-width:185px}
.tablewrap{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:14px}th{font-size:12px;color:#536a82;background:#f4f7fb;padding:11px 14px;white-space:nowrap}td{padding:16px 14px;border-bottom:1px solid #e8edf4;vertical-align:top;color:#17304b}
.email{font-weight:650;overflow-wrap:anywhere}.accountnote{font-size:12px;color:#536a82;max-width:350px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6;margin-top:3px}
.badge{display:inline-block;border-radius:30px;font-size:12px;font-weight:650;padding:3px 10px;white-space:nowrap}.badgestack{display:flex;gap:5px;flex-wrap:wrap;min-width:110px}
.good{background:#e6f6ee;color:#176845}.off{background:#fbe9e9;color:#9b343a}.expired,.pending{background:#fff1d8;color:#79500d}
.rowactions{display:flex;gap:7px;flex-wrap:wrap;min-width:175px}.rowactions button{font-size:12px;padding:5px 9px;min-height:34px}
.applicationsTable td:last-child button{white-space:nowrap;font-size:13px}.empty{padding:28px 10px;text-align:center;color:#536a82}
.accounts{margin-top:22px}.accounts>.small,#applicationCount{margin:17px 0 0}
.audit{margin-top:22px}.audit summary{cursor:pointer;font-weight:650}.auditrow{display:grid;grid-template-columns:170px 220px 1fr;gap:15px;padding:10px 0;border-bottom:1px solid #e8edf4;font-size:13px;overflow-wrap:anywhere}
footer{padding-top:28px;font-size:12px;color:#536a82;text-align:center}footer a{margin-left:15px}
#notice{border-radius:10px;font-size:14px;max-width:100%;white-space:pre-wrap}#notice:not(:empty){padding:13px 18px;background:#e7f0ff;border:1px solid #c0d6f6;margin-bottom:20px}#notice.error,.formerror{color:#9b343a;background:#fff0f0;border:1px solid #efc2c5}.formerror{padding:11px 14px;border-radius:8px}
dialog{width:min(560px,calc(100vw - 32px));border:1px solid #dce4ee;border-radius:15px;padding:26px;color:#17304b;background:#fff;max-height:calc(100dvh - 32px);overflow:auto;box-shadow:0 20px 80px #17304b30}
dialog::backdrop{background:#17304b66}#reviewDialog{width:min(720px,calc(100vw - 32px))}
.dialoghead{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:3px}dialog form{display:grid;gap:17px}.dialoghead button{font-size:18px;line-height:1;padding:8px;min-height:36px;min-width:36px}
.formrow{display:grid;grid-template-columns:1fr 1.5fr;gap:17px}.check{display:flex;align-items:flex-start;font-weight:500;gap:10px}.check input{width:18px;height:18px;flex:0 0 18px;accent-color:#175dba;margin:3px 0}
.confirmation{padding:13px 15px;background:#f3f7fc;border:1px solid #cbd7e5;border-radius:9px}.actions{display:flex;justify-content:flex-end;gap:10px;margin-top:3px;flex-wrap:wrap}
.applicationDetails{display:grid;grid-template-columns:100px 1fr;gap:8px 16px;background:#f6f8fc;border-radius:10px;padding:16px;margin:0;font-size:14px}
.applicationDetails dt{font-weight:600;color:#536a82}.applicationDetails dd{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
.info{border:1px solid #cbd7e5;background:#f3f7fc;color:#24445f;padding:13px 15px;border-radius:9px;font-size:14px}.info p{font-size:13px}.info button{margin-top:8px}.grantready{background:#eaf6ef;border-color:#afd8c1;color:#175b3e}
.device{border:1px solid #dce4ee;border-radius:10px;padding:15px;margin:12px 0}.devicehead{display:flex;justify-content:space-between;gap:10px}.device p{font-size:12px;color:#536a82}.hint{font-weight:400;line-height:1.65}.login input{font-size:17px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}[hidden]{display:none!important}
@media(max-width:800px){
 header{padding:15px 20px}.brand{font-size:19px}.brand span{display:none}main{padding:23px 15px}.pagehead{display:block}.pagehead .button{margin-top:8px}.stats{grid-template-columns:repeat(2,1fr);gap:10px}.stat{padding:13px 15px;font-size:12px}.stat strong{font-size:23px}.card{padding:18px}h1{font-size:23px}h2{font-size:20px}.login{padding:26px}.auditrow{grid-template-columns:1fr;gap:2px}.sectionhead{align-items:flex-start}.sectionhead>button{font-size:13px;padding:8px 11px}.rowactions{min-width:150px}
}
@media(max-width:620px){
 header{gap:10px;padding:13px 15px}.brand{gap:8px;font-size:18px}.brand img{width:32px;height:32px}#logout{font-size:13px;padding:7px 10px;min-height:38px}
 .sectionnav{gap:7px}.sectionnav a{font-size:12px;padding:7px 9px}.sectionhead{flex-wrap:wrap;gap:11px}.sectionintro{margin:12px 0 16px}.toolbar{gap:10px}.applicationtools{align-items:stretch;flex-direction:column}.applicationtools>label:last-child{min-width:0}.search{max-width:none}
 .tablewrap{overflow:visible}.responsive,.responsive tbody,.responsive tr,.responsive td{display:block;width:100%}.responsive thead{display:none}.responsive tr{border:1px solid #dce4ee;border-radius:11px;padding:11px 13px;margin-bottom:12px}.responsive td{border:0;padding:6px 0;min-width:0}.responsive td:not(:first-child){display:grid;grid-template-columns:87px minmax(0,1fr);gap:10px}.responsive td:not(:first-child)::before{content:attr(data-label);font-size:12px;color:#536a82;font-weight:600;padding-top:3px}.responsive td:first-child{padding-bottom:10px;border-bottom:1px solid #e8edf4;margin-bottom:6px}
 .badgestack{min-width:0}.rowactions{min-width:0}.rowactions button{min-height:38px}.applicationsTable td:last-child button{justify-self:start;min-height:38px}
 dialog,#reviewDialog{padding:19px;width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}.formrow{grid-template-columns:1fr;gap:13px}.applicationDetails{grid-template-columns:78px minmax(0,1fr);padding:13px;gap:9px 10px;font-size:13px}.actions{gap:8px}.actions button{flex:1;padding:10px}.dialoghead h2{font-size:20px}.auditrow{font-size:12px}
}
@media(max-width:620px){.responsive td:not(:first-child)>*{grid-column:2}.responsive td:not(:first-child)>.badgestack{grid-row:1}.responsive td:not(:first-child)>.rowactions{grid-row:1}}
.grantpermanent{grid-column:1/-1;padding:12px 14px;background:#f3f7fc;border:1px solid #cbd7e5;border-radius:9px}
