/* Shared brand header with a light, persistent administration sidebar. */
.sidebar{display:none}
.admin-ready .brand-header{position:fixed;inset:0 0 auto;z-index:20}
.admin-ready{padding:64px 0 0 204px}
.admin-ready .sidebar{position:fixed;inset:64px auto 0 0;width:204px;padding:16px 12px;display:flex;flex-direction:column;background:var(--bg);border-right:1px solid var(--border);z-index:10}
.nav-label{display:none}
.nav-item{width:100%;display:flex;align-items:center;gap:12px;text-align:left;background:transparent;color:var(--text);border:0;margin:4px 0;padding:10px 12px;border-radius:8px;min-height:44px;font-size:14px;font-weight:500}
.nav-icon{width:22px;height:22px;flex-shrink:0}.nav-copy{display:block}.nav-copy small{margin:2px 0 0;font-size:12px;font-weight:400;color:var(--muted)}
.nav-item.selected{background:var(--soft);color:var(--primary);font-weight:650}.nav-item:hover{background:#eaf0e5}
.student-link{display:block;margin:20px 12px;color:var(--muted);text-decoration:none;font-size:13px}.student-link:hover{color:var(--primary)}
.admin-ready #admin-account{margin:auto 0 0;display:flex;flex-direction:column;align-items:stretch;border-top:1px solid var(--border);padding:20px 12px 0;gap:16px}
.account-id{display:flex;align-items:center;gap:10px}.account-id strong{font-size:14px;overflow-wrap:anywhere}.account-id small{margin:0;font-size:12px}.avatar{width:36px;height:36px;display:grid;place-items:center;border-radius:50%;background:var(--soft);color:var(--primary);font-size:14px}
.admin-ready main{max-width:none;padding:0;margin:0;min-height:calc(100vh - 64px)}
.topbar{height:44px;display:flex;justify-content:space-between;align-items:center;padding:0 24px;font-size:13px;color:var(--muted)}.divider{margin:0 14px;color:#a5b1a6}#breadcrumb{color:var(--text);font-weight:500}
.page-content{padding:14px 24px 24px;max-width:1600px;margin:auto}.page-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px;gap:16px}.page-heading h1{font-size:24px;letter-spacing:0;margin:0 0 5px;font-weight:650}.page-heading p{font-size:14px;color:var(--muted);margin:0}
.summary-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:18px}.summary-grid article{border:1px solid var(--border);background:var(--surface);border-radius:9px;padding:12px 16px}.summary-grid article>span{color:var(--muted);font-size:14px}.summary-grid strong{display:block;font-size:24px;line-height:1.35;font-weight:600;margin-top:6px;font-variant-numeric:tabular-nums}.summary-grid .stat-text{font-size:19px;line-height:1.7}.summary-grid small{font-size:12px;margin-top:4px}
.data-panel{border:1px solid var(--border);background:var(--surface);border-radius:10px;overflow:hidden}.panel-toolbar{padding:12px 16px;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center;gap:16px}.panel-toolbar h2{font-size:14px;margin:0;display:flex;align-items:center;gap:8px}.count{background:var(--soft);border-radius:6px;font-size:12px;padding:2px 8px;font-weight:400}.table-hint{font-size:12px;color:var(--muted)}.table-scroll{overflow:auto}
.user-columns,.invite-columns{display:grid;grid-template-columns:minmax(140px,1.2fr) 100px minmax(150px,1fr) 190px;gap:16px;align-items:center;padding:10px 16px;min-width:690px;border-bottom:1px solid var(--border);font-size:13px}.table-head{background:#f1f4ed;color:var(--muted);font-size:13px;padding-top:9px;padding-bottom:9px}.table-actions{display:flex;gap:8px}.table-actions button{padding:8px;min-height:44px;font-size:13px;background:transparent;border:0;color:var(--primary)}.table-actions button:hover{background:var(--soft)}.identity-cell{font-weight:600;overflow-wrap:anywhere}.status{border-radius:6px;padding:4px 9px;font-size:12px;display:inline-block;justify-self:start;white-space:nowrap}.status.active{background:#e2eddf;color:#345f40}.status.inactive{background:#eeeee7;color:#596258}.status.expired{background:#fff0da;color:#85571e}.cell-muted{color:var(--muted);font-size:13px}
.pagination{padding:10px 16px;display:flex;align-items:center;justify-content:space-between;font-size:13px;color:var(--muted)}.pagination>div{display:flex;gap:8px}.pagination button,.topbar button{font-size:13px;min-height:34px;padding:6px 12px}.panel-note{margin:0;border-top:1px solid var(--border);padding:10px 16px;color:var(--muted);font-size:12px;background:#fafbf6}
.empty-state{text-align:center;padding:24px;color:var(--muted)}.empty-symbol{margin:0 auto 14px;width:46px;height:46px;border-radius:12px;display:grid;place-items:center;background:var(--soft);color:var(--primary);font-size:23px}.empty-state h3{font-size:14px;font-weight:500;color:var(--text);margin:0 0 8px}.empty-state p{font-size:13px;margin:0 0 16px}.empty-state button{font-size:13px;min-height:44px}.audit-entry{padding:18px 22px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:14px}.audit-entry time{font-size:13px;color:var(--muted)}
.dialog-heading{display:flex;justify-content:space-between;align-items:center;gap:16px}.dialog-heading h2{margin:0;font-size:22px}dialog{border-radius:16px;padding:26px;max-height:90vh;overflow:auto;box-shadow:0 20px 80px #10282030}dialog label{font-size:14px;margin-top:18px}dialog input,dialog select{font-size:14px;min-height:44px}dialog .muted{font-size:14px}.admin-ready footer{max-width:none;padding:24px 0 0;margin:0;font-size:12px;color:var(--muted)}button:disabled{cursor:not-allowed}.auth-layout{max-width:1040px;margin:auto}
@media(max-width:1100px){.admin-ready{padding-left:204px}.admin-ready .sidebar{width:204px;padding:16px 12px}.nav-item{font-size:14px;gap:12px;padding:10px 12px}.nav-copy small{font-size:12px}.page-content{padding:20px 24px}.topbar{padding:0 24px}.summary-grid{gap:12px}.summary-grid article{padding:16px}}
@media(max-width:720px){.admin-ready{padding:0}.admin-ready .brand-header{position:static}.admin-ready .sidebar{position:static;width:100%;padding:10px 16px;border-right:0;border-bottom:1px solid var(--border);display:block}.admin-ready #admin-nav{display:flex;gap:6px}.student-link,.account-id,.nav-copy small{display:none}.nav-item{margin:0;padding:10px 8px;justify-content:center;min-height:48px;font-size:13px;gap:7px;border-radius:10px}.nav-icon{width:20px;height:20px}.admin-ready #admin-account{margin:10px 0 0;border:0;padding:0;align-items:flex-end}.admin-ready #admin-logout{min-height:44px;font-size:12px;padding:8px 12px}.topbar{height:58px;padding:0 16px}.page-content{padding:18px 16px}.page-heading{align-items:flex-start;margin-bottom:20px;flex-wrap:wrap}.page-heading h1{font-size:25px}.page-heading p{line-height:1.7}.summary-grid{grid-template-columns:1fr 1fr;gap:10px}.summary-grid article{padding:14px}.summary-grid article:last-child{display:none}.summary-grid strong{font-size:27px}.panel-toolbar{padding:16px}.empty-state{padding:30px 16px}.panel-note,.pagination{padding:14px 16px}.audit-entry{padding:16px;align-items:flex-start;flex-direction:column;gap:5px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}

.empty-symbol{display:none}.admin-ready .page-heading .primary{font-size:13px;min-height:36px;padding:7px 14px;border-radius:7px}.admin-ready #admin-logout{font-size:13px;min-height:36px;padding:7px 12px}.empty-state button{min-height:36px;padding:7px 12px}.admin-ready .summary-grid article>span,.page-heading p{font-size:13px}@media(max-width:720px){.admin-ready{padding:0}.nav-item{min-height:48px}.admin-ready .page-heading .primary,.admin-ready #admin-logout,.pagination button,.topbar button{min-height:44px}}
#invitation-text{width:100%;resize:vertical;min-height:156px;border:1px solid var(--border);border-radius:8px;background:var(--bg);color:var(--text);padding:12px;font:13px/1.6 -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif}.empty-state p{max-width:520px;margin-left:auto;margin-right:auto}
.status-options{border:0;padding:0;margin:20px 0;display:grid;grid-template-columns:1fr 1fr;gap:10px}.status-options legend{font-size:14px;font-weight:600;margin-bottom:10px}.status-options label{display:flex;gap:10px;align-items:center;margin:0;padding:12px;border:1px solid var(--border);border-radius:9px;cursor:pointer;background:var(--surface)}.status-options label:has(input:checked){background:var(--soft);border-color:var(--primary)}.status-options input{width:16px;height:16px;min-height:0;padding:0;accent-color:var(--primary);flex-shrink:0}.status-options strong{font-size:13px}.status-options small{font-size:12px;font-weight:400;margin-top:3px}.status-options input:focus-visible{outline:2px solid var(--primary)}#access-dialog h2,#instances-dialog h2{font-size:20px;margin-bottom:12px}#instances-dialog{width:620px;max-width:calc(100vw - 32px)}.instance-detail{border:1px solid var(--border);border-radius:10px;padding:16px;margin:12px 0}.instance-meta{display:grid;grid-template-columns:80px 1fr;gap:8px;font-size:13px;margin:16px 0 0}.instance-meta dt{color:var(--muted)}.instance-meta dd{margin:0;overflow-wrap:anywhere}.instance-detail .row strong{font-size:14px}.invite-columns{grid-template-columns:minmax(140px,1fr) 90px minmax(140px,1fr) 240px}@media(max-width:440px){.status-options{grid-template-columns:1fr}}
/* Authentication is a focused card; these rules do not affect the dashboard. */
body:not(.admin-ready)>main{min-height:calc(100svh - 65px);max-width:none;padding:40px 20px;display:grid;place-items:center}body:not(.admin-ready) #admin-auth{display:block;width:100%;max-width:400px;margin:0;padding:28px 30px;background:var(--surface);border:1px solid var(--border);border-radius:16px;box-shadow:0 12px 40px #283e3010}#admin-auth .intro{text-align:center;margin-bottom:22px}#admin-auth .intro .eyebrow{font-size:12px;letter-spacing:1px;margin:12px 0 4px}#admin-auth .admin-login-description{font-size:12px;color:var(--muted);margin:0}.admin-login-symbol{display:grid;place-items:center;width:42px;height:42px;margin:auto;background:var(--soft);border:1px solid #d5e0d0;border-radius:12px;color:var(--primary)}.admin-login-symbol svg{width:24px;height:24px}#admin-auth .panel{padding:0;border:0;background:transparent;border-radius:0}#admin-auth h2{font-size:22px;line-height:1.4;margin:0 0 5px;text-align:center}#admin-auth .login-subtitle{font-size:12px;color:var(--muted);text-align:center;margin:0 0 24px}#admin-auth label{font-size:13px;margin:16px 0 7px;font-weight:500}#admin-auth input{min-height:42px;height:42px;padding:9px 12px;border:1px solid #c6d0c3;border-radius:7px;background:#fff;font-size:14px}#admin-auth input:focus{outline:0;border-color:var(--primary);box-shadow:0 0 0 3px #345f4c14}#admin-auth small{font-size:11px;line-height:1.6;color:var(--muted)}#admin-auth #login-submit{margin-top:24px;min-height:42px;padding:9px 14px;font-size:13px;border-radius:7px}#admin-auth #setup-toggle{font-size:12px;font-weight:400;margin:16px auto 0;min-height:36px;padding:7px 10px}#admin-auth .error{font-size:12px}@media(max-width:480px){body:not(.admin-ready)>main{padding:24px 16px;place-items:start center}body:not(.admin-ready) #admin-auth{padding:24px}#admin-auth #setup-toggle{min-height:44px}}
.management-tabs,.invite-filters{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 18px}.management-tabs button,.invite-filters button{background:transparent;border:1px solid var(--border);padding:8px 16px;min-height:38px;font-size:13px}.management-tabs .selected,.invite-filters .selected{background:var(--soft);color:var(--primary);border-color:#b6c8b2}.invite-filters{padding:14px 16px 0;margin-bottom:0}.duration-options{display:flex;flex-wrap:wrap;gap:8px;border:0;margin:18px 0;padding:0}.duration-options legend{font-size:13px;font-weight:600;margin-bottom:10px}.duration-options label{display:flex;align-items:center;gap:6px;margin:0;padding:8px 10px;border:1px solid var(--border);border-radius:7px;font-size:12px;cursor:pointer}.duration-options label:has(input:checked){background:var(--soft);border-color:var(--primary)}.duration-options input{width:14px;height:14px;min-height:0;padding:0;accent-color:var(--primary)}#batch-items{max-height:320px;overflow:auto;margin-top:16px}.batch-row{padding:12px 0;border-bottom:1px solid var(--border);display:flex;gap:8px;flex-wrap:wrap;align-items:center;justify-content:space-between}.batch-row code{font-size:12px;overflow-wrap:anywhere;max-width:100%}.batch-row button{min-height:34px;font-size:12px;padding:6px 10px}.batch-row textarea{width:100%;min-height:140px}.identity-cell small{font-size:12px;font-weight:400}.copy-status{color:var(--primary)}

/* 用户列表的操作列要同时容纳「管理授权」「查看实例」「重置密码」三个按钮。
   只加宽这一列（190px → 240px），并让按钮文字不换行——否则 flex 会把三个按钮
   压到 190px 里互相挤压/换行。按钮的 min-height:44px、配色与焦点样式沿用上面的既有规则；
   外层 .table-scroll 仍是 overflow:auto，窄屏照旧横向滚动，不影响邀请列表的 240px 规则。 */
.user-columns{grid-template-columns:minmax(140px,1.2fr) 100px minmax(150px,1fr) 240px}
.table-actions button{white-space:nowrap}
