:root{font-family:-apple-system,BlinkMacSystemFont,"Microsoft JhengHei","Noto Sans TC",Arial,sans-serif;color:#17223b;background:#f3f6fb;font-size:15px}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}a{color:#2554bc;text-decoration:none}
#app{min-height:100vh}.splash{height:100vh;display:flex;justify-content:center;align-items:center;gap:15px;color:#53617a}
.spinner{border:3px solid #dfe7f5;border-top-color:#2563eb;border-radius:50%;width:24px;height:24px;animation:spin .75s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.login-screen{min-height:100vh;display:flex;justify-content:center;align-items:center;padding:24px;background:radial-gradient(circle at 15% 10%,#d9e8ff,transparent 38%),#eff4fc}
.login-card{width:min(440px,100%);padding:40px 36px;border-radius:20px;background:white;box-shadow:0 24px 70px #21345920}.logo-mark{width:46px;height:46px;background:#1d4ed8;color:white;display:grid;place-items:center;border-radius:12px;font-size:22px;font-weight:900}
h1,h2,h3,h4,p{margin:0}h1{font-size:27px;letter-spacing:-.6px}h2{font-size:21px}h3{font-size:17px}small,.muted{color:#738099}.login-card h1{margin:17px 0 6px}.login-card .muted{margin-bottom:27px}
label{display:block;font-weight:650;font-size:13px;color:#495977;margin:0 0 7px}input,textarea,select{width:100%;background:#fff;border:1px solid #d5deec;border-radius:9px;padding:10px 12px;color:#142441;outline:0;min-width:0}textarea{min-height:88px;resize:vertical}input:focus,textarea:focus,select:focus{border-color:#3778db;box-shadow:0 0 0 3px #c6dcff70}.field{margin:0 0 18px}.field-note{font-size:12px;color:#667791;margin:6px 0}
.btn{border-radius:9px;padding:10px 16px;font-weight:650;border:1px solid #d7dfea;background:white;color:#233352}.btn:hover{background:#f2f6fb}.btn.primary{background:#1e50c6;border-color:#1e50c6;color:white}.btn.primary:hover{background:#1743aa}.btn.danger{background:#fff7f7;color:#a52b2b;border-color:#f3cccc}.btn.block{width:100%}.btn:disabled{opacity:.55;cursor:wait}.btn.small{padding:6px 11px;font-size:13px}
.layout{min-height:100vh;display:grid;grid-template-columns:236px 1fr}.sidebar{background:#101e38;color:#ced8eb;display:flex;flex-direction:column;padding:28px 18px;gap:30px}.brand{display:flex;align-items:center;gap:11px;font-weight:750;color:white;font-size:17px}.brand-icon{width:37px;height:37px;display:grid;place-items:center;background:#275bcc;border-radius:9px}.nav{display:grid;gap:6px}.nav button{color:#ccd7ed;text-align:left;border:0;border-radius:9px;background:none;padding:13px 14px;font-weight:650}.nav button:hover,.nav button.active{background:#263c63;color:white}.side-bottom{margin-top:auto;font-size:12px;color:#a0acc2;line-height:1.7}.main{min-width:0}.topbar{height:76px;background:white;border-bottom:1px solid #e3e9f3;display:flex;align-items:center;justify-content:space-between;padding:0 36px;gap:20px}.identity{text-align:right;font-size:13px;line-height:1.5}.identity strong{display:block;color:#20324f}.content{padding:34px 36px;max-width:1400px;margin:auto}.page-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:25px;gap:12px}.page-head p{margin-top:6px;color:#6e7b90;font-size:14px}
.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:22px}.stat{background:white;border:1px solid #e4eaf4;border-radius:14px;padding:22px}.stat .number{font-weight:800;font-size:32px;margin-top:11px;color:#223f79}.stat.urgent .number{color:#bd3d34}.panel{background:#fff;border:1px solid #e2e9f3;border-radius:14px;padding:23px;margin:0 0 18px}.panel-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;gap:10px}.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 19px}.grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 19px}
.table-scroll{overflow:auto}.table{border-collapse:collapse;width:100%;min-width:700px;text-align:left}.table th{background:#f6f8fc;color:#61708b;font-size:12px;text-transform:uppercase;padding:14px 12px}.table td{padding:14px 12px;border-bottom:1px solid #eaf0f8;font-size:14px}.table tr:last-child td{border-bottom:0}.table tr:hover td{background:#fafcff}.link{font-weight:700;border:none;background:none;color:#1c55bc;padding:0;cursor:pointer}.pill{display:inline-flex;align-items:center;padding:5px 9px;border-radius:8px;background:#e8efff;color:#2754a6;font-size:12px;font-weight:700;white-space:nowrap}.pill.green{background:#e5f8ed;color:#168044}.pill.yellow{background:#fff3d4;color:#995d0d}.pill.red{background:#ffebea;color:#b53131}.pill.gray{background:#edf0f6;color:#576780}
.alert{padding:12px 14px;border-radius:9px;margin-bottom:17px;background:#ffedec;color:#ad2424;border:1px solid #ffcaca}.success{background:#e6f7eb;border:1px solid #b7e2c3;color:#176333}.hint{padding:13px 14px;background:#f4f8ff;border:1px solid #e4ecfa;border-radius:9px;color:#546888;font-size:13px;line-height:1.6;margin-bottom:18px}.toolbar{display:flex;gap:10px;margin-bottom:15px;align-items:center}.toolbar input{max-width:300px}.toolbar select{max-width:220px}.record{border-left:3px solid #b8c9e8;margin:0 0 14px;padding:4px 0 9px 16px}.record strong{color:#203351}.record p{white-space:pre-wrap;margin:8px 0;color:#45546d;line-height:1.7}.record small{display:block;margin-top:4px}.empty{color:#8590a3;padding:30px 10px;text-align:center}.badge-icon{background:#edf4ff;padding:8px;border-radius:8px}.flex{display:flex;align-items:center;gap:10px}.wrap{flex-wrap:wrap}.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.detail-grid .full{grid-column:span 2}.details{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.details small{display:block;margin-bottom:6px}.details strong{font-size:14px;overflow-wrap:anywhere}.section-title{font-size:17px;font-weight:750;margin-bottom:16px}.form-actions{display:flex;gap:10px;justify-content:flex-end;align-items:center;margin-top:10px}.divider{border-top:1px solid #eaf0f7;margin:18px 0}.notice-item{padding:13px 0;border-bottom:1px solid #eaeef5}.notice-item:last-child{border:0}.form-section{border:1px solid #e5ebf4;border-radius:11px;padding:16px;margin-bottom:15px}.form-section h4{margin-bottom:14px}.small-help{margin:6px 0 12px;color:#7785a0;font-size:12px}.footnote{font-size:12px;color:#8190a5;line-height:1.6}
@media(max-width:1050px){.cards{grid-template-columns:repeat(2,1fr)}.layout{grid-template-columns:190px 1fr}.content{padding:25px}.topbar{padding:0 25px}.details{grid-template-columns:repeat(2,1fr)}}
@media(max-width:730px){.layout{display:block}.sidebar{padding:14px 16px;gap:12px}.brand{font-size:15px}.nav{display:flex;overflow:auto}.nav button{padding:9px 12px;white-space:nowrap;font-size:13px}.side-bottom{display:none}.topbar{height:54px;padding:0 16px}.content{padding:18px 13px}.page-head{align-items:flex-start}.page-head h1{font-size:21px}.cards{gap:9px}.stat{padding:15px}.stat .number{font-size:25px}.panel{padding:17px}.grid-2,.grid-3,.detail-grid{grid-template-columns:1fr}.detail-grid .full{grid-column:auto}.details{grid-template-columns:1fr 1fr}.toolbar{flex-wrap:wrap}.toolbar input,.toolbar select{max-width:none}}

/* v1.1.2 project-scoped administration */
.subnav{display:flex;flex-wrap:wrap;gap:8px;padding:4px 0 19px}
.subnav .btn.selected{background:#e7efff;color:#1e50c6;border-color:#aec9ff}
.person{border:1px solid #e4eaf4;border-radius:10px;margin-bottom:10px;background:#fff}
.person summary{padding:14px 15px;cursor:pointer;line-height:1.8}
.person summary small{color:#748298}
.person-body{padding:12px 15px 18px;border-top:1px solid #e4eaf4}

/* v1.2.0 responsive, height-aware operational workspace. Never shrink text to an unreadable size. */
:root{--sidebar:clamp(184px,13vw,240px);--pad:clamp(12px,1.25vw,30px);--control-h:38px}
.layout{grid-template-columns:var(--sidebar) minmax(0,1fr);height:100dvh;min-height:580px;overflow:hidden}
.sidebar{overflow-y:auto;padding:clamp(12px,1.15vw,24px) 12px;gap:clamp(12px,2vh,22px)}
.nav{gap:2px}.nav button{padding:clamp(7px,1.05vh,12px) 10px;font-size:clamp(12px,.75vw,14px)}
.brand{font-size:clamp(14px,1vw,17px)}.side-bottom{font-size:11px}
.main{min-height:0;display:flex;flex-direction:column}
.topbar{height:clamp(50px,6vh,66px);min-height:50px;padding:0 var(--pad);flex:0 0 auto}
.content{width:100%;max-width:none;padding:var(--pad);overflow-y:auto;overscroll-behavior:contain;min-height:0;flex:1}
.page-head{margin-bottom:clamp(10px,1.5vh,18px)}.page-head h1{font-size:clamp(20px,1.25vw,28px)}
.page-head p{font-size:13px}.cards{gap:clamp(8px,1vw,14px);margin-bottom:clamp(9px,1.1vh,14px)}
.stat{padding:clamp(11px,1.2vw,20px)}.stat .number{font-size:clamp(24px,1.65vw,36px);margin-top:5px}
.panel{padding:clamp(12px,1.2vw,22px);margin-bottom:clamp(10px,1.3vh,18px)}
.panel-header{margin-bottom:clamp(8px,1.2vh,14px)}
.field{margin-bottom:clamp(8px,1.1vh,14px)}input,select{min-height:var(--control-h);padding:7px 9px}
textarea{min-height:70px}.table-scroll{overflow:auto;max-height:min(65dvh,900px);scrollbar-gutter:stable}
.table th{padding:9px 11px;position:sticky;top:0;z-index:1}.table td{padding:10px 11px}
.step-bar{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px}.step{padding:7px 12px;border-radius:25px;background:#eaf0fa;font-size:12px;font-weight:700;color:#536784}
.step.active{background:#dceaff;color:#20488f}
.selector-row{padding:12px 12px 0;border:1px solid #c7d9fa;background:#f4f8ff;border-radius:12px;margin-bottom:8px}
.hint.compact{padding:8px 11px;margin-bottom:10px;font-size:12px}
.mini-summary{display:flex;flex-wrap:wrap;gap:8px;background:#fff;border:1px solid #dfe8f7;border-radius:10px;padding:10px 13px;margin-bottom:11px;font-size:12px}
.mini-summary span{margin-right:14px}.mini-summary b{color:#60748d;margin-right:5px}
.workflow-tabs{display:flex;gap:5px;overflow-x:auto;scrollbar-width:thin;margin-bottom:11px;border-bottom:1px solid #d9e3f0;padding-bottom:5px}
.workflow-tabs button{white-space:nowrap;padding:9px 11px;border:0;background:transparent;font-size:13px;color:#536783;border-radius:7px;font-weight:650}
.workflow-tabs button.selected{color:#1a4faf;background:#e6efff}.workflow-tabs button:hover{background:#f0f5ff}
.history-fold{background:#fff;border:1px solid #e2e9f3;border-radius:12px;padding:12px;margin:10px 0}
.history-fold>summary{cursor:pointer;font-size:13px;font-weight:650;color:#375a9b}
.history-fold .panel{margin-top:12px}
.access-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(290px,1fr));gap:8px;margin-bottom:14px}
.access-item{display:flex;gap:12px;padding:12px;border:1px solid #dce6f5;border-radius:9px;align-items:center;margin:0;cursor:pointer}
.access-item input{width:18px;min-height:18px;flex:0 0 18px}.access-item span{min-width:0}
.access-item small{display:block;margin-top:5px}.access-item strong{font-size:13px}
@media(min-width:2560px){:root{--sidebar:230px;--pad:30px;--control-h:42px}.grid-2{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-3{grid-template-columns:repeat(4,minmax(0,1fr))}.cards{grid-template-columns:repeat(4,minmax(0,1fr))}.panel{padding:18px 24px}.content{padding:22px 30px}.table th,.table td{font-size:14px}}
@media(min-width:3400px){:root{--sidebar:250px;--pad:32px}.grid-2,.grid-3{grid-template-columns:repeat(4,minmax(0,1fr))}.table th,.table td{font-size:15px}}
@media(max-width:1920px){:root{--sidebar:210px;--pad:18px}.nav button{font-size:13px}}
@media(max-width:1440px){:root{--sidebar:190px;--pad:14px}.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.topbar{padding:0 16px}.side-bottom{display:none}}
@media(max-width:1020px){:root{--sidebar:172px}.grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}.cards{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.layout{height:auto;min-height:100dvh;display:block;overflow:visible}.sidebar{height:auto;overflow:visible}.nav{display:flex;overflow:auto}.main{min-height:calc(100dvh - 110px)}.content{overflow:visible}.grid-2,.grid-3,.detail-grid{grid-template-columns:1fr}.grid-3.selector-row{grid-template-columns:1fr}.cards{grid-template-columns:repeat(2,1fr)}.page-head{flex-wrap:wrap}.table-scroll{max-height:none}.mini-summary{display:grid;grid-template-columns:repeat(2,1fr)}}
@media(max-height:800px) and (min-width:761px){.content{padding-top:10px}.panel{padding-top:11px;padding-bottom:11px}.nav button{padding-top:6px;padding-bottom:6px}.page-head{margin-bottom:8px}.cards{margin-bottom:9px}}
/* Higher-DPI desktops: larger readable controls, not merely more columns. */
@media(min-width:2560px) and (max-width:3399px){
 :root{font-size:17px;--sidebar:258px;--control-h:46px}
 label{font-size:15px}.topbar{height:72px}.brand{font-size:20px}.nav button{font-size:16px;padding:10px 13px}
 .panel h3{font-size:20px}.page-head h1{font-size:31px}.step{font-size:14px}.hint.compact,.footnote{font-size:14px}
 .table th,.table td{font-size:16px}.workflow-tabs button{font-size:15px}
}
@media(min-width:3400px){
 :root{font-size:20px;--sidebar:322px;--control-h:52px}
 .topbar{height:86px}.brand{font-size:23px}.nav button{font-size:18px;padding:13px 17px}
 .panel h3{font-size:26px}.page-head h1{font-size:37px}.page-head p{font-size:19px}
 label{font-size:18px}.step{font-size:17px;padding:9px 16px}
 .hint.compact,.footnote{font-size:17px}.workflow-tabs button{font-size:19px}
 .table th,.table td{font-size:19px;padding:13px 17px}.btn{font-size:18px}.btn.small{font-size:17px}
 .stat .number{font-size:48px}.field{margin-bottom:22px}.panel{padding:25px 30px}
}
