:root {
  --sidebar: #223140;
  --sidebar-hover: #2c3d4d;
  --sidebar-active: #35495b;
  --canvas: #f5f6f8;
  --panel: #ffffff;
  --panel-muted: #f8f9fb;
  --line: #e2e5e9;
  --line-strong: #d3d7dc;
  --text: #17191d;
  --muted: #616771;
  --subtle: #858b94;
  --blue: #1167e8;
  --blue-hover: #0d59cc;
  --blue-soft: #eef5ff;
  --green: #219653;
  --green-soft: #eaf7ef;
  --red: #d83b35;
  --red-soft: #fff0ef;
  --amber: #b86b00;
  --amber-soft: #fff4df;
  --radius: 8px;
  --control-height: 46px;
  --focus: 0 0 0 3px rgba(17, 103, 232, .16);
}

/* v4.7 configuration center */
.template-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:16px; }
.template-card { display:grid; grid-template-columns:auto 1fr auto; gap:16px; align-items:center; padding:22px; border:1px solid var(--line); border-radius:16px; background:var(--panel); }
.template-card h3,.template-card p { margin:0 0 6px; }
.template-card p,.template-card small { color:var(--muted); }
.template-icon { display:grid; place-items:center; width:44px; height:44px; border-radius:12px; color:#d8b379; background:#332b21; font-size:22px; }
.modal-card.wide { width:min(760px,calc(100vw - 32px)); }
.config-page-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding:0 54px 20px 0; }
.config-page-heading h2 { margin:0 0 4px; font-size:24px; }
.config-page-heading p { margin:0; color:var(--muted); font-size:14px; }
.public-config-badge { display:inline-flex; margin-left:8px; padding:2px 7px; border-radius:999px; color:#175fae; background:#eaf3ff; font-size:11px; font-style:normal; vertical-align:middle; }
.template-assignment-field { display:grid; gap:9px; }
.template-assignment-field > span { color:var(--text-2); font-size:12px; font-weight:650; }
.template-user-picker { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; max-height:190px; overflow:auto; padding:10px; border:1px solid var(--line); border-radius:var(--radius); background:var(--canvas); }
.template-user-picker label { display:flex !important; align-items:center; gap:9px; min-width:0; padding:9px; border:1px solid var(--line); border-radius:var(--radius); background:var(--panel); cursor:pointer; }
.template-user-picker label > span { display:grid; min-width:0; }
.template-user-picker input[type="checkbox"] { appearance:auto !important; width:18px !important; min-width:18px !important; height:18px !important; min-height:0 !important; flex:0 0 18px; margin:0 !important; padding:0 !important; border:0 !important; border-radius:3px !important; box-shadow:none !important; }
.template-user-picker strong,.template-user-picker small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.template-user-picker small { color:var(--text-3); }
.modal.template-editor-modal { place-items:stretch center; overflow:auto; padding:24px; }
.modal.template-editor-modal > .template-editor-card { width:min(1180px,calc(100vw - 48px)); max-width:none; margin:auto; padding:30px 34px; }
.template-meta-grid { padding-bottom:22px; border-bottom:1px solid var(--line); }
.template-config-fields { display:grid; gap:18px; margin-top:22px; }
.template-config-group { padding:20px; border:1px solid var(--line); border-radius:12px; background:var(--panel-muted); }
.template-config-group > header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.template-config-group h3 { margin:0; font-size:16px; }
.template-config-group header span { color:var(--muted); font-size:12px; }
.template-config-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; }
.template-config-field { display:grid; gap:8px; min-width:0; }
.template-config-field.wide { grid-column:1 / -1; }
.template-config-field > span { display:grid; gap:2px; }
.template-config-field strong { color:var(--text); font-size:13px; }
.template-config-field small { color:var(--subtle); font-size:11px; }
.template-config-field input,.template-config-field textarea { width:100%; padding:10px 12px; border:1px solid var(--line-strong); border-radius:var(--radius); color:var(--text); background:#fff; font:inherit; outline:0; }
.template-config-field input { height:var(--control-height); }
.template-config-field textarea { min-height:118px; resize:vertical; line-height:1.55; }
.template-config-field input:focus,.template-config-field textarea:focus { border-color:var(--blue); box-shadow:var(--focus); }
.template-editor-footer { position:sticky; bottom:-30px; z-index:2; margin:24px -34px -30px !important; padding:16px 34px !important; background:rgba(255,255,255,.97); }
@media (max-width:900px) { .template-config-grid { grid-template-columns:1fr; } .template-config-field.wide { grid-column:auto; } }
.modal-card textarea,.side-drawer textarea { width:100%; resize:vertical; }
.config-toolbar { display:grid; grid-template-columns:1fr auto; gap:12px; align-items:end; }
.config-toolbar label { display:grid; gap:7px; }
.config-group { display:grid; gap:14px; }
.config-field { display:grid; gap:8px; padding:14px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.02); }
.config-field > span { display:flex; justify-content:space-between; gap:12px; }
.config-field small { color:var(--muted); font-weight:400; }
.permission-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.permission-switch { display:flex !important; align-items:flex-start; gap:10px; min-width:0; padding:13px; border:1px solid var(--line); border-radius:12px; background:var(--panel-muted); cursor:pointer; }
.permission-switch input { appearance:auto !important; width:18px !important; min-width:18px; height:18px !important; min-height:0 !important; margin:2px 0 0 !important; padding:0 !important; accent-color:var(--blue); }
.permission-switch span { display:grid; gap:3px; min-width:0; }
.permission-switch strong { font-size:13px; }
.permission-switch small { color:var(--muted); font-size:11px; line-height:1.45; }
.system-feature-card { display:grid; grid-template-columns:minmax(260px,1fr) repeat(2,minmax(180px,240px)) auto; gap:14px; align-items:center; margin-bottom:20px; padding:18px; border:1px solid var(--line); border-radius:14px; background:var(--panel); }
.system-feature-card h3,.system-snapshot-card h3 { margin:0 0 4px; }
.system-feature-card p,.system-snapshot-card p { margin:0; color:var(--muted); font-size:13px; }
.system-config-form,.system-snapshot-card { margin-top:18px; padding:20px; border:1px solid var(--line); border-radius:14px; background:var(--panel); }
.system-config-summary { margin-bottom:18px; padding:11px 13px; border-radius:10px; color:var(--muted); background:var(--panel-muted); font-size:13px; }
.system-config-form .template-editor-footer { margin:18px -20px -20px !important; padding:16px 20px !important; }
.system-snapshot-card .section-toolbar.compact { margin-bottom:12px; }
.snapshot-actions { display:flex; align-items:center; gap:8px; }
.danger-text { color:var(--red) !important; }
.clear-override { display:flex; align-items:center; gap:7px; color:var(--muted); font-size:12px; }
.sticky-drawer-footer { position:sticky; bottom:0; display:flex; justify-content:space-between; align-items:center; gap:14px; padding:16px 0; border-top:1px solid var(--line); background:var(--surface); }
.sticky-drawer-footer span { color:var(--muted); font-size:12px; }
.recovery-code-result { margin:14px 0; padding:14px; border:1px solid #8b6b38; border-radius:10px; background:#2d281f; }
.recovery-code-result code { display:block; margin-top:10px; color:#f2ca85; font-size:17px; letter-spacing:1px; user-select:all; }
@media (max-width:1100px) { .system-feature-card { grid-template-columns:1fr 1fr; } .system-feature-card > div,.system-feature-card > button { grid-column:1 / -1; } }
@media (max-width:760px) { .permission-grid,.system-feature-card { grid-template-columns:1fr; } .system-feature-card > * { grid-column:auto; } }

* { box-sizing: border-box; }
html, body { width: 100%; min-width: 980px; height: 100%; margin: 0; }
body { overflow: hidden; color: var(--text); background: var(--canvas); font: 15px/1.55 "PingFang SC", "Microsoft YaHei UI", "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 0; box-shadow: var(--focus); }
[hidden] { display: none !important; }
i[class^="ri-"], i[class*=" ri-"] { font-size: 20px; line-height: 1; }

.admin-shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); width: 100%; height: 100%; }
.admin-sidebar { display: flex; flex-direction: column; min-width: 0; padding: 22px 14px 16px; color: #eef2f5; background: var(--sidebar); }
.sidebar-brand { display: flex; align-items: center; gap: 13px; min-height: 58px; padding: 0 8px 20px; border-bottom: 1px solid rgba(255,255,255,.11); }
.sidebar-brand img { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 10px; object-fit: cover; }
.sidebar-brand > span { display: grid; min-width: 0; gap: 2px; }
.sidebar-brand strong { overflow: hidden; color: #fff; font-size: 17px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.sidebar-brand small { color: #aeb9c4; font-size: 13px; }
.sidebar-nav { display: grid; gap: 6px; margin-top: 18px; }
.nav-group-label { margin: 14px 12px 5px; color: #8292a1; font-size: 13px; font-weight: 600; }
.nav-item { display: flex; align-items: center; gap: 13px; width: 100%; min-height: 48px; padding: 0 14px; border: 0; border-radius: var(--radius); color: #d9e0e6; background: transparent; cursor: pointer; text-align: left; transition: background .16s ease, color .16s ease; }
.nav-item:hover { color: #fff; background: var(--sidebar-hover); }
.nav-item.active { color: #fff; background: var(--sidebar-active); font-weight: 650; }
.nav-item.active i { color: #5fa2ff; }
.admin-account { display: grid; grid-template-columns: 38px minmax(0,1fr) 20px; align-items: center; gap: 11px; width: 100%; min-height: 66px; margin-top: auto; padding: 10px; border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); color: #fff; background: rgba(255,255,255,.045); cursor: pointer; text-align: left; }
.admin-account:hover { background: rgba(255,255,255,.09); }
.account-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #fff; background: var(--blue); font-weight: 700; }
.admin-account > span:nth-child(2) { display: grid; min-width: 0; }
.admin-account strong, .admin-account small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-account strong { font-size: 14px; }
.admin-account small { color: #aeb9c4; font-size: 12px; }

.admin-main { display: grid; grid-template-rows: 96px minmax(0,1fr); min-width: 0; min-height: 0; background: var(--panel); }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-width: 0; padding: 0 26px; border-bottom: 1px solid var(--line); background: var(--panel); }
.page-header h1 { margin: 0 0 2px; font-size: 28px; line-height: 1.2; letter-spacing: -.6px; }
.page-header p { margin: 0; color: var(--muted); font-size: 14px; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.service-indicator { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.service-indicator > i { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(33,150,83,.1); }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--control-height); padding: 0 17px; border-radius: var(--radius); cursor: pointer; font-weight: 650; white-space: nowrap; transition: border-color .16s ease, background .16s ease, color .16s ease; }
.button i { font-size: 18px; }
.button.primary { border: 1px solid var(--blue); color: #fff; background: var(--blue); }
.button.primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
.button.secondary { border: 1px solid var(--line-strong); color: var(--text); background: #fff; }
.button.secondary:hover { color: var(--blue); border-color: #a8c8f4; background: #f8fbff; }
.button.danger { border: 1px solid #efb9b6; color: var(--red); background: #fff; }
.button.danger:hover { background: var(--red-soft); }
.button:disabled { opacity: .55; cursor: not-allowed; }
.icon-button { display: inline-grid; place-items: center; width: var(--control-height); height: var(--control-height); padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; cursor: pointer; }
.icon-button:hover { color: var(--blue); border-color: #a8c8f4; background: #f8fbff; }

.page-panel { min-width: 0; min-height: 0; overflow: auto; background: var(--panel); }
.page-panel[data-page-panel="users"] { display: grid; grid-template-rows: auto minmax(0,1fr) 62px; overflow: hidden; }
.filter-bar { display: flex; align-items: center; gap: 12px; padding: 20px 26px; border-bottom: 1px solid var(--line); }
.search-control { display: flex; align-items: center; gap: 10px; min-width: 280px; max-width: 430px; height: var(--control-height); flex: 1 1 360px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; }
.search-control:focus-within { border-color: var(--blue); box-shadow: var(--focus); }
.search-control i { color: var(--subtle); font-size: 18px; }
.search-control input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--text); background: transparent; }
.select-control { display: flex; align-items: center; height: var(--control-height); min-width: 188px; padding-left: 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--muted); background: #fff; }
.select-control span { padding-right: 8px; white-space: nowrap; }
.select-control select { min-width: 0; height: 100%; flex: 1; padding: 0 34px 0 4px; border: 0; outline: 0; color: var(--text); background: transparent; cursor: pointer; }

.data-table { min-width: 0; border-top: 0; background: #fff; }
.page-panel:not([data-page-panel="users"]) .data-table { margin: 0 26px 28px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table-head, .user-row { display: grid; grid-template-columns: minmax(240px,1.65fr) 100px 90px 130px 160px 150px; align-items: center; gap: 12px; }
.table-head, .device-table-head, .audit-table-head { min-height: 50px; padding: 0 26px; color: var(--muted); background: var(--panel-muted); border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.table-body { min-height: 0; overflow: auto; }
.user-row { position: relative; width: 100%; min-height: 72px; padding: 0 26px; border: 0; border-bottom: 1px solid var(--line); background: #fff; cursor: pointer; text-align: left; }
.user-row:hover { background: #fafcff; }
.user-row.active { background: var(--blue-soft); }
.user-row.active::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--blue); }
.user-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.user-avatar, .drawer-avatar { display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #373b41; background: #eef0f3; font-weight: 700; }
.user-avatar { width: 40px; height: 40px; }
.drawer-avatar { width: 56px; height: 56px; font-size: 20px; }
.user-cell > span:last-child { display: grid; min-width: 0; }
.user-cell strong, .user-cell small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-cell strong { font-size: 15px; }
.user-cell small { color: var(--subtle); font-size: 13px; }
.status-pill { display: inline-flex; align-items: center; width: max-content; min-height: 26px; padding: 2px 9px; border-radius: 999px; font-size: 13px; font-weight: 650; }
.status-pill.active { color: var(--green); background: var(--green-soft); }
.status-pill.disabled, .status-pill.neutral { color: #68707b; background: #eef0f3; }
.status-pill.expiring { color: var(--amber); background: var(--amber-soft); }
.status-pill.failed { color: var(--red); background: var(--red-soft); }
.role-text, .expiry-text, .last-login-text { color: var(--muted); font-size: 14px; }
.expiry-text small, .last-login-text small { display: block; color: var(--subtle); font-size: 12px; }
.row-action { width: 38px; height: 38px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; cursor: pointer; }
.row-action:hover { color: var(--blue); background: #e4efff; }
.row-actions { display:flex; align-items:center; justify-content:flex-end; gap:6px; }
.row-config-action { min-height:36px; padding:0 10px; font-size:13px; }
.row-config-action i { font-size:16px; }
.table-footer { display: flex; align-items: center; justify-content: space-between; padding: 0 26px; border-top: 1px solid var(--line); color: var(--muted); background: #fff; }
.pagination { display: flex; align-items: center; gap: 8px; }
.pagination .icon-button { width: 38px; height: 38px; }
.pagination strong { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 7px; color: #fff; background: var(--blue); }
.pagination select { height: 38px; padding: 0 30px 0 10px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; }

.section-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 26px 18px; }
.section-toolbar h2 { margin: 0 0 2px; font-size: 20px; }
.section-toolbar p { margin: 0; color: var(--muted); font-size: 14px; }
.toolbar-actions { display:flex; align-items:center; justify-content:flex-end; gap:10px; flex-wrap:wrap; }
.device-table-head, .device-row { display: grid; grid-template-columns: minmax(150px,1.1fr) minmax(180px,1.35fr) minmax(150px,1fr) 150px 150px 70px; align-items: center; gap: 14px; }
.audit-table-head, .audit-row { display: grid; grid-template-columns: 170px minmax(150px,1fr) minmax(220px,1.5fr) 150px 90px; align-items: center; gap: 14px; }
.device-row, .audit-row { min-height: 68px; padding: 0 26px; border-bottom: 1px solid var(--line); }
.device-row:last-child, .audit-row:last-child { border-bottom: 0; }
.device-row strong, .audit-row strong { display: block; font-size: 14px; }
.device-row small, .audit-row small { color: var(--subtle); font-size: 12px; }
.audit-pagination-bar { display:flex; align-items:center; justify-content:space-between; gap:18px; margin:-10px 26px 26px; padding:14px 16px; border:1px solid var(--line); border-radius:var(--radius); color:var(--muted); background:#fff; font-size:13px; }
.audit-pagination-bar .pagination > span { min-width:48px; color:var(--muted); }
.text-button { padding: 8px; border: 0; color: var(--red); background: transparent; cursor: pointer; font-weight: 650; }
.text-button:hover { text-decoration: underline; }

.settings-layout { display: grid; grid-template-columns: minmax(560px,820px) minmax(260px,360px); gap: 18px; padding: 28px; align-items: start; }
.settings-section, .boundary-note { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.settings-section { padding: 24px; }
.settings-section > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.settings-section h2 { margin: 0 0 3px; font-size: 20px; }
.settings-section p { margin: 0; color: var(--muted); font-size: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 18px; }
.form-grid.single { grid-template-columns: 1fr; }
.form-grid label, .side-drawer form > label, .login-card > label { display: grid; gap: 7px; color: var(--muted); font-size: 14px; font-weight: 600; }
.form-grid label > span, .side-drawer form > label > span:first-child, .login-card > label > span:first-child { color: var(--text); }
.form-grid input, .form-grid select, .settings-section input, .side-drawer input, .login-card input { width: 100%; height: var(--control-height); padding: 0 13px; border: 1px solid var(--line-strong); border-radius: var(--radius); outline: 0; color: var(--text); background: #fff; }
.form-grid input:focus, .form-grid select:focus, .settings-section input:focus, .side-drawer input:focus, .login-card input:focus { border-color: var(--blue); box-shadow: var(--focus); }
.full-field { grid-column: 1 / -1; }
.settings-section > footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.boundary-note { display: flex; gap: 14px; padding: 20px; background: var(--panel-muted); }
.boundary-note i { color: var(--blue); font-size: 24px; }
.boundary-note strong { font-size: 15px; }
.boundary-note p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.cos-page-toolbar { padding-bottom:14px; }
.cos-release-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin:0 26px 18px; }
.cos-release-summary > span { display:grid; grid-template-columns:42px minmax(0,1fr); grid-template-rows:auto auto; column-gap:12px; padding:16px 18px; border:1px solid var(--line); border-radius:var(--radius); background:var(--panel-muted); }
.cos-release-summary i { grid-row:1 / 3; align-self:center; display:grid; place-items:center; width:42px; height:42px; border-radius:10px; color:var(--blue); background:var(--blue-soft); font-size:21px; }
.cos-release-summary strong { align-self:end; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:15px; }
.cos-release-summary small { color:var(--muted); }
.cos-upload-card { display:grid; gap:20px; margin:0 26px 18px; padding:24px; border:1px solid var(--line); border-radius:var(--radius); background:linear-gradient(135deg,#fff 0%,#f6f9ff 100%); }
.cos-upload-heading { display:flex; align-items:center; gap:13px; }
.cos-upload-heading > span { display:grid; place-items:center; width:44px; height:44px; flex:0 0 44px; border-radius:12px; color:#fff; background:var(--blue); font-size:22px; box-shadow:0 8px 20px rgba(0,113,227,.18); }
.cos-upload-heading > div { display:grid; gap:4px; }
.cos-upload-heading strong { font-size:16px; }
.cos-upload-heading small,.cos-file-field small { color:var(--muted); }
.cos-upload-fields { display:grid; grid-template-columns:minmax(300px,.95fr) minmax(360px,1.05fr); align-items:stretch; gap:18px 20px; }
.cos-upload-fields label { display:grid; grid-template-rows:auto auto; align-content:start; gap:8px; min-width:0; color:var(--muted); font-size:13px; font-weight:650; }
.cos-file-field { grid-template-rows:auto 44px auto !important; align-self:stretch; padding:18px; border:1px solid #dce5f1; border-radius:12px; background:rgba(255,255,255,.78); }
.cos-upload-detail-stack { display:grid; grid-template-rows:auto auto; align-content:start; gap:14px; min-width:0; }
.cos-upload-fields input,.cos-upload-fields textarea { width:100%; height:44px; border:1px solid var(--line-strong); border-radius:10px; background:#fff; color:var(--text); font:inherit; padding:0 12px; outline:none; }
.cos-upload-fields input:focus,.cos-upload-fields textarea:focus { border-color:var(--blue); box-shadow:var(--focus); }
.cos-upload-fields input[type=file] { height:44px; padding:7px 8px; }
.cos-upload-fields textarea { height:96px; min-height:96px; padding:11px 12px; resize:vertical; line-height:1.5; }
.cos-file-field small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:400; }
.cos-upload-actions { display:flex; grid-column:1 / -1; align-items:center; justify-content:flex-end; padding-top:16px; border-top:1px solid var(--line); }
.cos-upload-button { min-width:142px; height:44px; min-height:44px; white-space:nowrap; }
.cos-upload-progress { display:grid; grid-template-columns:minmax(160px,1fr) auto auto; align-items:center; gap:12px; }
.cos-upload-progress > span { height:8px; overflow:hidden; border-radius:99px; background:#dfe8f5; }
.cos-upload-progress > span i { display:block; width:0; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--blue),#55a7ff); transition:width .2s ease; }
.cos-upload-progress strong { font-size:13px; }
.cos-upload-progress small { min-width:42px; text-align:right; color:var(--blue); font-weight:750; }
.cos-release-list { display:grid; gap:10px; margin:0 26px 18px; }
.cos-release-row { display:grid; grid-template-columns:minmax(300px,1.6fr) 110px 150px 120px 92px; align-items:center; gap:14px; min-height:78px; padding:13px 16px; border:1px solid var(--line); border-radius:var(--radius); background:#fff; }
.cos-release-file { display:grid; grid-template-columns:42px minmax(0,1fr); align-items:center; gap:12px; min-width:0; }
.cos-release-file > i { display:grid; place-items:center; width:42px; height:42px; border-radius:10px; color:#fff; background:#2f3c4a; }
.cos-release-file > span { display:grid; min-width:0; }
.cos-release-file strong,.cos-release-file small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cos-release-file small,.cos-release-meta small { color:var(--subtle); }
.cos-release-meta { display:grid; }
.cos-release-version { color:var(--blue); font-weight:700; }
.cos-release-delete { min-height:38px; padding:0 12px; justify-self:end; }
.cos-release-list > .empty-state { min-height:220px; border:1px dashed var(--line-strong); border-radius:var(--radius); background:var(--panel-muted); }
.cos-boundary-note { margin:0 26px 28px; }
.cos-settings-card { width:min(720px,calc(100vw - 36px)); }
.cos-retention-note { display:flex; align-items:center; gap:12px; padding:14px; border:1px solid #cfe0f7; border-radius:var(--radius); color:var(--blue); background:var(--blue-soft); }
.cos-retention-note i { flex:0 0 auto; font-size:24px; }
.cos-retention-note > span { display:grid; gap:2px; }
.cos-retention-note small { color:var(--muted); font-weight:400; }

.status-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; padding: 28px; }
.status-card { display: flex; align-items: flex-start; gap: 15px; min-height: 126px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.status-card > i { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; border-radius: 9px; color: var(--blue); background: var(--blue-soft); font-size: 23px; }
.status-card strong { display: block; font-size: 16px; }
.status-card em { display: block; margin-top: 5px; color: var(--green); font-size: 22px; font-style: normal; font-weight: 750; }
.status-card p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 40; background: transparent; }
.drawer-open .admin-shell { padding-right: 360px; }
.side-drawer { position: fixed; inset: 0 0 0 auto; z-index: 41; width: min(360px,92vw); overflow-y: auto; padding: 28px 24px 24px; border-left: 1px solid var(--line); background: #fff; box-shadow: -10px 0 30px rgba(20,28,36,.08); }
.drawer-close { position: absolute; top: 20px; right: 18px; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; }
.drawer-close:hover { background: var(--panel-muted); }
.drawer-eyebrow { color: var(--blue); font-size: 12px; font-weight: 750; letter-spacing: .11em; }
.side-drawer h2 { margin: 5px 42px 3px 0; font-size: 22px; }
.side-drawer h2 + p, .side-drawer form > p { margin: 0 42px 22px 0; color: var(--muted); font-size: 14px; }
.security-drawer form > label { margin-top: 18px; }
.security-drawer form { display: flex; min-height: calc(100vh - 52px); flex-direction: column; }
.password-control { position: relative; display: block; }
.password-control input { padding-right: 46px; }
.password-control button { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; cursor: pointer; }
.password-strength { display: grid; gap: 7px; margin: 14px 0 2px; }
.password-strength span { color: var(--muted); font-size: 13px; }
.password-strength span strong { color: var(--text); }
.password-strength meter { width: 100%; height: 8px; }
.password-strength small { color: var(--subtle); font-size: 12px; }
.checkbox-row { display: grid !important; grid-template-columns: 20px minmax(0,1fr); align-items: start; gap: 10px !important; margin-top: 20px !important; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-muted); cursor: pointer; }
.checkbox-row input { width: 18px; height: 18px; margin: 2px 0 0; padding: 0; }
.checkbox-row > span { display: grid; gap: 2px; }
.checkbox-row strong { font-size: 14px; }
.checkbox-row small { color: var(--muted); font-size: 12px; font-weight: 400; }
.drawer-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.security-drawer .drawer-footer { margin-top: auto; }
.drawer-profile { display: flex; align-items: center; gap: 13px; margin: 8px 0 22px; padding-right: 42px; }
.drawer-profile > span:last-child { min-width: 0; }
.drawer-profile h2 { margin: 0; }
.drawer-profile p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.drawer-tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); }
.drawer-tabs button { min-height: 44px; padding: 0; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; cursor: pointer; }
.drawer-tabs button.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 650; }
.drawer-section { padding: 20px 0; border-bottom: 1px solid var(--line); }
.drawer-section h3 { margin: 0 0 13px; font-size: 16px; }
.fact-list { display: grid; gap: 13px; }
.fact-row { display: grid; grid-template-columns: 115px minmax(0,1fr); gap: 12px; }
.fact-row span { color: var(--muted); font-size: 13px; }
.fact-row strong { font-size: 14px; font-weight: 600; }
.drawer-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.drawer-list { display: grid; }
.drawer-list-item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.drawer-list-item:first-child { border-top: 0; }
.drawer-list-item strong, .drawer-list-item small { display: block; }
.drawer-list-item strong { font-size: 14px; }
.drawer-list-item small { color: var(--subtle); font-size: 12px; }
.compact-empty { min-height:90px; padding:18px; }

.login-screen, .modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; background: rgba(240,243,247,.94); }
.login-card, .modal-card { width: min(460px,100%); padding: 28px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 22px 65px rgba(20,28,36,.14); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.login-brand img { width: 48px; height: 48px; border-radius: 10px; }
.login-brand > span { display: grid; }
.login-brand strong { font-size: 17px; }
.login-brand small { color: var(--muted); font-size: 13px; }
.login-card h1 { margin: 0 0 3px; font-size: 25px; }
.login-card > p { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.login-card > label { margin-top: 15px; }
.login-card > .button { width: 100%; margin-top: 22px; }
.modal-card { width: min(610px,100%); }
.modal-card.compact { width: min(480px,100%); }
.modal-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.modal-card h2 { margin: 0 0 3px; font-size: 21px; }
.modal-card header p { margin: 0; color: var(--muted); font-size: 14px; }
.modal-close { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; }
.modal-close:hover { background: var(--panel-muted); }
.modal-card > footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.modal-card footer .form-message { margin-right: auto; }
.form-message { min-height: 20px; color: var(--red); font-size: 13px; }
.empty-state { display: grid; place-items: center; align-content: center; gap: 9px; min-height: 220px; padding: 32px; color: var(--subtle); text-align: center; }
.empty-state i { font-size: 26px; }
.empty-state strong { font-size: 14px; font-weight: 600; }
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 100; max-width: min(520px,90vw); padding: 12px 17px; border-radius: 8px; color: #fff; background: #24282f; opacity: 0; transform: translate(-50%,12px); pointer-events: none; transition: .2s ease; box-shadow: 0 12px 32px rgba(0,0,0,.18); }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.spin { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1180px) {
  .admin-shell { grid-template-columns: 86px minmax(0,1fr); }
  .admin-sidebar { padding-inline: 12px; }
  .sidebar-brand { justify-content: center; padding-inline: 0; }
  .sidebar-brand > span, .nav-item span, .nav-group-label, .admin-account > span:nth-child(2), .admin-account > i { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .admin-account { display: flex; justify-content: center; padding: 10px 0; }
  .filter-bar { flex-wrap: wrap; }
  .search-control { max-width: none; }
  .settings-layout { grid-template-columns: 1fr; }
  .cos-release-row { grid-template-columns:minmax(280px,1fr) 90px 130px 92px; }
  .cos-release-row > .cos-release-time { display:none; }
}

@media (max-width: 1020px) {
  html, body { min-width: 760px; }
  .table-head, .user-row { grid-template-columns: minmax(220px,1.5fr) 95px 80px 120px 150px; }
  .table-head span:nth-child(5), .user-row > .last-login-text { display: none; }
  .select-control { min-width: 170px; }
  .page-header { padding-inline: 20px; }
}

@media (max-width: 900px) {
  .cos-upload-fields { grid-template-columns:1fr; }
  .cos-upload-actions { grid-column:1; }
}
