:root {
  --navy: #10233f;
  --navy-2: #17314f;
  --blue: #087f8c;
  --blue-dark: #066a75;
  --blue-soft: #e7f4f5;
  --bg: #f4f6fa;
  --panel: #fff;
  --text: #10233f;
  --muted: #637286;
  --line: #d8e1ea;
  --success: #11875d;
  --warning: #b66a00;
  --danger: #c23b45;
  --shadow: 0 12px 30px rgba(16, 35, 63, .12);
  font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); font-size: 14px; line-height: 1.55; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: var(--bg); }
.login-card { width: min(410px, 100%); background: #fff; padding: 42px; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.login-card h1 { margin: 6px 0 4px; font-size: 28px; }
.login-card > .brand-mark { margin-bottom: 20px; }
.brand-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 10px; color: #fff; background: var(--blue); font-weight: 800; font-size: 23px; box-shadow: 0 8px 20px rgba(8,127,140,.22); }
.brand-mark.small { width: 32px; height: 32px; border-radius: 8px; font-size: 16px; box-shadow: none; }
.eyebrow { margin: 0; color: var(--blue); font-weight: 800; letter-spacing: .13em; font-size: 11px; }
.muted { color: var(--muted); }

.stack-form { margin-top: 28px; display: grid; gap: 17px; }
.compact-stack { margin-top: 18px; gap: 13px; }
.totp-setup { margin-top: 24px; }
.totp-setup h2 { margin: 0 0 6px; font-size: 21px; }
.totp-setup > p { margin: 6px 0 16px; }
.totp-qr { display: grid; place-items: center; min-height: 224px; margin: 15px 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.totp-qr img { display: block; width: min(220px, 100%); height: auto; image-rendering: pixelated; }
.copy-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.copy-field input { font: 14px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .08em; }
.setup-expiry { color: var(--warning); font-size: 13px; text-align: center; }
label { display: grid; gap: 6px; color: #364156; font-weight: 650; }
label small { color: var(--muted); font-weight: 400; }
input, textarea, select { width: 100%; border: 1px solid #cdd6e3; border-radius: 7px; padding: 9px 11px; color: var(--text); background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(8,127,140,.14); }
button:focus-visible, a:focus-visible { outline: 3px solid rgba(8,127,140,.28); outline-offset: 2px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 228px minmax(0, 1fr); min-width: 0; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 228px; display: flex; flex-direction: column; padding: 22px 14px 16px; color: #d9e5f5; background: var(--navy); z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 24px; color: white; font-size: 16px; font-weight: 750; }
#main-nav { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; border-radius: 7px; padding: 10px 12px; text-align: left; color: #afbed2; background: transparent; font-weight: 600; }
.nav-item span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 5px; color: #d8edf0; background: rgba(255,255,255,.08); text-align: center; font-size: 12px; }
.nav-item:hover, .nav-item:focus-visible { color: #fff; background: rgba(255,255,255,.08); outline: none; }
.nav-item.active { color: #fff; background: rgba(8,127,140,.56); box-shadow: inset 3px 0 #65c5ce; }
.account-card { margin-top: auto; padding: 13px 8px 0; border-top: 1px solid rgba(255,255,255,.12); display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 9px; min-width: 0; }
.account-card strong, .account-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-card small { color: #93a6c2; margin-top: 2px; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; background: #d8f0f2; color: #075d67; border-radius: 50%; font-weight: 800; }
.workspace { grid-column: 2; min-width: 0; }
.workspace main { min-width: 0; padding: 30px clamp(20px, 3.5vw, 52px) 56px; max-width: 1600px; margin: auto; }
.mobile-header { display: none; }

.page { display: none; min-width: 0; }
.page.active { display: block; animation: appear .16s ease-out; }
@keyframes appear { from { opacity: .4; transform: translateY(3px); } }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 22px; }
.page-heading h1 { margin: 3px 0 2px; font-size: 26px; line-height: 1.25; }
.page-heading p:last-child { margin: 0; color: var(--muted); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 2px 7px rgba(32,54,86,.04); }
.panel.compact { padding: 12px 14px; }
.toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.toolbar.wrap { flex-wrap: wrap; }
.toolbar label { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.toolbar select { width: 160px; }
.search-field { position: relative; flex: 1; min-width: 220px; }
.search-field > span { position: absolute; left: 11px; color: var(--muted); z-index: 1; }
.search-field input { padding-left: 32px; }
.count-label { color: var(--muted); white-space: nowrap; }
.user-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 5px; max-width: 280px; white-space: normal; }
.user-tag { display: inline-block; padding: 2px 7px; border-radius: 5px; color: var(--blue-dark); background: var(--blue-soft); font-size: 12px; overflow-wrap: anywhere; }
.tag-create-form { display: flex; gap: 10px; align-items: flex-end; }
.tag-create-form label { flex: 1; min-width: 0; }
.tag-manager-list { display: grid; gap: 10px; max-height: 45vh; overflow: auto; }
.tag-manager-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.tag-manager-row input { flex: 1; min-width: 130px; }
.tag-manager-row small { color: var(--muted); }
#user-bulk-controls { flex-wrap: wrap; }

.button, .icon-button { border: 1px solid transparent; border-radius: 7px; font-weight: 700; transition: background .15s, border-color .15s, opacity .15s; }
.button { padding: 9px 15px; }
.button.small { padding: 6px 10px; font-size: 13px; }
.button.wide { width: 100%; }
.button.primary { color: #fff; background: var(--blue); }
.button.primary:hover { background: var(--blue-dark); }
.button.secondary { color: #25334a; border-color: #cbd5e2; background: #fff; }
.button.secondary:hover, .button.ghost:hover { background: #f0f4f9; }
.button.ghost { color: #41506a; background: transparent; }
.button.danger { color: var(--danger); background: #fff; border-color: #efc4c7; }
.button.danger:hover { background: #fff2f3; }
.button:disabled { opacity: .45; cursor: not-allowed; }
.icon-button { display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0; color: inherit; background: transparent; font-size: 20px; }
.icon-button:hover { background: rgba(128,145,168,.15); }
.button-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.activation-panel { display: grid; grid-template-columns: minmax(300px, .9fr) minmax(320px, 1.1fr); gap: 28px; padding: 24px; }
.activation-panel form { display: grid; gap: 11px; }
.result-placeholder { min-height: 190px; display: grid; place-content: center; justify-items: center; color: var(--muted); text-align: center; border: 1px dashed #ccd6e3; border-radius: 8px; background: #f9fbfd; }
.result-placeholder p { margin: 5px; }
.empty-icon { font-size: 30px; color: #9bb0ca; }
.decoded-card { display: grid; gap: 14px; }
.decoded-card h2 { margin: 0; font-size: 18px; }
.meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.meta-grid div { padding: 10px 12px; background: #f5f8fc; border-radius: 7px; min-width: 0; }
.meta-grid small { display: block; color: var(--muted); }
.meta-grid strong { display: block; overflow-wrap: anywhere; margin-top: 2px; }

.split-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, .7fr); gap: 14px; align-items: start; }
.table-panel { min-width: 0; overflow: hidden; }
.table-scroll { max-width: 100%; overflow: auto; overscroll-behavior-inline: contain; }
table { width: 100%; min-width: 680px; border-collapse: collapse; white-space: nowrap; }
th, td { padding: 11px 13px; text-align: left; border-bottom: 1px solid #e8edf3; }
th { color: #637086; background: #f7f9fc; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: #f6f9fe; }
tbody tr.selected { background: #edf4ff; }
tbody tr.clickable { cursor: pointer; }
.check-col { width: 42px; }
td strong, td small { display: block; }
td small { color: var(--muted); }
.bulk-strip { min-height: 48px; display: flex; align-items: center; gap: 16px; padding: 8px 13px; border-bottom: 1px solid var(--line); background: #fbfcfe; }
.bulk-strip label { display: flex; align-items: center; gap: 7px; }
.bulk-strip input { width: auto; }
.bulk-strip .button { margin-left: auto; }
.content-status { padding: 22px; color: var(--muted); text-align: center; }
.content-status:empty { display: none; }
.detail-panel { position: sticky; top: 20px; min-height: 260px; padding: 18px; }
.detail-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.detail-head h2 { margin: 0 0 2px; font-size: 18px; }
.device-code { color: var(--muted); font-family: ui-monospace, monospace; overflow-wrap: anywhere; }
.grant-section { margin-top: 17px; }
.grant-section h3 { margin: 0 0 9px; font-size: 14px; }
.grant-list { display: grid; gap: 7px; max-height: 440px; overflow: auto; }
.grant-item { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px; }
.grant-item small { display: block; color: var(--muted); }
.badge, .chip { display: inline-flex; align-items: center; width: fit-content; padding: 2px 7px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge.own, .chip { color: #066a75; background: #e7f4f5; }
.badge.readonly { color: #6d7480; background: #eef1f5; }
.badge.published, .badge.success { color: #087652; background: #e7f7f1; }
.badge.unpublished, .badge.pending { color: #9b5c06; background: #fff3dc; }
.badge.running { color: #066a75; background: #e7f4f5; }
.badge.failed { color: #a62f39; background: #fdecee; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.announcement-card { display: flex; flex-direction: column; min-height: 210px; padding: 18px; }
.announcement-card h2 { margin: 7px 0; font-size: 18px; }
.announcement-title-link { border: 0; padding: 0; background: none; color: inherit; font: inherit; text-align: left; overflow-wrap: anywhere; }
.announcement-title-link:hover { color: var(--blue); text-decoration: underline; }
.announcement-card .excerpt { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; color: #4f5a6c; white-space: pre-wrap; }
.announcement-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.announcement-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 17px; }

.status-legend { display: flex; gap: 22px; margin-bottom: 14px; flex-wrap: wrap; }
.status-legend span { display: flex; align-items: center; gap: 7px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #8793a5; }
.dot.pending { background: #d3881c; }.dot.running { background: var(--blue); }.dot.success { background: #19a170; }.dot.failed { background: #d04b55; }
.workflow-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0 0 14px; padding: 0; list-style: none; overflow: hidden; }
.workflow-steps li { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: start; padding: 16px 18px; }
.workflow-steps li + li { border-left: 1px solid var(--line); }
.workflow-steps li > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; background: var(--blue); font-weight: 800; }
.workflow-steps strong, .workflow-steps small { display: block; }
.workflow-steps small { margin-top: 3px; color: var(--muted); line-height: 1.45; }
.job-error { max-width: 380px; white-space: normal; color: var(--danger); }
.audit-summary { min-width: 200px; max-width: 420px; white-space: normal; overflow-wrap: anywhere; }
.audit-pagination { display: flex; justify-content: flex-end; padding: 12px; }
.audit-detail-content { margin: 0; max-height: 360px; padding: 14px; overflow: auto; background: #f3f6fa; border: 1px solid var(--line); border-radius: 7px; white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.6 ui-monospace, Consolas, monospace; }

.dialog-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(5,17,37,.55); backdrop-filter: blur(2px); }
dialog { padding: 0; border: 0; border-radius: 12px; max-width: calc(100vw - 28px); max-height: calc(100vh - 28px); box-shadow: var(--shadow); z-index: 90; }
dialog::backdrop { background: transparent; }
.dialog-card { display: grid; gap: 15px; width: min(680px, calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: 22px; overflow: auto; }
.compact-dialog { width: min(560px, calc(100vw - 28px)); }
.large-dialog { width: min(780px, calc(100vw - 28px)); }
.editor-dialog { width: min(940px, calc(100vw - 28px)); }
.dialog-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.dialog-head h2 { margin: 3px 0 0; font-size: 21px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 4px; }
.dialog-intro { margin: -5px 0 0; }
.scope-notice, .notice { padding: 10px 12px; border-radius: 7px; color: #075d67; background: #eaf6f7; border: 1px solid #c8e5e8; }
.assignment-summary { display: flex; gap: 22px; }
.toolbar.embedded { margin: 0; padding: 0; }
.toolbar.embedded label:last-child { display: flex; align-items: center; gap: 7px; }
.toolbar.embedded input[type="checkbox"] { width: auto; }
.choice-list { min-height: 180px; max-height: 330px; overflow: auto; border: 1px solid var(--line); border-radius: 7px; }
.choice-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 9px 11px; border-bottom: 1px solid #edf0f4; cursor: pointer; }
.choice-item:last-child { border-bottom: 0; }
.choice-item:hover { background: #f6f9fe; }
.choice-item input { width: auto; }
.choice-item small { color: var(--muted); }

.editor-workbench { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .8fr); gap: 14px; }
.editor-workbench.single-pane { grid-template-columns: minmax(0, 1fr); }
.editor-source { min-width: 0; }
.preview-pane { min-width: 0; }
.preview-label { padding: 7px 10px; border: 1px solid var(--line); border-bottom: 0; border-radius: 7px 7px 0 0; color: var(--muted); background: #f6f8fb; font-size: 12px; font-weight: 700; }
.format-bar { display: flex; gap: 5px; padding: 7px; border: 1px solid #cdd6e3; border-bottom: 0; border-radius: 7px 7px 0 0; background: #f6f8fb; flex-wrap: wrap; }
.format-bar button { border: 1px solid transparent; border-radius: 4px; padding: 4px 8px; background: transparent; color: #37445a; }
.format-bar button:hover { border-color: #cbd5e2; background: #fff; }
.format-bar .push-right { margin-left: auto; color: var(--blue); }
.format-bar select { width: auto; padding: 4px 7px; }
.editor-file-bar, .editor-find-bar { display: flex; align-items: center; gap: 6px; padding: 6px 7px; border: 1px solid #cdd6e3; border-bottom: 0; background: #fff; flex-wrap: wrap; }
.editor-file-bar button, .editor-find-bar button { border: 1px solid #cbd5e2; border-radius: 4px; padding: 4px 8px; background: #f6f8fb; color: #37445a; white-space: nowrap; flex-shrink: 0; }
.editor-file-bar button.active { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.editor-file-bar .push-right { margin-left: auto; color: var(--muted); font-size: 12px; }
.editor-find-bar input { min-width: 120px; flex: 1 1 140px; padding: 5px 7px; }
#announcement-body { border-radius: 0 0 7px 7px; font: 14px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; }
.editor-help { margin: -5px 0 0; color: var(--muted); font-size: 12px; }
.launcher-preview-dialog { width: 700px; height: 480px; min-width: 520px; min-height: 360px; resize: both; overflow: hidden; background: #1e2030; color: #c8d0e8; font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif; }
.launcher-preview-shell { height: 100%; display: flex; flex-direction: column; }
.launcher-preview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #373b54; font-size: 12px; }
.launcher-preview-toolbar .button-row { flex-shrink: 0; gap: 6px; }
.launcher-preview-toolbar button { border: 1px solid #565f89; background: #272a3d; color: #c8d0e8; border-radius: 4px; padding: 4px 8px; }
.launcher-preview-toolbar button:hover { background: #373b54; }
.launcher-panel { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 14px; flex: 1; min-height: 0; padding: 14px; }
.launcher-list { min-height: 0; overflow: auto; background: #272a3d; scrollbar-color: #565f89 #272a3d; }
.launcher-list-item { display: block; width: 100%; border: 0; padding: 5px 8px; text-align: left; background: transparent; color: #c8d0e8; font-size: 10pt; overflow-wrap: anywhere; }
.launcher-list-item:hover { background: #2b2e44; }
.launcher-list-item.selected { background: #7aa2f7; color: #1e2030; }
.launcher-detail { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.launcher-title { margin: 0; color: #fff; font-size: 13pt; font-weight: bold; line-height: 1.4; overflow-wrap: anywhere; }
.launcher-date { margin: 2px 0 8px; color: #7a82a8; font-size: 9pt; }
.launcher-body { flex: 1; min-height: 0; padding: 8px 10px; overflow: auto; overflow-wrap: anywhere; background: #272a3d; color: #c8d0e8; font: 10pt/1.55 "Microsoft YaHei UI", "Microsoft YaHei", sans-serif; scrollbar-color: #565f89 #272a3d; }
.launcher-body p { margin: 0 0 .5em; }
.launcher-body h1, .launcher-body h2, .launcher-body h3, .launcher-body h4, .launcher-body h5, .launcher-body h6 { line-height: 1.4; font-weight: bold; }
.launcher-body h1 { margin: 8px 0 4px; color: #fff; font-size: 15pt; }.launcher-body h2 { margin: 6px 0 3px; color: #fff; font-size: 13pt; }
.launcher-body h3 { margin: 5px 0 2px; color: #7aa2f7; font-size: 11pt; }.launcher-body h4 { margin: 4px 0 2px; color: #7aa2f7; font-size: 10pt; }
.launcher-body h5 { margin: 3px 0 1px; color: #c8d0e8; font-size: 10pt; }.launcher-body h6 { margin: 3px 0 1px; color: #7a82a8; font-size: 9pt; }
.launcher-body blockquote, .launcher-body .launcher-quote { margin: 0 0 .5em 18px; color: #7a82a8; }
.launcher-body pre, .launcher-body code, .launcher-body .launcher-monospace { background: #1b1d2b; color: #e0af68; font-family: Consolas, monospace; }
.launcher-body pre { margin: 0 0 .5em; padding: 8px; white-space: pre-wrap; }
.launcher-body a { color: #7aa2f7; text-decoration: underline; }
.launcher-body ul, .launcher-body ol { margin: 0 0 .5em; padding-left: 24px; }
.launcher-body table { width: 100%; min-width: 0; border-collapse: collapse; margin: 0 0 .5em; white-space: normal; }
.launcher-body th, .launcher-body td { border: 1px solid #565f89; padding: 4px 6px; text-align: left; }
.launcher-body li::marker { color: #c8d0e8; }
.launcher-body hr { border: 0; border-top: 1px solid #565f89; }
.launcher-preview-dialog :focus-visible { outline: 2px solid #7aa2f7; outline-offset: -2px; }
.launcher-editor-preview { padding: 14px; background: #1e2030; border-radius: 0 0 7px 7px; }
.announcement-preview { min-height: 310px; max-height: 400px; }

.form-status { min-height: 1.4em; margin: 0; color: var(--muted); }
.form-status.error { color: var(--danger); }.form-status.success { color: var(--success); }
.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 120; display: grid; gap: 8px; width: min(360px, calc(100vw - 40px)); }
.toast { padding: 11px 14px; border-radius: 8px; color: white; background: #26364f; box-shadow: var(--shadow); animation: toast-in .2s ease-out; }
.toast.error { background: #a82e38; }.toast.success { background: #107554; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

@media (max-width: 1120px) {
  .split-layout { grid-template-columns: 1fr; }
  .detail-panel { position: static; }
  .activation-panel { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { overflow-y: auto; transform: translateX(-100%); transition: transform .2s; box-shadow: 12px 0 30px rgba(0,0,0,.2); }
  .sidebar.open { transform: translateX(0); }
  .workspace { width: 100%; }
  .mobile-header { position: sticky; top: 0; z-index: 15; display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 8px; height: 54px; padding: 0 14px; color: #fff; background: var(--navy); }
  .workspace main { padding: 20px 12px 40px; }
  .page-heading { align-items: flex-start; }
  .page-heading h1 { font-size: 23px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar label, .toolbar select { width: 100%; }
  .search-field { min-width: 0; }
  .meta-grid { grid-template-columns: 1fr; }
  .activation-panel { padding: 16px; }
  .bulk-strip { flex-wrap: wrap; }
  .bulk-strip .button { margin-left: 0; }
  .page-heading { flex-wrap: wrap; }
  .page-heading > .button-row { width: 100%; }
  .page-heading > .button-row .button { flex: 1 1 150px; }
  .workflow-steps { grid-template-columns: 1fr; }
  .workflow-steps li + li { border-left: 0; border-top: 1px solid var(--line); }
  .status-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
  #page-jobs table { min-width: 0; white-space: normal; }
  #page-jobs thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  #page-jobs tbody, #page-jobs tr, #page-jobs td { display: block; width: 100%; }
  #page-jobs tr { padding: 8px 12px; border-bottom: 1px solid var(--line); }
  #page-jobs tr:last-child { border-bottom: 0; }
  #page-jobs td { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 10px; padding: 6px 0; border: 0; overflow-wrap: anywhere; }
  #page-jobs td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 700; }
  #page-jobs td > small { grid-column: 2; }
  .card-grid { grid-template-columns: 1fr; }
  .dialog-card { padding: 17px; }
  .dialog-actions { flex-wrap: wrap; }
  .dialog-actions .button { flex: 1 1 130px; }
  .editor-workbench { grid-template-columns: 1fr; }
  .editor-file-bar, .editor-find-bar { flex-wrap: wrap; }
  .editor-file-bar .push-right { margin-left: 0; }
  .announcement-preview { min-height: 220px; max-height: 320px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (max-width: 600px) {
  .login-shell { padding: 16px; }
  .login-card { padding: 28px 22px; }
  .mobile-header #mobile-group { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .toolbar.panel.compact { padding: 12px; }
  .tag-create-form { align-items: stretch; flex-direction: column; }
  .assignment-summary { flex-direction: column; gap: 5px; }
  .launcher-preview-dialog { min-width: 0; min-height: 0; height: 600px; resize: none; }
  .launcher-preview-toolbar { flex-wrap: wrap; }
  .launcher-panel { grid-template-columns: minmax(0, 1fr); grid-template-rows: 100px minmax(0, 1fr); }
}
