:root{font-family:Inter,"Noto Sans TC","Microsoft JhengHei",system-ui,sans-serif;font-size:16px;color:#1c2b45;background:#f4f6fa;--blue:#2459d3;--navy:#112746;--muted:#62718a;--line:#e1e7ef;--danger:#a8313e}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit;font-size:16px}button,a,input,select,textarea{touch-action:manipulation}button{cursor:pointer}button:disabled{opacity:.55;cursor:wait}button:focus-visible,a:focus-visible{outline:3px solid #67b5ff;outline-offset:3px}input,select,textarea{border:1px solid #c9d3e2;border-radius:9px;background:#fff;color:#1c2b45;padding:12px;min-height:48px;max-width:100%}input:focus,select:focus,textarea:focus{outline:2px solid #8baaf7;border-color:var(--blue)}label{display:grid;gap:8px;font-weight:600}textarea{width:100%;min-height:230px;line-height:1.65;font-family:ui-monospace,monospace;resize:vertical}p{line-height:1.7;margin:8px 0}h1,h2,h3{letter-spacing:-.035em;margin:0}h1{font-size:32px;line-height:1.35}h2{font-size:21px}h3{font-size:18px}a{color:inherit;text-decoration:none}.muted{color:var(--muted)}[hidden]{display:none!important}.primary,.secondary,.text-button,.icon-button{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:48px;padding:11px 18px;border-radius:9px;font-weight:600}.primary{background:var(--blue);color:#fff;border:1px solid var(--blue);box-shadow:0 3px 8px #2459d31c}.primary:hover{background:#1846b1}.secondary{background:#fff;color:#304261;border:1px solid #ccd6e4}.secondary:hover{background:#eef3fc}.text-button{border:0;color:#2256ba;background:transparent;padding:8px 4px}.icon-button{background:#f3f6fa;border:0;font-size:24px;min-width:48px;padding:4px}.danger-button{color:var(--danger);border-color:#e4b7bd}.app-shell{display:grid;grid-template-columns:252px minmax(0,1fr);min-height:100vh}.sidebar{background:var(--navy);color:#d3def1;padding:32px 18px;position:sticky;top:0;height:100vh;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:12px;font-size:20px;font-weight:700;letter-spacing:.06em;padding:0 8px}.brand b{font-weight:400;color:#8fb5ff;display:block;font-size:16px;letter-spacing:.16em;margin-top:2px}.brand-mark{display:grid;place-items:center;background:#4279ed;color:#fff;width:42px;height:46px;border-radius:12px;font-size:30px;font-weight:800;transform:skew(-7deg)}.sidebar-label{color:#96abc9;margin:48px 15px 14px}.sidebar nav{display:grid;gap:9px}.nav-item{border:0;border-radius:9px;display:flex;align-items:center;gap:12px;background:transparent;color:#c6d5eb;width:100%;padding:14px;text-align:left;min-height:52px}.nav-item>span:first-child{font-size:22px}.nav-item.active{color:#fff;background:#2b5798}.nav-item:hover{background:#24436d}.nav-count{margin-left:auto;background:#476c9f;padding:1px 7px;border-radius:7px;font-size:16px}.sidebar-bottom{margin-top:auto;padding-top:40px}.sidebar-bottom p{color:#92a9c8;padding:0 14px}.environment{font-size:16px;padding:12px 14px;display:flex;align-items:center;gap:9px}.dot{width:8px;height:8px;background:#6dd3b1;border-radius:50%;display:inline-block}.topbar{height:88px;border-bottom:1px solid var(--line);background:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 38px}.breadcrumb{color:var(--muted)}.breadcrumb span{margin:0 14px;color:#9ba8ba}.breadcrumb b{font-weight:500;color:#34455f}.admin-chip{display:flex;align-items:center;gap:12px}.avatar{display:grid;place-items:center;width:38px;height:38px;background:#e7edfb;color:#315cb7;border-radius:50%;font-weight:700}.content{max-width:1640px;margin:auto;padding:34px 38px 0}.page-heading,.section-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}.page-heading{margin-bottom:26px}.eyebrow{display:block;color:#536b90;font-size:16px;letter-spacing:.12em;font-weight:650;margin-bottom:10px}.toolbar{display:flex;gap:20px;justify-content:space-between;align-items:center;background:#fff;border:1px solid var(--line);border-radius:12px;padding:14px 18px;margin-bottom:20px}.customer-filter{display:flex;align-items:center;gap:14px}.customer-filter select{min-width:200px}.toolbar-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.notice{display:flex;gap:14px;padding:18px 20px;background:#edf3ff;border:1px solid #d3e0fb;border-radius:12px;margin-bottom:24px;color:#294a7b;align-items:flex-start}.notice p{margin:5px 0 0}.notice-icon{display:grid;place-items:center;flex:none;border:2px solid #557ec1;border-radius:50%;width:24px;height:24px;font-size:16px}.notice .text-button{white-space:nowrap;margin-left:auto}.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-bottom:32px}.metric{background:#fff;border:1px solid var(--line);border-radius:12px;padding:22px;position:relative;overflow:hidden}.metric:first-child{background:#214eab;color:#fff;border-color:#214eab}.metric-label{color:var(--muted)}.metric:first-child .metric-label,.metric:first-child p{color:#e1eaff}.metric-value{display:block;font-size:38px;font-weight:700;letter-spacing:-.045em;margin:14px 0 8px}.metric-value small{font-size:16px;font-weight:500;letter-spacing:0;margin-left:8px}.metric p{margin:0;color:var(--muted)}.section-heading{margin:0 0 18px}.section-heading p{margin:5px 0 0}.pill{background:#eaf0fc;color:#305894;border-radius:30px;font-size:16px;padding:7px 12px;display:inline-flex;white-space:normal;line-height:1.4}.category-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-bottom:28px}.category-card{padding:22px;background:#fff;border:1px solid var(--line);border-radius:12px;display:flex;flex-direction:column;min-height:238px}.category-top{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}.category-icon{width:42px;height:42px;background:#eef3fd;border-radius:11px;display:grid;place-items:center;font-size:22px;color:#4e72b2}.source-tag{color:var(--muted);font-size:16px}.category-number{font-size:30px;font-weight:700;line-height:1.4;margin:12px 0 4px;letter-spacing:-.04em}.category-number small{font-size:16px;color:var(--muted);font-weight:400;margin-left:8px}.category-card p{color:var(--muted);margin:4px 0}.category-card progress{width:100%;height:7px;border:0;border-radius:8px;background:#edf1f8;margin-top:auto;display:block;accent-color:#4b78dc}progress::-webkit-progress-bar{background:#edf1f8;border-radius:8px}progress::-webkit-progress-value{background:#4b78dc;border-radius:8px}.category-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:14px;color:var(--muted);font-size:16px}.two-column{display:grid;grid-template-columns:1.1fr 1fr;gap:22px;margin-bottom:24px}.panel{background:#fff;border:1px solid var(--line);border-radius:12px;padding:24px;min-width:0}.empty{padding:36px 20px;text-align:center;color:var(--muted);line-height:1.7}.empty-symbol{font-size:32px;color:#a6b9d7;margin-bottom:10px}.empty strong{color:#3a4e6d;display:block;font-size:18px}.empty p{max-width:420px;margin:8px auto}.empty .secondary{margin-top:12px}.table-wrap{background:#fff;border:1px solid var(--line);border-radius:12px;overflow:auto;margin-bottom:24px}table{width:100%;border-collapse:collapse;text-align:left;font-size:16px;white-space:nowrap}th{font-weight:600;background:#f8fafd;color:#53657f}td,th{padding:17px 20px;border-bottom:1px solid #e9edf4}tbody tr:last-child td{border:0}td strong{font-weight:600}td small{display:block;font-size:16px;color:var(--muted);margin-top:5px}.badge{display:inline-flex;align-items:center;gap:7px;padding:5px 10px;border-radius:6px;font-size:16px;white-space:nowrap;background:#eff2f7;color:#5e6f88}.badge.good,.badge.success{background:#e6f4ed;color:#26704e}.badge.warning,.badge.unconfigured{background:#fff3d9;color:#846010}.badge.danger,.badge.failed{background:#fcebef;color:#a13949}.run-item,.renewal-item,.stat-row{padding:16px 0;border-bottom:1px solid #e9edf4;display:flex;align-items:center;justify-content:space-between;gap:16px}.run-item:last-child,.renewal-item:last-child,.stat-row:last-child{border:0}.run-item p,.renewal-item p{margin:5px 0;color:var(--muted)}.run-item .badge,.renewal-item .badge{flex:none}.search-row{display:flex;gap:20px;margin:0 0 20px}.search-row label:first-child{flex:1}.search-row input{width:100%}.customer-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-bottom:24px}.customer-card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:24px;display:flex;flex-direction:column;gap:12px}.customer-card .customer-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:auto;padding-top:10px}.customer-card p{overflow-wrap:anywhere;color:var(--muted)}.customer-card h3{overflow-wrap:anywhere}.stat-row b{font-size:20px}.initial-loading{min-height:100vh;display:grid;place-items:center;color:var(--muted)}footer{display:flex;justify-content:space-between;gap:20px;border-top:1px solid var(--line);padding:24px 0 30px;color:var(--muted);margin-top:38px;font-size:16px}.toast{position:fixed;bottom:26px;left:50%;transform:translateX(-50%);max-width:calc(100vw - 32px);background:#142b4d;color:#fff;padding:16px 24px;border-radius:12px;box-shadow:0 8px 30px #172e5038;z-index:50;line-height:1.6}.toast.error{background:#8c3040;color:#fff}dialog{width:min(760px,calc(100vw - 32px));border:1px solid #d4ddea;border-radius:16px;padding:28px;max-height:calc(100dvh - 40px);overflow:auto;box-shadow:0 20px 90px #10274540}dialog::backdrop{background:#0c203f80;backdrop-filter:blur(3px)}.modal-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}.form-stack{display:grid;gap:20px}.form-actions{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap}.form-hint{color:var(--muted);font-size:16px;line-height:1.7}.error{color:var(--danger)}.check-label{display:flex;align-items:center;font-weight:400}.check-label input{min-height:24px;width:24px}.login-shell{display:grid;grid-template-columns:1.05fr 1fr;min-height:100vh}.login-story{background:radial-gradient(ellipse at 100% 0%,#2356a1 0%,transparent 65%),#102c51;color:#fff;padding:48px 9%;display:flex;flex-direction:column;justify-content:space-between;gap:60px}.login-story .brand{padding:0}.login-story .eyebrow{color:#9ec2ff}.login-story h1{font-size:46px;line-height:1.5}.login-story p{color:#c5d8f4;margin-top:24px;font-size:18px}.story-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:44px;color:#c8d9f5}.story-grid span{padding:16px 0;border-top:1px solid #5172a0}.login-story>span{color:#aec6e8}.login-panel{display:grid;place-items:center;padding:60px 36px;background:#fff}.login-form{width:100%;max-width:400px;display:grid;gap:24px}.login-form .pill{justify-self:start}.login-form h2{font-size:32px}.login-form>p{margin:0}.login-form .primary{margin-top:4px;justify-content:space-between;padding:14px 18px}.metric-value.danger-text{color:#a8313e}@media(min-width:1700px){.content{padding-top:42px}}@media(max-width:1250px){.category-grid,.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.customer-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.toolbar{align-items:flex-start;flex-direction:column}.sidebar{padding-left:12px;padding-right:12px}.app-shell{grid-template-columns:232px minmax(0,1fr)}.content{padding:28px 26px 0}.topbar{padding:0 26px}}@media(max-width:900px){.two-column{grid-template-columns:1fr}.notice{flex-wrap:wrap}.notice .text-button{margin-left:38px}.login-story{padding:40px}.login-story h1{font-size:36px}.login-story p{font-size:16px}}@media(max-width:720px){.app-shell{display:block}.sidebar{position:relative;height:auto;padding:20px 16px;gap:20px}.sidebar .brand b{display:inline;margin-left:8px}.sidebar-label,.sidebar-bottom{display:none}.sidebar nav{display:flex;overflow:auto;gap:6px;padding-bottom:4px}.nav-item{white-space:nowrap;width:auto;min-height:48px;padding:10px 13px;gap:8px}.nav-item>span:first-child{display:none}.topbar{height:70px;padding:0 18px}.content{padding:24px 18px 0}.page-heading{align-items:flex-start}.page-heading>.primary{padding:10px;white-space:nowrap}h1{font-size:26px}.eyebrow{letter-spacing:.06em}.metrics,.category-grid{gap:12px}.metric,.category-card{padding:18px 16px}.metric-value{font-size:32px}.category-card{min-height:230px}.category-top{flex-wrap:wrap;gap:8px}.category-card h3{font-size:18px}.category-foot{flex-wrap:wrap}.toolbar{padding:16px}.customer-filter{display:grid;width:100%}.customer-filter select{width:100%}.toolbar-actions{width:100%}.toolbar-actions .muted{width:100%}.toolbar-actions button{flex:1}.section-heading{flex-wrap:wrap;align-items:flex-start}.customer-grid{grid-template-columns:1fr}.panel{padding:20px}.search-row{flex-direction:column}.notice{padding:16px;gap:10px}.notice>div{flex:1;min-width:190px}.notice .text-button{margin-left:34px}.admin-chip{gap:8px}.breadcrumb span{margin:0 8px}.login-shell{display:block}.login-story{padding:28px;gap:34px;min-height:auto}.login-story h1{font-size:32px}.login-story>span,.story-grid,.login-story p{display:none}.login-panel{padding:36px 24px}.login-form{max-width:480px}.login-form h2{font-size:28px}footer{flex-direction:column;gap:8px}.form-actions button{flex:1}.run-item,.renewal-item{align-items:flex-start;flex-wrap:wrap}}
.mobile-logout{display:none}@media(max-width:720px){.mobile-logout{display:inline-flex}.admin-chip .avatar{display:none}}
.search-row{flex-wrap:wrap}.search-row label{min-width:150px;flex:1}.search-row input,.search-row select{width:100%}.category-card h3{min-height:50px}.category-number small{display:block;margin-left:0;margin-top:6px;letter-spacing:0}.customer-actions .text-button{min-height:44px}

.product-logo{display:block;width:44px;height:44px;object-fit:contain;flex:none}.operator-brand{display:flex;align-items:center;gap:18px;padding-top:12px}.operator-brand img{display:block;object-fit:contain;flex:none}.operator-brand>span{display:grid;gap:4px;color:#304563;font-size:18px;font-weight:600}.operator-brand>span>span{display:block;font-size:16px;font-weight:400}footer{align-items:center}footer .operator-brand{padding:0}footer .operator-brand>span{font-size:16px}.login-form .operator-brand{border-top:1px solid #e1e7ef;padding-top:22px;margin-top:4px}@media(max-width:720px){.product-logo{width:38px;height:38px}footer{align-items:flex-start}}

#roleBadge{font-size:14px}#view-users .panel h3:not(:first-child){margin-top:20px}@media(max-width:720px){#roleBadge{display:none}}

.category-overview{min-width:0;margin-bottom:28px}.category-overview .table-wrap{margin-bottom:0}.category-overview table{font-size:14px;min-width:900px}.category-overview th,.category-overview td{font-size:14px;padding:13px 16px}.category-overview thead th{white-space:nowrap}.category-overview .category-name{background:#fff;color:#233650;font-weight:600;min-width:180px;max-width:240px;white-space:normal}.category-overview .category-name small{display:block;font-size:14px;font-weight:400;color:var(--muted);margin-top:4px}.category-overview .category-numeric{text-align:right;font-variant-numeric:tabular-nums}.category-overview .category-ratio{min-width:100px;font-variant-numeric:tabular-nums}.category-overview .category-ratio span{display:block;margin-bottom:5px}.category-overview progress{display:block;width:86px;max-width:100%;height:5px;accent-color:#4b78dc;border:0}.category-overview .badge{font-size:14px}.category-overview .category-updated{white-space:normal;min-width:145px;color:var(--muted);font-variant-numeric:tabular-nums}.category-overview tbody tr:hover td,.category-overview tbody tr:hover .category-name{background:#f8faff}@media(max-width:720px){.category-overview th,.category-overview td{padding:12px}.category-overview{margin-bottom:24px}}

.token-expiry{font-size:14px;color:var(--muted)}#tokenNotice{background:#fff6e5;border-color:#ecd5a7;color:#76541b}#tokenNotice .notice-icon{border-color:#9c752a}

.setup-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.setup-details{border:1px solid var(--line);border-radius:10px;padding:16px}.setup-details summary{cursor:pointer;font-weight:600;min-height:30px}.setup-details[open] summary{margin-bottom:16px}.setup-details textarea{min-height:130px;font-size:14px}.setup-details .form-stack{gap:14px}.setup-status{white-space:pre-line;font-size:14px;line-height:1.7}.setup-status:empty{display:none}.setup-actions{position:sticky;bottom:-28px;background:white;padding:16px 0;border-top:1px solid var(--line)}dialog::backdrop{backdrop-filter:none}@media(max-width:600px){.setup-grid{grid-template-columns:1fr}}

.customer-table{min-width:0}.customer-table table{min-width:850px}.customer-table td,.customer-table th{padding:14px 16px}.customer-table .customer-name{min-width:200px;max-width:320px;white-space:normal;overflow-wrap:anywhere}.customer-table .customer-name small{font-size:14px}.customer-row-actions{display:flex;align-items:center;gap:14px}.customer-table tbody tr:hover{background:#f8faff}.customer-table .badge{font-size:14px}

dialog.sync-history-dialog{width:min(1120px,calc(100vw - 32px));max-width:1120px;max-height:90dvh;overflow:auto}.sync-history-dialog table{min-width:740px}.sync-history-dialog td:nth-child(3){white-space:normal;min-width:240px}.sync-history-pagination{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:20px;font-size:14px}.customer-row-actions{flex-wrap:wrap}

#view-customers>.section-heading{align-items:flex-end;gap:24px}#view-customers .customer-search-row{display:flex;align-items:flex-end;justify-content:flex-end;flex:0 1 600px;min-width:0;max-width:100%;gap:14px;margin:0}#view-customers .customer-search-row label{flex:1;min-width:0;max-width:380px;margin:0}#view-customers .customer-search-row input{width:100%;min-width:0}#view-customers #customerSearchCount{white-space:nowrap;padding-bottom:10px;font-size:14px}@media(max-width:800px){#view-customers .customer-search-row{flex:1 1 100%;justify-content:flex-start;flex-wrap:wrap}#view-customers .customer-search-row label{max-width:none;flex:1 1 240px}}

.customer-search-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}

#customerTable .customer-note{min-width:100px;max-width:220px;white-space:normal;overflow-wrap:anywhere}#customerTable th:last-child,#customerTable .customer-actions-cell{width:1%;white-space:nowrap;text-align:left}#customerTable .customer-row-actions{width:max-content;flex-wrap:nowrap;gap:8px;justify-content:flex-start}#customerTable .customer-row-actions .danger-button{margin-left:0}#customerTable table{min-width:1120px}

#view-devices>.panel+.panel{margin-top:24px}
