@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;450;500;550;600;650;700;750&display=swap');
:root{font-family:'Noto Sans TC',sans-serif;color:#263b38;background:#f6f8fa;font-synthesis:none;--green:#16796b;--muted:#83908f;--line:#e9edee}*{box-sizing:border-box}body{margin:0;font-size:13px}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:default;opacity:.4}button{transition:background .15s,color .15s,box-shadow .15s}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,.table-scroll:focus-visible{outline:3px solid #9cd3c8;outline-offset:3px}button svg{width:16px;height:16px;flex-shrink:0}svg{width:20px;height:20px;vertical-align:middle;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}.topbar{height:77px;background:#fff;border-bottom:1px solid var(--line);padding:0 42px;display:flex;align-items:center;gap:65px}.brand{display:flex;align-items:center;gap:10px;font-size:22px;letter-spacing:1px;font-weight:750;color:#233f3a;text-decoration:none}.brand-sub{font-size:12px;letter-spacing:1.5px;color:#7d8a89;margin:4px 0 0 4px;font-weight:450}.brand-mark{width:32px;height:32px;display:grid;grid-template-columns:1fr 1fr;gap:3px;transform:rotate(-5deg)}.brand-mark i{background:var(--green);border-radius:3px}.brand-mark i:nth-child(2){background:#8ac4b6}.brand-mark i:nth-child(3){background:#b5d9cf}.topnav{height:100%;display:flex;align-items:center;border-bottom:3px solid var(--green);padding:3px 10px 0;color:var(--green);font-weight:600}.topright{margin-left:auto;display:flex;gap:20px;align-items:center}.workspace-label{color:#8a9594;font-size:12px}main{max-width:1640px;margin:auto;padding:27px 42px 35px}.breadcrumb{font-size:11px;color:#91a09c;display:flex;gap:11px;align-items:center}.breadcrumb b{font-weight:450;color:#63736f}.breadcrumb span{color:#bcc5c2}.page-heading{display:flex;align-items:center;justify-content:space-between;margin:28px 0 27px}.eyebrow{font-size:10px;font-weight:600;color:#8b9b95;letter-spacing:1.7px;margin-bottom:7px}h1{font-size:27px;letter-spacing:.7px;font-weight:650;margin:0;color:#203e37}.page-heading p{margin:10px 0 0;font-size:12px;color:#83918e}.summary{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-bottom:28px}.summary-card{background:#fff;border:1px solid #e5ebe9;border-radius:9px;padding:20px 23px;position:relative;overflow:hidden}.summary-card:first-child{background:#eff7f4;border-color:#d6e7e0}.summary-label{font-size:12px;color:#71827b;font-weight:500;margin-bottom:9px}.summary-num{font-family:Arial,sans-serif;font-size:30px;font-weight:600;color:#29443c;letter-spacing:-.5px}.summary-num small{font-family:'Noto Sans TC',sans-serif;font-size:11px;font-weight:400;color:#9aa7a1;margin-left:8px}.summary-caption{font-size:10px;color:#96a19c;margin-top:8px}.summary-icon{position:absolute;right:21px;top:22px;background:#f2f5f4;width:35px;height:35px;border-radius:9px;color:#84978f;display:grid;place-items:center}.summary-card:first-child .summary-icon{background:#dceee6;color:#518c75}.summary-card:nth-child(2) .summary-icon{background:#edf8f1;color:#71a087}.summary-card:nth-child(3) .summary-icon{background:#fff6e6;color:#bd9b50}.summary-card:nth-child(4) .summary-icon{background:#f1f3f6;color:#8f9aa6}.data-panel{background:#fff;border:1px solid #e2e8e6;border-radius:10px;box-shadow:0 3px 6px #203f3302;overflow:hidden}.panel-top{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);padding:0 23px}.tabs{display:flex;gap:25px}.tab{border:0;background:none;display:flex;gap:8px;align-items:center;padding:21px 3px 18px;border-bottom:3px solid transparent;font-size:13px;font-weight:500;color:#89958f;margin-bottom:-1px}.tab svg{width:17px;height:17px}.tab:hover{color:var(--green)}.tab.active{color:var(--green);border-color:var(--green);font-weight:650}.tab-count{font-size:10px;color:#95a099;background:#f0f3f2;border-radius:5px;padding:2px 6px;margin-left:3px;font-family:Arial,sans-serif}.active .tab-count{color:#398b71;background:#e7f3ed}.panel-note{font-size:10px;color:#a0aaa6}.toolbar{padding:23px 23px 19px;display:flex;gap:10px;align-items:center}.search-wrap{position:relative;display:flex;align-items:center;flex:1;max-width:360px;min-width:200px}.search-wrap svg{width:16px;height:16px;color:#96a29c}.search-wrap>span{position:absolute;left:12px;pointer-events:none}.search-wrap input{width:100%;height:38px;padding:0 34px;border:1px solid #e0e6e3;border-radius:6px;background:#fff;color:#3f514a;font-size:11px}.search-wrap input::placeholder{color:#a2aba6}.search-wrap kbd{position:absolute;right:11px;border:1px solid #e9edeb;border-radius:3px;font-size:11px;color:#a8afab;padding:0 4px;pointer-events:none}.search-wrap:focus-within kbd{display:none}select{border:1px solid #e0e6e3;border-radius:6px;color:#65776e;padding:0 29px 0 12px;height:38px;font-size:11px;appearance:none;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23839289' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3'/%3E%3C/svg%3E") no-repeat right 10px center}.toolbar-actions{display:flex;gap:9px;margin-left:auto}.button{display:inline-flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap;min-height:37px;padding:8px 14px;border-radius:6px;font-size:11px;font-weight:500;border:1px solid transparent}.secondary{background:#fff;border-color:#dfe6e2;color:#63766a}.secondary:hover{background:#f5f8f6}.primary{background:var(--green);color:white;border-color:var(--green);box-shadow:0 2px 3px #1d6c6510}.primary:hover{background:#10695d}.results-bar{display:flex;align-items:center;justify-content:space-between;padding:0 24px 17px;min-height:37px}.results-bar>div{display:flex;align-items:center;gap:10px}.results-bar strong{font-size:12px;font-weight:550}.results-bar #result-count{font-size:10px;color:#939f99}.export-button{border:0;background:transparent;color:#7e8d85;font-size:10px;display:flex;align-items:center;gap:6px;padding:0 3px}.export-button svg{width:14px;height:14px}.export-button:hover{color:var(--green)}.text-button{border:0;background:none;color:var(--green);padding:4px 0;font-size:11px}.table-scroll{overflow-x:auto;scrollbar-width:thin;scrollbar-color:#dce4df transparent}table{width:100%;border-collapse:separate;border-spacing:0;white-space:nowrap;text-align:left;font-size:11px}th{background:#f6f8f7;color:#89978f;font-weight:450;height:42px;font-size:10px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:0 14px}td{height:59px;padding:0 14px;border-bottom:1px solid #f0f3f1;color:#75847c;font-size:11px;font-weight:400}th:first-child,td:first-child{padding-left:24px}th:last-child,td:last-child{padding-right:24px}tbody tr:last-child td{border-bottom:none}tbody tr:hover td{background:#fafcfb}td.name-cell{font-weight:550;color:#41594d;letter-spacing:.5px}.name-inner{display:flex;align-items:center;gap:8px}.person-avatar{width:26px;height:26px;border-radius:50%;display:inline-grid;place-items:center;flex:none;background:#eff4ef;color:#8ba28d;font-size:10px;font-weight:400}.person-avatar.v1{background:#eef2f7;color:#8d9dae}.person-avatar.v2{background:#f7f1eb;color:#b5a58f}.person-avatar.v3{background:#f3eef7;color:#aa97b3}.mono{font-family:Arial,'Noto Sans TC',sans-serif;font-size:11px;font-variant-numeric:tabular-nums;letter-spacing:.1px}.money{color:#53685c}.badge{display:inline-flex;align-items:center;gap:5px;padding:4px 7px;border-radius:4px;font-size:10px;line-height:1.5}.badge:before{content:'';width:4px;height:4px;border-radius:50%;background:currentColor}.badge.active{background:#edf7f0;color:#59916e}.badge.soon{background:#fff7e8;color:#b49149}.badge.off{background:#f0f2f4;color:#9aa4aa}.badge.expired{background:#fbefee;color:#b7807c}.action-cell,th.action-head{position:sticky;right:0;background:#fff;text-align:center}.action-head{background:#f6f8f7!important}.icon-button{background:transparent;border:0;color:#96a69c;display:inline-flex;align-items:center;justify-content:center;width:27px;height:27px;border-radius:4px}.icon-button:hover{background:#eaf3ee;color:var(--green)}.icon-button svg{width:15px;height:15px}.cell-check{color:#438a72}.cell-no{color:#c6ceca}.table-footer{display:flex;align-items:center;justify-content:space-between;padding:17px 24px;border-top:1px solid var(--line);color:#98a39d;font-size:10px}.pagination{display:flex;align-items:center;gap:23px}.pagination label{display:flex;gap:7px;align-items:center}.pagination select{height:29px;font-family:Arial,sans-serif;padding-left:9px;padding-right:26px;font-size:10px;min-width:53px}.pagination #pages{display:flex;gap:5px}.page-button{height:28px;min-width:28px;border:1px solid #e6ebe8;border-radius:5px;color:#8a9a90;background:white;font-size:11px}.page-button.active{background:#e9f3ef;color:var(--green);border-color:#d6e7de;font-weight:600}.page-button:hover:not(:disabled){background:#edf4ef}.empty{text-align:center;height:260px!important;color:#8c9c92;white-space:normal}.empty svg{width:32px;height:32px;display:block;margin:0 auto 14px;color:#9db9aa}.empty b{display:block;font-size:14px;color:#657f6f;margin-bottom:7px}.empty p{font-size:12px;margin:0}dialog{border:1px solid #e4eae5;border-radius:12px;padding:0;max-width:600px;width:calc(100% - 32px);color:#354e40;box-shadow:0 24px 80px #203b352b}dialog::backdrop{background:#233d3655;backdrop-filter:blur(3px)}.dialog-head{display:flex;align-items:center;justify-content:space-between;padding:23px 26px;border-bottom:1px solid var(--line)}.dialog-kicker{font-size:10px;color:#8d9d92}.dialog-head h2{font-size:20px;font-weight:550;margin:4px 0 0}.dialog-head .icon-button{font-size:25px}.form-grid{padding:23px 26px 8px;display:grid;grid-template-columns:1fr 1fr;gap:16px}.field{display:flex;flex-direction:column;gap:7px;font-size:11px;color:#829085}.field input,.field select{height:37px;width:100%;border:1px solid #dee6df;border-radius:5px;padding:8px 10px;color:#4c6253;min-width:0;background-color:white;font-size:12px}.field .required{color:#b08069}.field.checkbox-field{flex-direction:row;align-items:center}.field.checkbox-field input{width:16px;height:16px;accent-color:var(--green)}.dialog-footer{display:flex;justify-content:flex-end;gap:9px;padding:18px 26px;border-top:1px solid var(--line);background:#fafcfb}.form-error{font-size:12px;color:#b75e59;padding:0 26px;white-space:pre-line}.form-error:empty{display:none}.import-content{padding:20px 26px}.import-content>p{font-size:12px;line-height:1.9;margin-top:0;color:#89968c}.dropzone{margin:20px 0;border:1px dashed #b7cfc1;background:#f5faf6;border-radius:8px;text-align:center;padding:28px;display:flex;align-items:center;flex-direction:column;gap:9px;position:relative}.dropzone svg{width:26px;height:26px;color:#6e9b82}.dropzone strong{font-weight:500;font-size:13px}.dropzone>span{font-size:10px;color:#92a596}.dropzone input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%}.dropzone:focus-within{outline:3px solid #9cd3c8}.import-footnote{font-size:10px!important;margin-bottom:0;color:#a4aea7!important}#import-preview{font-size:12px;color:var(--green);margin-bottom:15px;overflow-wrap:anywhere}#import-error{padding:0}#toast{position:fixed;bottom:28px;left:50%;transform:translate(-50%,20px);padding:12px 23px;background:#244f40;color:white;border-radius:7px;box-shadow:0 5px 20px #204b4033;font-size:12px;opacity:0;pointer-events:none;transition:.25s;z-index:10;max-width:90%;text-align:center}#toast.show{opacity:1;transform:translate(-50%,0)}[hidden]{display:none!important}
@media(min-width:1500px){td{height:63px;font-size:12px}th{font-size:11px}.search-wrap{max-width:410px}}
@media(max-width:1100px){.topbar{padding:0 26px}main{padding:25px 26px}.toolbar{flex-wrap:wrap}.search-wrap{max-width:none;flex:1}.toolbar-actions{margin-left:auto}table{min-width:1130px}.summary-card{padding:18px}.summary-icon{right:16px}.panel-note{display:none}.workspace-label{display:none}}
@media(max-width:720px){.topbar{height:63px;padding:0 18px;gap:27px}.brand{font-size:20px;gap:8px}.brand-sub{display:none}.brand-mark{width:26px;height:26px}.topnav{font-size:12px;padding:3px 3px 0}.topright{gap:0}main{padding:20px 16px}.page-heading{align-items:flex-start;gap:15px;margin:23px 0}.page-heading h1{font-size:24px}.page-heading p{font-size:11px;line-height:1.8;max-width:210px}.eyebrow{font-size:9px;letter-spacing:1px}.summary{grid-template-columns:1fr 1fr;gap:10px;margin-bottom:21px}.summary-card{padding:15px 16px}.summary-label{font-size:11px}.summary-num{font-size:25px}.summary-caption{font-size:9px}.summary-icon{width:27px;height:27px;right:13px;top:15px}.summary-icon svg{width:16px;height:16px}.panel-top{padding:0 12px}.tabs{width:100%;gap:0;justify-content:space-between}.tab{gap:5px;padding:18px 0 15px;font-size:11px}.tab-count{font-size:9px;padding:1px 4px;margin-left:0}.tab svg{width:14px;height:14px}.toolbar{padding:17px 14px 15px;gap:8px}.search-wrap{min-width:100%;max-width:100%}.toolbar>select{flex:1;min-width:0;width:45%;height:35px}.toolbar-actions{width:100%;justify-content:flex-end;margin-top:3px}.toolbar-actions button{flex:1}.results-bar{padding:0 15px 14px}.results-bar strong{font-size:11px}.results-bar>div{gap:7px}.results-bar #result-count{font-size:9px}.table-footer{padding:14px 15px;gap:12px;flex-wrap:wrap}.pagination{gap:16px;margin-left:auto}.pagination label{display:none}.form-grid{padding:20px;gap:12px}.dialog-head{padding:20px}.dialog-footer{padding:15px 20px}.import-content{padding:20px}.summary-num small{font-size:10px}.summary-label{margin-bottom:8px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* 編輯視窗只保留一個捲動區，標題與操作列固定在可視範圍。 */
#editor{max-height:min(92dvh,900px);overflow-y:auto;overflow-x:hidden;scrollbar-width:auto;scrollbar-color:#9dbda8 #eef3ef;scrollbar-gutter:stable}
#editor #edit-form{display:block;max-height:none}
#editor .dialog-head{position:sticky;top:0;z-index:2;background:#fff}
#editor .dialog-footer{position:sticky;bottom:0;z-index:2}
#editor #form-fields{overflow:visible}
#editor.live-editor{max-width:680px}
#editor .live-form{padding:0 27px 16px}
.form-section{padding:22px 0 24px;border-bottom:1px solid #edf1ee}
.form-section:last-child{border-bottom:0;padding-bottom:8px}
.section-heading{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-bottom:17px}
.section-heading h3{margin:0;font-size:13px;font-weight:650;color:#365447}
.section-heading span{font-size:10px;color:#91a198}
.section-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 18px}
.live-form .field{gap:7px;font-size:11px;color:#72847a}
.live-form .field input,.live-form .field select{height:40px;background-color:#fff;border-color:#dfe8e1;border-radius:6px;color:#334d3e}
.live-form .field small{font-size:10px;color:#96a49a;line-height:1.4}
.password-control{position:relative}
.password-control input{padding-right:53px!important}
.password-visibility{position:absolute;right:8px;top:50%;transform:translateY(-50%);border:0;background:transparent;color:#688d76;font-size:11px;padding:5px}
.password-visibility:hover{color:#16796b}
.access-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.access-card{position:relative;min-height:51px;border:1px solid #e4eae5;border-radius:7px;background:#fff;padding:0 14px;display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;transition:background .15s,border-color .15s}
.access-card:hover{border-color:#b8d2c2}
.access-card:has(input:checked){background:#f3f9f5;border-color:#d5e8da}
.access-label{font-size:12px;color:#566e5c}
.access-card:has(input:checked) .access-label{color:#2d6d4d;font-weight:550}
.access-card input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.access-card:focus-within{outline:3px solid #9cd3c8;outline-offset:2px}
.access-switch{width:31px;height:18px;border-radius:20px;background:#cdd8d0;position:relative;flex:none;transition:background .15s}
.access-switch::after{content:'';position:absolute;left:3px;top:3px;width:12px;height:12px;background:#fff;border-radius:50%;box-shadow:0 1px 2px #22452b25;transition:transform .15s}
.access-card input:checked+.access-switch{background:#438e65}
.access-card input:checked+.access-switch::after{transform:translateX(13px)}
@media(max-width:720px){
  #editor{max-height:calc(100dvh - 24px)}
  #editor .live-form{padding:0 19px 12px}
  .form-section{padding:18px 0 20px}
  .section-grid{gap:13px 10px}
  .section-heading{margin-bottom:13px}
  .section-heading span{font-size:9px}
  .access-grid{gap:7px}
  .access-card{min-height:49px;padding:0 9px}
  .access-label{font-size:11px}
}
@media(max-width:390px){.section-grid,.access-grid{grid-template-columns:1fr}}
.category-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.category-card{position:relative;min-height:43px;border:1px solid #e2e9e3;border-radius:7px;padding:0 11px;display:flex;align-items:center;gap:9px;cursor:pointer;font-size:11px;color:#687d6c;background:#fff;transition:background .15s,border-color .15s}
.category-card:hover{border-color:#b8d2c2}
.category-card:has(input:checked){background:#f2f9f4;border-color:#a5cdb1;color:#286944;font-weight:550}
.category-card input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.category-card:focus-within{outline:3px solid #9cd3c8;outline-offset:2px}
.category-check{width:16px;height:16px;border:1px solid #c7d4c9;border-radius:4px;display:grid;place-items:center;color:transparent;background:#fff;flex:none}
.category-check svg{width:12px;height:12px;stroke-width:2.2}
.category-card input:checked+.category-check{border-color:#328456;background:#328456;color:white}
.category-cell{color:#536d5b;white-space:nowrap}
.category-cell span:first-child{display:inline-block;max-width:200px;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}
.category-more{display:inline-block;margin-left:6px;padding:2px 5px;border-radius:4px;background:#edf5ef;color:#4e8a60;font-size:10px}
.import-content .category-import-hint{margin:8px 0 0;color:#64806b;font-size:11px}
@media(max-width:720px){.category-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.category-card{padding:0 9px;font-size:10px;gap:7px}}

.history-system-tabs{display:flex;gap:8px;margin:0 0 18px;border-bottom:1px solid #e1e9e3}
.preview-badge{display:inline-flex;align-items:center;border-radius:4px;background:#eef2f5;color:#728795;padding:3px 6px;font-size:10px;font-weight:650;white-space:nowrap}
.preview-action{color:#94a49a;font-size:11px;white-space:nowrap}
.summary.system-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
.summary-system-card .summary-caption{display:flex;flex-wrap:wrap;gap:5px 12px;line-height:1.5;font-size:12px}
.summary-system-card .summary-caption span{white-space:nowrap}
@media(max-width:720px){.summary.system-summary{grid-template-columns:1fr;gap:9px}.summary-system-card{min-height:90px}.summary-system-card .summary-caption{font-size:10px}}
.history-system-tab{border:0;border-bottom:3px solid transparent;background:transparent;color:#788d7e;padding:13px 16px 12px;font-size:13px;font-weight:600}
.history-system-tab:hover{color:var(--green)}
.history-system-tab.active{color:var(--green);border-bottom-color:var(--green)}
.history-health-hidden{display:none!important}
.health-history{background:#fff;border:1px solid #e2e8e6;border-radius:10px;overflow:hidden}
.health-history-head{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:24px;border-bottom:1px solid #e8eee9}
.health-history-head h2{margin:0 0 6px;color:#315342;font-size:18px;font-weight:650}
.health-history-head p{margin:0;color:#829389;font-size:12px;line-height:1.6}
.health-history-head select{min-width:118px;flex:none}
.health-quarter-list{display:grid;gap:12px;padding:18px}
.health-quarter-card{border:1px solid #e4ebe5;border-radius:8px;background:#fff;overflow:hidden}
.health-quarter-card.settled{border-color:#d2e7d7;background:#fbfefc}
.health-quarter-main{display:grid;grid-template-columns:minmax(160px,1.2fr) repeat(3,minmax(115px,1fr)) 125px;gap:16px;align-items:center;padding:18px 20px}
.health-quarter-period{display:flex;flex-direction:column;gap:4px}
.health-quarter-tag{align-self:flex-start;background:#eaf5ee;color:#348366;border-radius:4px;padding:3px 7px;font-size:10px;font-weight:650}
.health-quarter-period strong{font-size:15px;color:#355440}
.health-quarter-period small{font-size:11px;color:#94a398}
.health-quarter-metric{display:flex;flex-direction:column;gap:5px;white-space:nowrap}
.health-quarter-metric>span{font-size:11px;color:#91a197}
.health-quarter-metric strong{font-size:16px;color:#3b5847;font-family:Arial,'Noto Sans TC',sans-serif;font-variant-numeric:tabular-nums}
.health-quarter-metric strong small{font-size:10px;font-weight:400;color:#7b8d80}
.health-quarter-metric.total strong{color:#207357}
.health-quarter-action{text-align:right}
.health-quarter-action .button{width:100%}
.health-quarter-action .health-adjust-button{margin-top:7px;font-size:11px;padding:7px 8px}
.health-settled-badge,.health-upcoming{display:inline-block;color:#348366;background:#eaf5ee;border-radius:5px;padding:7px 10px;font-size:11px;font-weight:650;white-space:nowrap}
.health-upcoming{color:#899a8e;background:#f0f3f1}
.health-quarter-note{margin:0;padding:0 20px 16px;color:#96a499;font-size:11px}
.health-quarter-detail{border-top:1px solid #e9f0ea}
.health-quarter-detail summary{cursor:pointer;padding:12px 20px;color:#498466;font-size:12px;font-weight:600}
.health-quarter-month-counts{display:inline-flex;flex-wrap:wrap;gap:6px;margin-left:12px;vertical-align:middle}
.health-quarter-month-counts>span{padding:4px 8px;border-radius:5px;background:#edf6ef;color:#53725c;font-size:11px;font-weight:500;white-space:nowrap}
.health-quarter-month-counts strong{color:#247452;font-weight:700}
.health-quarter-detail p{padding:0 20px 14px;margin:0;font-size:12px;color:#87978d}
.health-quarter-items{max-height:250px;overflow:auto;padding:0 20px 15px}
.health-quarter-items>div{display:grid;grid-template-columns:minmax(100px,1fr) minmax(130px,1.4fr) 70px 100px;gap:12px;padding:9px 0;border-top:1px solid #edf2ee;color:#7c8d80;font-size:11px}
.health-quarter-items strong{color:#3c5c48;font-weight:600}
.health-quarter-items>div strong:last-child{text-align:right;color:#207357}
.health-quarter-revisions{padding:0 20px 14px}
.health-quarter-revisions>div{display:flex;flex-wrap:wrap;gap:5px 15px;padding:10px 0;border-top:1px solid #edf2ee;color:#718678;font-size:11px}
.health-quarter-revisions strong{color:#3c5c48}
#health-adjust-dialog{width:min(620px,calc(100vw - 24px));max-height:min(88vh,850px);padding:0;border:1px solid #dfe8e2;border-radius:12px;color:#365343}
#health-adjust-dialog::backdrop{background:#132c22aa}
#health-adjust-form{display:flex;flex-direction:column;max-height:min(88vh,850px)}
.health-adjust-body{overflow:auto;padding:20px 26px}
#health-adjust-previous{margin:0 0 18px;color:#486b55;font-size:13px}
.health-adjust-fee,.health-adjust-reason{display:flex;flex-direction:column;gap:7px;color:#577360;font-size:12px;font-weight:650}
.health-adjust-fee span{display:flex;align-items:center;gap:8px;color:#3e5f49}
.health-adjust-fee input{width:130px}
.health-adjust-hint{font-size:11px;color:#819385;line-height:1.6;margin:12px 0 16px}
.health-adjust-item{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:10px 0;border-top:1px solid #edf2ee;font-size:12px;color:#64806b}
.health-adjust-item>span:first-child{display:flex;flex-direction:column;gap:4px;min-width:0}
.health-adjust-item strong{color:#3a5945}
.health-adjust-item small{color:#8c9e91}
.health-adjust-item input{width:110px;text-align:right}
.health-adjust-empty{color:#8c9e91;font-size:12px}
#health-adjust-total{border-top:1px solid #dfeae1;padding:14px 0;text-align:right;color:#207357;font-size:14px;font-weight:700}
.health-adjust-reason textarea{width:100%;min-height:75px;resize:vertical;padding:9px 11px;border:1px solid #d7e3db;border-radius:6px;font:inherit;color:#3a5945}
@media(max-width:900px){.health-quarter-main{grid-template-columns:repeat(4,minmax(0,1fr));gap:15px}.health-quarter-period{grid-column:1/-1}.health-quarter-action{grid-column:4}.health-quarter-metric{white-space:normal}}
@media(max-width:640px){.history-system-tabs{gap:0}.history-system-tab{flex:1;padding:12px 4px;font-size:11px}.health-history-head{padding:18px;align-items:flex-start}.health-history-head h2{font-size:16px}.health-history-head p{font-size:11px}.health-history-head select{min-width:95px}.health-quarter-list{padding:12px}.health-quarter-main{grid-template-columns:repeat(2,minmax(0,1fr));padding:15px;gap:15px}.health-quarter-period{grid-column:1/-1}.health-quarter-metric strong{font-size:15px}.health-quarter-action{grid-column:1/-1;text-align:left}.health-quarter-action .button{width:auto}.health-quarter-note{padding:0 15px 14px}.health-quarter-items>div{grid-template-columns:minmax(0,1fr) auto;gap:5px 10px}.health-quarter-items>div strong:last-child{grid-column:2;grid-row:1}.health-quarter-items>div span:nth-child(2){grid-column:1;grid-row:2}.health-quarter-items>div span:nth-child(3){grid-column:2;grid-row:2;text-align:right}}
@media(max-width:640px){.health-quarter-month-counts{display:flex;margin:8px 0 0;gap:5px}.health-quarter-month-counts>span{font-size:10px;padding:4px 6px}}

/* Shared settings page */
.topnav{border-bottom:0;padding:0;gap:25px}
.nav-item{height:100%;border:0;border-bottom:3px solid transparent;background:transparent;color:#87948e;font-size:14px;font-weight:550;padding:3px 8px 0}
.nav-item:hover{color:var(--green)}
.nav-item.active{border-bottom-color:var(--green);color:var(--green);font-weight:650}
#settings-view>.breadcrumb,#settings-view>.settings-heading{max-width:1080px;margin-left:auto;margin-right:auto}
.settings-heading{margin-bottom:26px}
.settings-shell{max-width:1080px;margin:0 auto;display:grid;grid-template-columns:210px minmax(0,1fr);gap:26px;align-items:start}
.settings-menu{display:flex;flex-direction:column;gap:3px;position:sticky;top:22px}
.settings-menu-group{padding:13px 12px 6px;color:#91a198;font-size:11px;font-weight:650;letter-spacing:.08em}
.settings-menu-group:not(:first-child){margin-top:13px}
.settings-menu-item{min-height:42px;width:100%;display:flex;align-items:center;gap:8px;text-align:left;border:0;border-left:3px solid transparent;border-radius:6px;background:transparent;color:#64786b;padding:8px 11px;font-size:14px;font-weight:500}
.settings-menu-item:hover{background:#edf5ef;color:#267258}
.settings-menu-item.active{border-left-color:#258065;background:#eaf4ee;color:#176d55;font-weight:700}
.settings-menu-item span{margin-left:auto;color:#91a99a;font-family:Arial,sans-serif;font-size:11px}
.settings-stage{width:100%;min-width:0;max-width:820px;background:#fff;border:1px solid #dfe8e2;border-radius:12px;box-shadow:0 8px 28px #23433608;overflow:hidden}
.settings-card{min-width:0}
.settings-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin:0;padding:27px 30px 24px;border-bottom:1px solid #e9efea}
.settings-card-head h2{font-size:22px;color:#29483a;margin:0 0 6px;font-weight:650}
.settings-card-head p{font-size:13px;color:#788d7f;margin:0;line-height:1.6}
.settings-count{font-size:12px;color:#3c8058;background:#eaf5ee;padding:6px 10px;border-radius:6px;white-space:nowrap;font-weight:600}
.settings-add{display:flex;gap:10px;margin:0;padding:18px 30px;background:#f7faf8;border-bottom:1px solid #e9efea}
.settings-add input{flex:1;min-width:0}
.settings-add .button{min-width:76px;font-size:13px}
.settings-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:20px 30px 28px}
.setting-row{display:flex;align-items:center;gap:10px;min-width:0;min-height:73px;padding:11px 12px;border:1px solid #e5ece7;border-radius:8px}
.setting-row:last-child{border-bottom:1px solid #e5ece7}
.setting-row:not(.setting-row-edit):hover{background:#fafcfb}
.setting-number{width:34px;height:34px;flex:none;display:grid;place-items:center;background:#eef5f0;border-radius:8px;color:#55866a;font-family:Arial,'Noto Sans TC',sans-serif;font-size:12px;font-weight:700;font-variant-numeric:tabular-nums}
.setting-name{flex:1;min-width:0}
.setting-name strong{display:block;color:#35533f;font-size:15px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.setting-name small{display:block;color:#8a9c8f;font-size:12px;margin-top:3px}
.setting-actions{display:flex;gap:6px;flex:none}
.setting-action{min-height:34px;border:1px solid #e1ebe3;border-radius:6px;padding:6px 10px;background:#fff;color:#46775a;font-size:12px}
.setting-action:hover{background:#edf5ef;border-color:#cfe3d4}
.setting-delete{color:#aa716a;border-color:transparent;background:transparent}
.setting-delete:hover{background:#fcf0ee;border-color:#f2dbd8}
.setting-save{background:#e9f4ec;border-color:#d2e8d9;color:#237950;font-weight:650}
.setting-row-edit{background:#f5faf6}
.setting-edit-input,.settings-add input,.fees-form input{height:42px;width:100%;border:1px solid #dce7df;border-radius:7px;background:#fff;color:#334d3e;padding:8px 12px;font-size:14px}
.setting-edit-input{flex:1;min-width:0}
.settings-empty{grid-column:1/-1;margin:0;padding:28px 12px;color:#8b9e90;font-size:13px;text-align:center}
.fees-form{display:grid;gap:14px;padding:24px 30px 30px}
.fee-setting{padding:19px 21px;border:1px solid #e3ebe5;border-radius:9px;background:#fff}
.fees-form label{display:flex;align-items:center;justify-content:space-between;gap:14px;color:#365541;font-size:15px;font-weight:600}
.fees-form label span{display:flex;align-items:center;gap:8px;white-space:nowrap;color:#738879;font-size:13px;font-weight:500}
.fees-form input{width:116px;text-align:right;font-variant-numeric:tabular-nums}
.fee-preview{display:flex;align-items:baseline;justify-content:flex-start;flex-wrap:wrap;gap:4px 10px;margin-top:17px;padding-top:15px;border-top:1px solid #edf1ee;font-variant-numeric:tabular-nums}
.fee-preview span{font-size:12px;color:#7f9385}
.fee-preview strong{font-size:21px;color:#237950;font-family:Arial,'Noto Sans TC',sans-serif;font-weight:700}
.fee-preview small{font-size:12px;color:#82998a}
.fee-preview em{flex-basis:100%;font-size:12px;font-style:normal;color:#688774;text-align:left}
.fees-form>.button{justify-self:end;margin-top:4px;font-size:13px;min-width:110px}
.field input[readonly]{background:#f2f7f3;color:#267554;font-weight:650;cursor:default}
@media(max-width:1180px){.settings-list{grid-template-columns:1fr}}
@media(max-width:800px){.settings-shell{display:block}.settings-menu{position:static;display:flex;flex-direction:row;gap:4px;overflow-x:auto;padding-bottom:2px;scrollbar-width:thin}.settings-menu-group{display:none}.settings-menu-item{width:auto;min-height:40px;flex:none;white-space:nowrap;border-left:0;border-bottom:3px solid transparent;border-radius:5px 5px 0 0;padding:7px 10px}.settings-menu-item.active{border-left:0;border-bottom-color:#258065}.settings-stage{max-width:none;margin-top:14px}}
@media(max-width:720px){.settings-card-head{padding:22px 18px 20px}.settings-card-head h2{font-size:20px}.settings-add{padding:15px 18px}.settings-list{padding:15px 18px 20px}.setting-row{gap:9px;min-height:65px;padding:10px}.setting-action{padding:5px 7px;font-size:11px}.setting-number{width:30px;height:30px}.setting-name strong{font-size:14px}.setting-name small{font-size:11px}.setting-edit-input,.settings-add input{font-size:13px}.fees-form{padding:18px;gap:11px}.fee-setting{padding:16px}.fee-preview strong{font-size:19px}}
@media(max-width:430px){.fees-form label{align-items:flex-start;flex-direction:column}.fees-form label span{width:100%;justify-content:flex-end}.setting-actions{gap:2px}.setting-row-edit{flex-wrap:wrap}.setting-row-edit .setting-edit-input{min-width:calc(100% - 48px)}.setting-row-edit .setting-actions{margin-left:39px}}

/* Readable type scale across the management screen. */
body{font-size:15px;line-height:1.5}
.brand-sub,.workspace-label,.topnav{font-size:14px}
.breadcrumb{font-size:13px}
.eyebrow{font-size:12px}
h1{font-size:31px}
.page-heading p{font-size:15px;color:#60776c}
.summary-label{font-size:15px;color:#526f60}
.summary-num{font-size:35px}
.summary-num small{font-size:13px;color:#677b70}
.summary-caption{font-size:13px;color:#758a7c}
.tab{font-size:15px}
.tab-count{font-size:12px}
.panel-note{font-size:12px}
.search-wrap input,select,.button,.text-button{font-size:14px}
.search-wrap input::placeholder{color:#82948a}
.search-wrap input,select{height:43px}
.button{min-height:43px;padding:9px 16px}
.results-bar strong{font-size:15px}
.results-bar #result-count,.export-button{font-size:13px}
.results-bar{padding-bottom:18px}
.table-scroll{scrollbar-color:#aebfb2 transparent}
table{min-width:1280px;font-size:14px}
th{height:49px;font-size:13px;color:#647a6d;font-weight:600}
td{height:68px;font-size:14px;color:#52675b}
.mono{font-size:14px}
.badge{font-size:12px;padding:5px 9px}
.badge:before{width:6px;height:6px}
.person-avatar{width:30px;height:30px;font-size:12px}
.icon-button{width:32px;height:32px}
.icon-button svg{width:17px;height:17px}
.table-footer{font-size:13px;color:#687e71}
.pagination select{height:34px;min-width:60px;font-size:13px}
.page-button{height:33px;min-width:33px;font-size:13px}
.category-more{font-size:12px}
.empty b{font-size:16px}.empty p{font-size:14px}
.dialog-kicker{font-size:12px}.dialog-head h2{font-size:23px}
.field,.live-form .field{font-size:14px}
.field input,.field select,.live-form .field input,.live-form .field select{font-size:14px;height:43px}
.field small,.live-form .field small{font-size:12px}
.section-heading h3{font-size:16px}
.section-heading span{font-size:13px}
.access-label,.category-card{font-size:14px}
.access-card,.category-card{min-height:48px}
.password-visibility{font-size:13px}
.form-error,.import-content>p,#import-preview,#toast{font-size:14px}
.dropzone strong{font-size:15px}.dropzone>span{font-size:13px}
.import-content .category-import-hint,.import-footnote{font-size:13px!important}
@media(max-width:720px){
  .topnav{font-size:13px}
  .breadcrumb{font-size:12px}
  .eyebrow{font-size:11px}
  .page-heading h1{font-size:27px}
  .page-heading p{font-size:14px;max-width:none}
  .summary-label{font-size:13px}
  .summary-num{font-size:29px}
  .summary-caption{font-size:11px}
  .summary-num small{font-size:12px}
  .tab{font-size:13px}
  .tab-count{font-size:11px}
  .results-bar strong{font-size:14px}
  .results-bar #result-count{font-size:12px}
  .toolbar>select{height:42px}
  .section-heading span{font-size:12px}
  .access-label,.category-card{font-size:13px}
  .table-footer{font-size:12px}
}
/* Keep the final data column readable when the enlarged table scrolls. */
.action-cell,th.action-head{position:static}
.category-number{font-family:Arial,sans-serif;font-size:13px;font-variant-numeric:tabular-nums;color:#82988a;min-width:19px;text-align:right}
.category-card:has(input:checked) .category-number{color:#357b50}



/* Cross-system overview with details on demand. */
.lookup-mode .search-wrap{max-width:560px}
.lookup-mode .toolbar{padding-bottom:19px}
.lookup-hint{margin:0;padding:0 24px 16px;font-size:13px;color:#718579}
.lookup-table-scroll{overflow-x:auto;scrollbar-width:thin;scrollbar-color:#aebfb2 transparent}
.lookup-table{width:100%;min-width:850px;border-collapse:separate;border-spacing:0;table-layout:fixed}
.lookup-table th,.lookup-table td{padding:0 18px;height:88px;text-align:left;border-bottom:1px solid #edf1ee;vertical-align:middle}
.lookup-table thead th{height:46px;background:#f4f7f5;color:#667c6e;font-size:13px;font-weight:600;border-top:1px solid #e9eeea}
.lookup-table th:first-child,.lookup-table td:first-child{padding-left:24px}
.lookup-table th:last-child,.lookup-table td:last-child{padding-right:24px}
.lookup-table thead th:nth-child(1){width:20%}
.lookup-table thead th:nth-child(2),.lookup-table thead th:nth-child(3),.lookup-table thead th:nth-child(4){width:23%}
.lookup-table thead th:nth-child(5){width:11%}
.lookup-group tr:first-child:hover>*{background:#fafcfb}
.lookup-person-cell{font-weight:400;background:#fff;position:sticky;left:0;z-index:1;box-shadow:1px 0 0 #edf1ee}
.lookup-table thead th:first-child{position:sticky;left:0;z-index:2}
.lookup-person{display:flex;align-items:center;gap:10px}
.lookup-person .person-avatar{width:32px;height:32px;font-size:13px}
.lookup-person strong{display:block;color:#385644;font-size:15px;font-weight:650;white-space:nowrap}
.lookup-person small{display:block;color:#849589;font-size:11px;font-weight:400;white-space:nowrap;margin-top:2px}
 .lookup-presence-cell{font-size:13px;color:#546c5d}
.lookup-presence{display:flex;align-items:center;gap:8px;min-width:0;white-space:nowrap}
.lookup-expiry{font-size:11px;color:#8a9d90;white-space:nowrap}
.lookup-unit,.lookup-reference{display:block;font-size:12px;line-height:1.55;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lookup-unit{color:#4e6d59;margin-top:5px;font-weight:550}
.lookup-reference{color:#7b8e80}
.lookup-many{display:inline-block;color:#3e8059;font-size:13px;font-weight:650}
.lookup-absent{font-size:13px;color:#9caaa0}
.lookup-toggle,.lookup-open{border:0;background:transparent;color:#287956;padding:7px 0;font-size:13px;font-weight:600;white-space:nowrap}
.lookup-toggle:hover,.lookup-open:hover{text-decoration:underline}
.lookup-toggle{display:inline-flex;align-items:center;gap:8px}
.lookup-toggle span{width:19px;height:19px;display:inline-grid;place-items:center;border:1px solid #cfe4d5;border-radius:4px;background:#f0f8f2;font-size:16px;font-weight:600;line-height:1}
.lookup-expanded td{height:auto!important;padding:10px 24px 17px!important;background:#f8faf8}
.lookup-detail-list{margin:0 0 1px 0;border:1px solid #e3ece5;border-radius:7px;background:white;overflow:hidden}
.lookup-detail-line{display:grid;grid-template-columns:120px minmax(0,1fr);align-items:start;gap:19px;padding:17px 20px;border-bottom:1px solid #edf1ee}
.lookup-detail-line:last-child{border-bottom:0}
.lookup-detail-line>strong{font-size:14px;color:#496b54;font-weight:650;white-space:nowrap;padding-top:5px}
.lookup-detail-records{min-width:0}
.lookup-detail-record{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:18px;padding:0 0 13px;min-width:0}
.lookup-detail-record:not(:last-child){border-bottom:1px dashed #e8eee9;margin-bottom:13px}
.lookup-detail-record:last-child{padding-bottom:0}
.lookup-record-info{min-width:0}
.lookup-record-primary{display:flex;align-items:center;gap:10px;min-height:26px;font-size:13px;color:#4d6757}
.lookup-record-primary .badge{flex:none}
.lookup-record-primary strong{font-size:14px;font-weight:600;white-space:nowrap}
.lookup-record-primary>span:last-child{color:#758b79;white-space:nowrap}
.lookup-record-meta{display:flex;flex-wrap:wrap;gap:5px 15px;margin-top:7px;color:#687c6e;font-size:12px;line-height:1.6}
.lookup-record-meta>span{white-space:nowrap}
.lookup-record-meta b{font-weight:550;color:#9aaa9c;margin-right:5px}
.lookup-record-actions{display:flex;align-items:center;gap:4px}
.lookup-record-actions .row-action{font-size:12px}
.lookup-empty{text-align:center!important;height:150px!important;color:#718477!important;font-size:14px!important}
@media(max-width:720px){
  .tabs{justify-content:flex-start;gap:17px;overflow-x:auto;scrollbar-width:none;white-space:nowrap}
  .tabs::-webkit-scrollbar{display:none}
  .tab{flex:none}
  .lookup-mode .search-wrap{max-width:none}
  .lookup-hint{padding:0 15px 14px;font-size:12px;line-height:1.6}
  .lookup-table{min-width:750px}
  .lookup-table th,.lookup-table td{padding:0 12px}
  .lookup-table th:first-child,.lookup-table td:first-child{padding-left:15px}
  .lookup-table th:last-child,.lookup-table td:last-child{padding-right:15px}
  .lookup-table thead th:nth-child(1){width:21%}
  .lookup-table thead th:nth-child(2),.lookup-table thead th:nth-child(3),.lookup-table thead th:nth-child(4){width:23%}
  .lookup-table thead th:nth-child(5){width:10%}
  .lookup-expanded td{padding:8px 12px 14px!important}
  .lookup-table th,.lookup-table td{height:92px}
  .lookup-presence{display:block}
  .lookup-expiry{display:block;margin-top:2px}
  .lookup-detail-line{grid-template-columns:100px minmax(0,1fr);gap:10px;padding:14px 12px}
  .lookup-detail-record{grid-template-columns:1fr;gap:8px}
  .lookup-record-primary{flex-wrap:wrap;gap:5px 8px}
  .lookup-record-actions{justify-content:flex-start}
}
/* Actions shared by all three system tables. */
.action-cell,th.action-head{min-width:192px}
.row-actions{display:flex;align-items:center;justify-content:center;gap:4px}
.row-action{border:0;background:transparent;border-radius:5px;padding:7px 8px;font-size:12px;font-weight:600;white-space:nowrap}
.row-action.edit{color:#26765c}.row-action.edit:hover{background:#eaf5ee}
.row-action.toggle{color:#a77b3f}.row-action.toggle:hover{background:#fff4e4}
.row-action.delete{color:#b3625c}.row-action.delete:hover{background:#fff0ee}
.row-action.renew{color:#16796b}.row-action.renew:hover{background:#eaf5ee}
#billing-year{min-width:150px;color:#276b58;font-weight:600}
.history-mode .panel-top{display:none}
@media(max-width:720px){
  .topbar{gap:12px}
  .brand{font-size:18px}
  .brand-mark{width:23px;height:23px}
  .topnav{flex:1;gap:3px;justify-content:space-between}
  .nav-item{font-size:11px;padding:3px 2px 0;white-space:nowrap}
  .topright{display:none}
}
#delete-dialog{max-width:440px}
.delete-message{margin:0;padding:23px 26px 25px;font-size:14px;line-height:1.7;color:#52675b}
.button.danger{background:#b85c55;color:#fff;border-color:#b85c55}
.button.danger:hover{background:#a54e49}
@media(max-width:720px){.action-cell,th.action-head{min-width:182px}.row-action{font-size:12px;padding:7px 6px}.delete-message{padding:20px}}

/* 帳號登入 */
body.auth-pending > :not(#auth-gate){display:none!important}
.auth-gate[hidden]{display:none}
.auth-gate{min-height:100vh;min-height:100dvh;display:grid;place-items:center;padding:36px;background:radial-gradient(circle at 14% 18%,#d8ede6 0,transparent 38%),radial-gradient(circle at 87% 82%,#d7e9e2 0,transparent 35%),#edf3f0}
.auth-shell-frame{width:min(100%,920px);filter:drop-shadow(0 8px 0 #d8e8de) drop-shadow(0 28px 35px #15453635)}
.auth-shell{width:100%;min-height:548px;display:grid;grid-template-columns:1.07fr 1fr;overflow:hidden;background:#fff;clip-path:polygon(48px 0,calc(100% - 92px) 0,100% 92px,100% calc(100% - 56px),calc(100% - 56px) 100%,36px 100%,0 calc(100% - 36px),0 48px)}
.auth-visual{min-height:548px;position:relative;overflow:hidden;isolation:isolate;background:linear-gradient(145deg,#164e49,#0b3536 62%,#092d30);clip-path:polygon(0 0,calc(100% - 34px) 0,100% 23%,calc(100% - 24px) 50%,100% 77%,calc(100% - 34px) 100%,0 100%)}
.auth-visual::before{content:'';position:absolute;inset:-15%;background:radial-gradient(circle at 52% 45%,#7edbc653,transparent 38%),radial-gradient(circle at 15% 90%,#4e9b8352,transparent 40%);z-index:-1}
.auth-visual::after{content:'';position:absolute;width:270px;height:270px;right:-150px;top:-155px;border:1px solid #a9eadc2b;border-radius:50%;box-shadow:0 0 0 45px #b1eddd0c,0 0 0 90px #b1eddd08}
.auth-perspective-grid{position:absolute;left:-30%;bottom:-19%;width:160%;height:65%;background-image:linear-gradient(#c5fff01e 1px,transparent 1px),linear-gradient(90deg,#c5fff01e 1px,transparent 1px);background-size:35px 35px;transform:perspective(430px) rotateX(63deg);transform-origin:center bottom;mask-image:linear-gradient(to bottom,transparent,#000 52%)}
.auth-geometry{position:absolute;inset:0;perspective:760px}
.auth-geometry::after{content:'';position:absolute;left:48%;top:80%;width:205px;height:50px;border-radius:50%;background:#031e2299;filter:blur(22px);transform:translateX(-50%) rotate(-19deg);pointer-events:none}
.auth-ring{position:absolute;left:14%;top:21%;width:76%;height:57%;border:1px solid #cafcf262;border-radius:50%;transform:rotate(-31deg);box-shadow:0 0 0 25px #cdfbf009,0 0 0 65px #cdfbf006}
.auth-cube{--edge:170px;--depth:85px;position:absolute;width:var(--edge);height:var(--edge);transform-style:preserve-3d;transform:translate(-50%,-50%) rotateX(-27deg) rotateY(36deg)}
.auth-cube .face{position:absolute;inset:0;display:block;border:1px solid #dffff06b;backface-visibility:hidden;box-shadow:inset 0 0 28px #e3fff521}
.auth-cube .front{background:linear-gradient(145deg,#93e1d3,#46b8a6);transform:translateZ(var(--depth))}
.auth-cube .back{background:#347e75;transform:rotateY(180deg) translateZ(var(--depth))}
.auth-cube .right{background:linear-gradient(135deg,#268e86,#166c68);transform:rotateY(90deg) translateZ(var(--depth))}
.auth-cube .left{background:#2a988e;transform:rotateY(-90deg) translateZ(var(--depth))}
.auth-cube .top{background:linear-gradient(140deg,#d8fff1,#a2ead7);transform:rotateX(90deg) translateZ(var(--depth))}
.auth-cube .bottom{background:#0d5c58;transform:rotateX(-90deg) translateZ(var(--depth))}
.auth-cube-main{left:47%;top:53%}
.auth-cube-small{--edge:72px;--depth:36px;left:76%;top:30%;transform:translate(-50%,-50%) rotateX(-27deg) rotateY(36deg)}
.auth-cube-main{animation:auth-float-main 7s ease-in-out infinite}
.auth-cube-small{animation:auth-float-small 5.5s ease-in-out infinite reverse}
.auth-ring{animation:auth-ring-breathe 8s ease-in-out infinite}
.auth-perspective-grid{animation:auth-grid-shift 14s linear infinite}
@keyframes auth-float-main{0%,100%{transform:translate(-50%,-50%) translateY(0) rotateX(-27deg) rotateY(36deg)}50%{transform:translate(-50%,-50%) translateY(-13px) rotateX(-24deg) rotateY(43deg)}}
@keyframes auth-float-small{0%,100%{transform:translate(-50%,-50%) translateY(0) rotateX(-27deg) rotateY(36deg)}50%{transform:translate(-50%,-50%) translateY(-15px) rotateX(-30deg) rotateY(47deg)}}
@keyframes auth-ring-breathe{0%,100%{opacity:.58;transform:rotate(-31deg) scale(.98)}50%{opacity:1;transform:rotate(-31deg) scale(1.04)}}
@keyframes auth-grid-shift{to{background-position:0 35px,0 35px}}
@media(prefers-reduced-motion:reduce){.auth-cube-main,.auth-cube-small,.auth-ring,.auth-perspective-grid{animation:none!important}}
.auth-cube-small .front{background:linear-gradient(140deg,#f2fff8,#bcebd8)}
.auth-cube-small .top{background:#fffef5}
.auth-cube-small .right{background:#77c5ae}
.auth-card{min-width:0;display:flex;flex-direction:column;justify-content:center;padding:54px 60px;background:linear-gradient(150deg,#fff,#fbfdfb)}
.auth-mark{position:relative;width:43px;height:43px;flex:none;transform:rotate(-9deg);margin-bottom:30px;background:linear-gradient(135deg,#c8f7e6,#45b49f 48%,#12675f);clip-path:polygon(50% 0,93% 21%,100% 68%,53% 100%,0 68%,7% 21%)}
.auth-mark::before{content:'';position:absolute;inset:0;background:#f5fff470;clip-path:polygon(50% 0,53% 100%,0 68%,7% 21%)}
.auth-mark::after{content:'';position:absolute;inset:0;background:#0c665b3d;clip-path:polygon(93% 21%,100% 68%,53% 100%,50% 0)}
.auth-card h1{font-size:28px;letter-spacing:.03em;margin-bottom:10px;color:#1f4039}
.auth-systems{display:flex;flex-wrap:wrap;gap:7px;margin:0 0 18px}
.auth-systems span{padding:5px 8px;border:1px solid #dcebe1;border-radius:9px 2px 9px 2px;background:#edf7f1;color:#3e7b64;font-size:11px;font-weight:650;white-space:nowrap}
.auth-note{color:#71877c;line-height:1.7;min-height:24px;margin:0 0 28px;font-size:13px}
.auth-card form{display:grid;gap:10px}.auth-card form[hidden]{display:none}
.auth-card label{font-size:12px;font-weight:650;color:#536d5d;margin-top:6px}
.auth-card input{width:100%;height:47px;border:1px solid #d7e5dc;border-bottom-color:#bdd5c6;border-radius:11px 3px 11px 3px;padding:0 14px;background:#fdfefd;color:#203e37;font-size:15px;box-shadow:0 2px 0 #e9f1eb}
.auth-password-wrap{position:relative;min-width:0}
.auth-card .auth-password-wrap input{padding-right:51px}
.auth-password-toggle{position:absolute;right:3px;top:50%;transform:translateY(-50%);width:42px;height:41px;display:grid;place-items:center;border:0;border-radius:8px 2px 8px 2px;background:transparent;color:#668a79;cursor:pointer}
.auth-password-toggle:hover{background:#eaf4ed;color:#176e5b}
.auth-password-toggle svg{width:20px;height:20px;stroke-width:1.7}
.auth-eye-slash{display:none}.auth-password-toggle[aria-pressed="true"] .auth-eye-slash{display:block}
.auth-card input:focus{border-color:#16796b;outline:3px solid #d9eee4;background:#fff}
#auth-confirm-wrap{display:grid;gap:10px}#auth-confirm-wrap[hidden]{display:none}
.auth-error{min-height:18px;margin:2px 0 0;color:#b24e47;font-size:12px;line-height:1.5}
.auth-submit{height:49px;border:1px solid #126c60;border-bottom-color:#0c554d;border-radius:9px;background:linear-gradient(145deg,#1f927d,#126f65);color:#fff;font-weight:700;font-size:14px;box-shadow:0 5px 0 #0d6057,0 12px 19px #0f6f5b2a;transition:transform .15s,box-shadow .15s,background .15s}
.auth-submit:hover{background:linear-gradient(145deg,#24a18a,#13796b);transform:translateY(-2px);box-shadow:0 7px 0 #0d6057,0 15px 22px #0f6f5b30}
.auth-submit:active{transform:translateY(3px);box-shadow:0 2px 0 #0d6057,0 6px 12px #0f6f5b28}
.auth-submit:disabled{opacity:.6;transform:none;box-shadow:0 3px 0 #0d6057}
@media(max-width:860px){.auth-gate{padding:18px}.auth-shell-frame{max-width:460px}.auth-shell{min-height:0;grid-template-columns:1fr;clip-path:polygon(22px 0,calc(100% - 38px) 0,100% 38px,100% calc(100% - 25px),calc(100% - 25px) 100%,18px 100%,0 calc(100% - 18px),0 22px)}.auth-visual{min-height:185px;clip-path:polygon(0 0,100% 0,100% calc(100% - 25px),69% calc(100% - 25px),61% 100%,53% calc(100% - 25px),0 calc(100% - 25px))}.auth-ring{left:34%;top:8%;width:45%;height:110%}.auth-cube-main{--edge:94px;--depth:47px;left:53%;top:52%}.auth-cube-small{--edge:42px;--depth:21px;left:72%;top:27%}.auth-perspective-grid{bottom:-46%;height:110%}.auth-card{padding:29px 30px 36px}.auth-mark{width:34px;height:34px;margin-bottom:19px}.auth-card h1{font-size:24px}.auth-note{margin-bottom:19px}}
body:not([data-access-role="owner"]) .owner-only{display:none!important}
body:not([data-access-role="owner"]):not([data-access-role="admin"]) .manager-only{display:none!important}
body[data-access-role="editor"] #settings-nav,
body[data-access-role="viewer"] #settings-nav,
body[data-access-role="viewer"] #add-btn,
body[data-access-role="viewer"] #import-btn,
body[data-access-role="viewer"] .row-actions,
body[data-access-role="viewer"] .live-row-actions .row-action,
body[data-access-role="viewer"] #health-quarter-list button,
body[data-access-role="editor"] .history-mode .row-actions,
body[data-access-role="editor"] #health-quarter-list button{display:none!important}
.account-form{padding:22px 30px;border-bottom:1px solid #e9efea;background:#f7faf8}
.account-fields{display:grid;grid-template-columns:1fr 1fr 150px;gap:12px;align-items:end}
.account-fields label{display:grid;gap:7px;color:#53675d;font-size:12px;font-weight:650}
.account-fields input:not([type="checkbox"]),.account-fields select{min-width:0;width:100%;height:42px;border:1px solid #dce7df;border-radius:7px;background:#fff;color:#334d3e;padding:8px 12px;font-size:14px}
.account-fields .account-active{display:flex;align-items:center;gap:7px;grid-column:1/-1}.account-fields .account-active[hidden]{display:none}
.account-form-actions{display:flex;gap:9px}.account-form-actions [hidden]{display:none}
.account-list{padding:8px 30px 22px}
.account-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px 0;border-bottom:1px solid #edf1ee}
.account-row:last-child{border-bottom:0}
.account-info{display:grid;gap:4px}.account-info strong{font-size:14px;color:#29483a}.account-info small{font-size:12px;color:#788d7f}
.storage-content{padding:20px 30px 28px}.storage-checked-at{margin:0 0 12px;color:#8a9c8f;font-size:12px}.storage-checked-at:empty{display:none}.storage-list{display:grid;gap:12px}.storage-row{padding:18px 20px;border:1px solid #e5ece7;border-radius:9px;background:#fff}.storage-row-head{display:flex;align-items:center;justify-content:space-between;gap:16px}.storage-row-names{min-width:0;display:grid;gap:2px}.storage-row-names strong{font-size:15px;color:#29483a;overflow-wrap:anywhere}.storage-row-names small{font-size:12px;color:#8a9c8f;overflow-wrap:anywhere}.storage-percent{flex:none;color:#16796b;font-size:21px;font-variant-numeric:tabular-nums}.storage-track{height:9px;margin-top:14px;background:#e8f0eb;border-radius:999px;overflow:hidden}.storage-track span{display:block;height:100%;background:linear-gradient(90deg,#55b395,#16796b);border-radius:inherit;transition:width .45s ease}.storage-size,.storage-error{margin:10px 0 0;font-size:12px;color:#788d7f}.storage-error{color:#b24e47}.storage-message{margin:0;padding:26px 8px;text-align:center;color:#788d7f;font-size:13px}
@media(max-width:720px){.account-form{padding:18px}.account-fields{grid-template-columns:1fr}.account-list{padding:8px 18px 18px}}
@media(max-width:720px){.storage-content{padding:16px 18px 22px}.storage-row{padding:15px}.storage-row-head{align-items:flex-start}.storage-percent{font-size:19px}}
.logout-button{border:1px solid #d9e4de;border-radius:7px;background:#fff;color:#60746b;font-size:12px;white-space:nowrap;padding:7px 12px}
.logout-button:hover{border-color:#a6cabc;color:#16796b}
@media(max-width:720px){.topbar{gap:10px}.topnav{min-width:0}.nav-item{font-size:10px}.logout-button{padding:6px 7px;font-size:11px}}

/* Live system: readable overview with only enabled streams listed. */
.live-list-head,.live-row{display:grid;grid-template-columns:48px minmax(125px,1.15fr) minmax(105px,1fr) minmax(180px,1.6fr) minmax(70px,.55fr) minmax(80px,.7fr) minmax(190px,1.45fr);align-items:center;gap:12px}
.live-list-head{height:46px;padding:0 24px;background:#f5f8f6;border-top:1px solid #e9eeea;border-bottom:1px solid #e9eeea;color:#657b6e;font-size:13px;font-weight:600}
.live-item{border-bottom:1px solid #edf1ee}
.live-item:last-child{border-bottom:0}
.live-row{min-height:82px;padding:14px 24px}
.live-item:hover>.live-row{background:#fbfcfb}
.live-sequence{color:#577d64;font-family:Arial,'Noto Sans TC',sans-serif;font-size:14px;font-weight:700;font-variant-numeric:tabular-nums}
.live-person,.live-unit,.live-stream-names{min-width:0}
.live-person strong,.live-unit strong{display:block;font-size:14px;color:#3f5c49;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.live-person strong{font-size:15px}
.live-person small,.live-unit small{display:block;margin-top:4px;font-size:12px;color:#829589;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.live-category-list{display:flex;align-items:center;flex-wrap:wrap;gap:5px;min-width:0;color:#829589}
.live-category-number{display:inline-grid;place-items:center;width:28px;height:28px;border:1px solid #c9dfd0;border-radius:50%;background:#eef7f0;color:#2c7650;font-family:Arial,'Noto Sans TC',sans-serif;font-size:12px;font-weight:700;font-variant-numeric:tabular-nums}
.live-stream-names{font-size:13px;line-height:1.5;color:#536d5b;overflow-wrap:anywhere}
.live-stream-names.is-empty{color:#9bad9e}
.live-validity{display:flex;flex-direction:column;align-items:flex-start;gap:5px;font-size:12px;color:#647c6c;font-variant-numeric:tabular-nums}
.live-validity .badge{font-variant-numeric:normal}
.live-row-actions{display:flex;align-items:center;justify-content:flex-start;gap:1px;white-space:nowrap}
.live-row-actions .row-action{padding:7px 6px}
.live-row-actions .row-action.edit,.live-row-actions .row-action.toggle{color:#5f806e}
.live-expand{background:transparent;border:0;border-right:1px solid #e5ebe7;color:#277857;font-size:12px;font-weight:600;padding:7px 9px 7px 0;white-space:nowrap}
.live-expand:hover{text-decoration:underline}
.live-details{margin:0 24px 15px;padding:14px 17px;background:#f8fbf9;border-left:2px solid #b9d9c4;border-radius:0 6px 6px 0}
.live-detail-section{display:flex;align-items:flex-start;gap:15px}
.live-detail-section>strong{flex:none;min-width:67px;font-size:13px;color:#56725c;font-weight:600;padding-top:3px}
.live-tags{display:flex;flex-wrap:wrap;gap:6px;font-size:13px;color:#8a9c8b}
.live-category-tag{display:inline-flex;align-items:center;padding:5px 8px;background:#edf6ef;border-radius:5px;color:#3d7752;font-size:12px}
.live-extra{display:flex;flex-wrap:wrap;gap:5px 20px;margin-top:12px;padding-top:10px;border-top:1px solid #e6eee7;color:#667d6c;font-size:12px}
.live-extra b{color:#94a599;font-weight:550;margin-right:6px}
.live-empty{text-align:center;padding:60px 20px;color:#728678;font-size:14px}
@media(max-width:1020px){
  .live-list-head{display:none}
  .live-row{grid-template-columns:minmax(0,1fr) auto;gap:8px 15px;min-height:0;padding:17px 18px}
  .live-sequence{grid-column:1;grid-row:1}
  .live-person{grid-column:1;grid-row:2}
  .live-validity{grid-column:2;grid-row:1;align-items:flex-end}
  .live-unit{grid-column:2;grid-row:2;text-align:right}
  .live-stream-names{grid-column:1/-1;grid-row:3}
  .live-stream-names::before{content:'可看直播 ';color:#829589;font-size:12px}
  .live-category-list{grid-column:1/-1;grid-row:4}
  .live-category-list::before{content:'觀看分類';color:#829589;font-size:12px;font-weight:500;margin-right:3px}
  .live-row-actions{grid-column:1/-1;grid-row:5;border-top:1px solid #eef2ef;padding-top:7px;margin-top:3px}
  .live-details{margin:0 18px 16px}
}
@media(max-width:720px){
  .live-row{padding:15px}
  .live-details{margin:0 15px 14px;padding:13px}
  .live-detail-section{display:block}
  .live-detail-section>strong{display:block;margin-bottom:8px}
}
@media(max-width:720px){
  .toolbar-actions{flex-wrap:wrap}
  .toolbar-actions .button{min-width:0}
  #template-download-btn{flex:1 1 100%}
}
