:root {
  --navy-950: #0c2230;
  --navy-900: #132c3d;
  --teal: #0c7d75;
  --teal-soft: #def1ee;
  --ink: #1d2c35;
  --muted: #71808a;
  --line: #dfe5e6;
  --canvas: #f4f6f5;
  --paper: #fff;
  --danger: #a9413d;
  --danger-soft: #f8e5e3;
  --warning: #9b681b;
  --warning-soft: #faedd6;
  --success: #397052;
  --success-soft: #e4f1e8;
}

* { box-sizing: border-box; }
html { background: var(--canvas); }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; }

.auth-body { min-height: 100vh; background: radial-gradient(circle at 15% 10%, #1a4557, transparent 36rem), linear-gradient(145deg, #102b3a, #091c29); }
.auth-shell { display: grid; min-height: 100vh; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 8vw; width: min(1060px, calc(100% - 40px)); margin: 0 auto; }
.auth-shell.single { grid-template-columns: minmax(320px, 480px); justify-content: center; }
.auth-shell.activation-shell { grid-template-columns: minmax(560px, 780px); padding: 34px 0; }
.auth-brand { color: #eaf3f4; }
.auth-mark { display: grid; width: 48px; height: 48px; place-items: center; margin-bottom: 28px; border: 1px solid rgba(255,255,255,.18); border-radius: 13px; color: #fff; background: linear-gradient(145deg, #168f85, #0a6761); font-size: 20px; font-weight: 800; }
.auth-brand p { margin: 0 0 9px; color: #72b9b0; font-size: 11px; font-weight: 700; letter-spacing: .18em; }
.auth-brand h1 { margin: 0; font-size: clamp(34px, 4vw, 52px); font-weight: 650; letter-spacing: -.05em; }
.auth-brand > span { display: block; max-width: 500px; margin-top: 14px; color: #a9bec5; line-height: 1.8; }
.auth-brand ul { display: grid; gap: 12px; margin: 32px 0 0; padding: 22px 0 0; border-top: 1px solid rgba(255,255,255,.09); list-style: none; color: #b7c9ce; font-size: 12px; }
.auth-brand li::before { margin-right: 9px; color: #5ec2b5; content: "✓"; }
.auth-card { padding: 34px; border: 1px solid rgba(255,255,255,.4); border-radius: 16px; background: rgba(255,255,255,.98); box-shadow: 0 24px 64px rgba(0,0,0,.22); }
.mfa-card { text-align: center; }
.mfa-card .auth-mark { margin-right: auto; margin-left: auto; }
.security-label { display: flex; align-items: center; gap: 8px; color: var(--teal); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.mfa-card .security-label { justify-content: center; }
.security-label i { width: 7px; height: 7px; border-radius: 50%; background: #46b8aa; box-shadow: 0 0 0 4px #e1f2ef; }
.auth-card h2 { margin: 18px 0 7px; font-size: 22px; }
.auth-card > p { margin: 0 0 24px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.auth-card form { display: grid; }
.auth-card label { margin: 13px 0 6px; color: #52636c; font-size: 11px; font-weight: 700; }
.auth-card input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid #d3dcde; border-radius: 8px; outline: none; background: #fbfcfc; }
.auth-card input:focus { border-color: #4b9f96; box-shadow: 0 0 0 3px rgba(12,125,117,.1); }
.auth-card .otp-input { height: 56px; margin: 12px 0 4px; font-family: Consolas, monospace; font-size: 27px; letter-spacing: .42em; text-align: center; }
.primary-action { min-height: 42px; margin-top: 20px; padding: 0 18px; border: 0; border-radius: 8px; color: #fff; background: var(--navy-900); font-weight: 700; }
.primary-action:hover { background: #1b4254; }
.auth-card > small { display: block; margin-top: 18px; color: #8a969d; font-size: 9px; line-height: 1.6; }
.auth-back { display: inline-block; margin-top: 18px; color: var(--teal); font-size: 11px; text-decoration: none; }
.auth-primary-link { display: inline-flex; width: 100%; align-items: center; justify-content: center; color: #fff; text-decoration: none; }
.form-error, .errorlist { margin: 10px 0 0; padding: 10px 12px; border: 1px solid #f0cfcc; border-radius: 7px; color: var(--danger); background: var(--danger-soft); font-size: 10px; list-style: none; }
.message { padding: 10px 12px; border: 1px solid #d9e3e4; border-radius: 7px; background: #fff; font-size: 10px; }
.message.error { border-color: #efcbc8; color: var(--danger); background: var(--danger-soft); }
.message.success { border-color: #cce1d3; color: var(--success); background: var(--success-soft); }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; display: flex; width: 244px; flex-direction: column; padding: 24px 18px 18px; color: #ecf4f5; background: linear-gradient(180deg, #173749, var(--navy-950)); box-shadow: 8px 0 28px rgba(12,34,48,.1); }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 5px 23px; }
.brand > b { display: grid; width: 39px; height: 39px; place-items: center; border-radius: 10px; background: linear-gradient(145deg, #168e84, #0c6a65); }
.brand strong, .brand span { display: block; }
.brand strong { margin-bottom: 3px; font-size: 15px; letter-spacing: .03em; }
.brand span { color: #8eabb5; font-size: 9px; letter-spacing: .14em; }
.environment-badge { align-self: flex-start; margin: 0 5px 22px; padding: 6px 9px; border: 1px solid rgba(99,207,194,.22); border-radius: 999px; color: #a7d2cc; background: rgba(12,125,117,.18); font-size: 9px; }
.sidebar nav { display: grid; gap: 5px; }
.sidebar nav a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 8px; color: #a7bac1; text-decoration: none; }
.sidebar nav a:hover, .sidebar nav a.active { color: #fff; background: rgba(255,255,255,.08); }
.sidebar nav a i { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid rgba(255,255,255,.1); border-radius: 7px; color: #97b0b9; font-size: 10px; font-style: normal; }
.sidebar nav a.active i { border-color: rgba(92,205,192,.3); color: #8ddbd2; background: rgba(12,125,117,.22); }
.sidebar nav a em { display: grid; min-width: 20px; height: 20px; margin-left: auto; place-items: center; border-radius: 10px; color: #ffd7ad; background: rgba(190,104,31,.22); font-size: 9px; font-style: normal; }
.user-card { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 9px; margin-top: auto; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.08); }
.user-card > .avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: #265063; font-size: 11px; font-weight: 700; }
.user-card p { min-width: 0; margin: 0; }
.user-card strong, .user-card span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card strong { font-size: 10px; }
.user-card span { margin-top: 3px; color: #819ca6; font-size: 8px; }
.user-card form { margin: 0; }
.user-actions { display: flex; align-items: center; gap: 6px; }
.user-card button, .user-card a { border: 0; color: #87a0aa; background: transparent; font-size: 9px; text-decoration: none; }
.user-card button:hover, .user-card a:hover { color: #dce9ec; }

.main-content { min-height: 100vh; margin-left: 244px; padding: 0 30px 42px; }
.topbar { display: flex; min-height: 112px; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid #d9e1e2; }
.topbar p, .topbar h1, .topbar span { margin: 0; }
.topbar p { margin-bottom: 5px; color: #909da3; font-size: 9px; }
.topbar h1 { display: inline; font-size: 22px; }
.topbar > div > span { margin-left: 12px; color: var(--muted); font-size: 10px; }
.org-filter { display: flex; align-items: flex-end; gap: 6px; }
.org-filter label { display: grid; gap: 4px; color: #8d999f; font-size: 8px; }
.org-filter select { min-width: 160px; height: 37px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.org-filter-submit { height: 37px; padding: 0 11px; border: 1px solid #cfdadb; border-radius: 7px; color: var(--teal); background: #fff; font-size: 9px; font-weight: 700; }
.org-filter-submit:hover { border-color: #9dc3bf; background: #f5fbfa; }
.panel-filter { display: flex; align-items: flex-end; gap: 6px; }
.panel-filter label { display: grid; gap: 4px; color: #8d999f; font-size: 8px; }
.panel-filter select { min-width: 110px; height: 37px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.messages { display: grid; gap: 6px; margin-top: 15px; }
.security-strip { display: flex; align-items: center; gap: 11px; margin: 17px 0; padding: 11px 14px; border: 1px solid #d8e8e4; border-radius: 9px; background: linear-gradient(90deg, #edf8f5, #fff); }
.security-strip > b { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; color: #fff; background: var(--teal); font-size: 11px; }
.security-strip strong, .security-strip span { display: block; }
.security-strip strong { font-size: 10px; }
.security-strip span { margin-top: 3px; color: var(--muted); font-size: 8px; }
.security-strip em { margin-left: auto; color: #75918d; font-size: 8px; font-style: normal; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 17px; }
.metrics article { display: flex; min-height: 104px; align-items: flex-start; gap: 12px; padding: 17px; border: 1px solid #e8edee; border-radius: 10px; background: #fff; box-shadow: 0 5px 18px rgba(19,44,61,.04); }
.metrics article > i { display: grid; width: 33px; height: 33px; flex: 0 0 auto; place-items: center; border-radius: 8px; font-size: 10px; font-style: normal; font-weight: 800; }
.metrics i.teal { color: var(--teal); background: var(--teal-soft); }
.metrics i.blue { color: #315e85; background: #e5edf4; }
.metrics i.amber { color: var(--warning); background: var(--warning-soft); }
.metrics i.red { color: var(--danger); background: var(--danger-soft); }
.metrics span, .metrics strong, .metrics small { display: block; }
.metrics span { margin-bottom: 5px; color: var(--muted); font-size: 9px; }
.metrics strong { font-family: "Segoe UI", Arial, sans-serif; font-size: 21px; letter-spacing: -.03em; }
.metrics small { margin-top: 7px; color: #939fa5; font-size: 8px; }

.content-grid { display: grid; gap: 17px; margin-bottom: 17px; }
.content-grid.two-one { grid-template-columns: 1.65fr .75fr; }
.content-grid.half { grid-template-columns: 1fr 1fr; }
.panel { min-width: 0; margin-bottom: 17px; padding: 19px; border: 1px solid #e7ecec; border-radius: 10px; background: #fff; box-shadow: 0 8px 24px rgba(19,44,61,.055); }
.panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.panel header small { display: block; margin-bottom: 4px; color: var(--teal); font-size: 7px; font-weight: 700; letter-spacing: .16em; }
.panel header h2 { margin: 0; font-size: 14px; }
.panel header a { color: var(--teal); font-size: 8px; text-decoration: none; }
.decision-list > div, .exception-list > div { display: grid; grid-template-columns: 8px minmax(0,1fr) auto auto; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid #edf1f1; }
.decision-list > div:last-child, .exception-list > div:last-child { border-bottom: 0; }
.decision-list p, .exception-list p { margin: 0; }
.decision-list strong, .exception-list strong { display: block; font-size: 10px; }
.decision-list span, .exception-list span { display: block; margin-top: 3px; color: #8b989e; font-size: 8px; }
.decision-list em, .exception-list em { font-size: 9px; font-style: normal; font-weight: 700; }
.exception-list > div { grid-template-columns: auto minmax(0,1fr) auto; }
.risk-dot { width: 6px; height: 6px; border-radius: 50%; }
.risk-dot.danger { background: #c45c55; box-shadow: 0 0 0 4px #f9e8e6; }
.risk-dot.warning { background: #d2983a; box-shadow: 0 0 0 4px #faefd9; }
.summary-stack { display: grid; gap: 12px; }
.summary-stack p { display: flex; align-items: center; justify-content: space-between; margin: 0; padding-bottom: 11px; border-bottom: 1px solid #edf1f1; }
.summary-stack span { color: var(--muted); font-size: 9px; }
.summary-stack strong { font-size: 13px; }
.progress-row { display: grid; grid-template-columns: 105px 1fr 45px; align-items: center; gap: 10px; margin: 13px 0; }
.progress-row > span, .progress-row > b { font-size: 9px; }
.progress-row progress { width: 100%; height: 6px; overflow: hidden; border: 0; border-radius: 4px; appearance: none; background: #edf1f1; }
.progress-row progress::-webkit-progress-bar { border-radius: 4px; background: #edf1f1; }
.progress-row progress::-webkit-progress-value { border-radius: 4px; background: linear-gradient(90deg, #168078, #64bdb2); }
.progress-row progress::-moz-progress-bar { border-radius: 4px; background: linear-gradient(90deg, #168078, #64bdb2); }
.empty { color: var(--muted); font-size: 10px; }
.chip { display: inline-flex; min-width: 40px; height: 21px; align-items: center; justify-content: center; padding: 0 8px; border-radius: 999px; font-size: 8px; font-weight: 700; white-space: nowrap; }
.chip.danger { color: var(--danger); background: var(--danger-soft); }
.chip.warning { color: var(--warning); background: var(--warning-soft); }
.chip.success { color: var(--success); background: var(--success-soft); }
.chip.neutral { color: #60717b; background: #edf1f2; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 9px; }
th { padding: 9px 10px; border-bottom: 1px solid var(--line); color: #849198; background: #f7f9f9; font-size: 8px; text-align: left; white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid #edf1f1; color: #42535c; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td strong { color: #253943; }
.table-link { color: var(--teal); text-decoration: none; }
.table-link:hover { text-decoration: underline; }
.negative { color: var(--danger); }
.positive { color: var(--success); }

.create-panel summary { color: var(--teal); cursor: pointer; font-size: 10px; font-weight: 700; }
.directive-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.directive-form label { display: grid; gap: 5px; color: #607079; font-size: 8px; }
.directive-form .wide { grid-column: 1 / -1; }
.directive-form input, .directive-form select, .directive-form textarea { width: 100%; min-height: 37px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 6px; background: #fcfdfd; }
.directive-form textarea { resize: vertical; }
.directive-form .primary-action { width: 120px; margin-top: 0; }
.directive-list article { display: grid; grid-template-columns: auto minmax(260px,1fr) auto auto; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid #edf1f1; }
.directive-list article:last-child { border-bottom: 0; }
.directive-list article > div strong { font-size: 10px; }
.directive-list article > div p { margin: 4px 0; color: var(--muted); font-size: 8px; }
.directive-list article > div span { color: #8e999f; font-size: 8px; }
.directive-list article form { display: flex; gap: 5px; }
.directive-list article select { height: 30px; border: 1px solid var(--line); border-radius: 5px; font-size: 8px; }
.directive-list article button { height: 30px; border: 1px solid #cfdadb; border-radius: 5px; color: var(--teal); background: #fff; font-size: 8px; }
.audit-note { color: var(--muted); font-size: 8px; }
code { color: #37677a; font-family: Consolas, monospace; font-size: 8px; }

.secondary-action { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; padding: 0 13px; border: 1px solid #cfdadb; border-radius: 7px; color: var(--teal); background: #fff; font-size: 9px; font-weight: 700; text-decoration: none; }
.secondary-action:hover { border-color: #9dc3bf; background: #f5fbfa; }
.import-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-bottom: 17px; }
.import-steps article { display: flex; min-height: 74px; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid #e0e8e8; border-radius: 10px; background: #fff; }
.import-steps b { display: grid; width: 31px; height: 31px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #fff; background: var(--teal); font-size: 11px; }
.import-steps strong, .import-steps span { display: block; }
.import-steps strong { font-size: 11px; }
.import-steps span { margin-top: 4px; color: var(--muted); font-size: 8px; }
.import-grid { align-items: stretch; }
.import-grid > .panel { margin-bottom: 0; }
.panel-note { margin: 0 0 14px; color: var(--muted); font-size: 9px; line-height: 1.75; }
.upload-form { display: grid; gap: 10px; padding: 15px; border: 1px dashed #bfcfd1; border-radius: 9px; background: #f9fbfb; }
.upload-form label { display: grid; gap: 8px; color: #52636c; font-size: 9px; font-weight: 700; }
.upload-form input[type="file"] { width: 100%; padding: 11px; border: 1px solid #d5dfe0; border-radius: 7px; color: #52636c; background: #fff; font-size: 9px; }
.upload-form small { color: #86949a; font-size: 8px; }
.upload-form .primary-action { width: 160px; margin-top: 3px; }
.field-errors .errorlist { margin: 0; }
.organization-list { display: grid; max-height: 246px; overflow-y: auto; }
.organization-list > div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid #edf1f1; }
.organization-list > div:last-child { border-bottom: 0; }
.organization-list code { font-size: 9px; font-weight: 700; }
.organization-list span { color: #52636c; font-size: 9px; }
.validation-panel { border-color: #edcfcc; }
.preview-summary { border-color: #d8e8e4; background: linear-gradient(135deg, #fff, #fbfefd); }
.preview-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.preview-metrics > div { padding: 13px; border: 1px solid #e1e8e9; border-radius: 8px; background: #fff; }
.preview-metrics span, .preview-metrics strong { display: block; }
.preview-metrics span { color: var(--muted); font-size: 8px; }
.preview-metrics strong { margin-top: 5px; font-size: 15px; }
.batch-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 13px; padding-top: 12px; border-top: 1px solid #e7eeee; color: var(--muted); font-size: 8px; }
.commit-panel { border-color: #d9cfb7; background: #fffdfa; }
.commit-panel > p { color: #65757d; font-size: 9px; line-height: 1.7; }
.confirm-check { display: flex; align-items: flex-start; gap: 9px; margin-top: 15px; color: #42545d; font-size: 9px; line-height: 1.6; }
.confirm-check input { margin-top: 2px; }
.commit-actions { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.commit-actions .primary-action { margin: 0; }

.account-grid > .panel { margin-bottom: 0; }
.account-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.account-form label { display: grid; align-content: start; gap: 6px; color: #607079; font-size: 9px; font-weight: 700; }
.account-form input, .account-form select { width: 100%; min-height: 39px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: #fcfdfd; }
.account-form input:focus, .account-form select:focus { border-color: #4b9f96; outline: none; box-shadow: 0 0 0 3px rgba(12,125,117,.1); }
.account-form label > small { color: #8a979d; font-size: 8px; font-weight: 400; line-height: 1.5; }
.account-form .wide { grid-column: 1 / -1; }
.account-form .primary-action { margin-top: 2px; }
.invitation-output { border-color: #d7c8a6; background: linear-gradient(135deg, #fffdfa, #fff); }
.invite-link-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.invite-link-row input { min-width: 0; height: 39px; padding: 0 11px; border: 1px solid #d8dedf; border-radius: 7px; color: #3d5966; background: #f8fafa; font-family: Consolas, monospace; font-size: 9px; }
.invite-link-row [data-copy-status] { grid-column: 1 / -1; min-height: 13px; color: var(--success); font-size: 8px; }
.security-points { display: grid; gap: 12px; margin: 0; padding: 0; counter-reset: boundary; list-style: none; }
.security-points li { display: grid; grid-template-columns: 25px 1fr; column-gap: 10px; padding-bottom: 11px; border-bottom: 1px solid #edf1f1; counter-increment: boundary; }
.security-points li:last-child { padding-bottom: 0; border-bottom: 0; }
.security-points li::before { display: grid; width: 25px; height: 25px; grid-row: 1 / 3; place-items: center; border-radius: 50%; color: var(--teal); background: var(--teal-soft); content: counter(boundary); font-size: 9px; font-weight: 800; }
.security-points strong { font-size: 9px; }
.security-points span { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.6; }
.inline-action-form { margin: 0; }
.table-action { min-height: 27px; padding: 0 9px; border: 1px solid #bed5d2; border-radius: 5px; color: var(--teal); background: #f7fbfa; font-size: 8px; font-weight: 700; }
.table-action:hover { border-color: #8ebdb7; }
.danger-action { border-color: #e8c7c4; color: var(--danger); background: #fffafa; }
.danger-action:hover { border-color: #d89e99; }
.muted-text { color: #9aa5aa; font-size: 8px; }

.activation-card { padding: 38px; }
.account-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 24px; padding: 12px; border: 1px solid #dce7e7; border-radius: 9px; background: #f8fbfb; }
.account-summary div { min-width: 0; padding: 0 8px; border-right: 1px solid #e1e8e9; }
.account-summary div:last-child { border-right: 0; }
.account-summary dt { margin-bottom: 5px; color: var(--muted); font-size: 8px; }
.account-summary dd { overflow: hidden; margin: 0; color: #314750; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.mfa-setup { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: center; padding: 20px; border: 1px solid #d8e7e4; border-radius: 11px; background: linear-gradient(135deg, #f4fbf9, #fff); }
.mfa-qr-wrap { text-align: center; }
.mfa-qr-wrap > span, .mfa-qr-wrap > strong { display: block; }
.mfa-qr-wrap > span { color: var(--teal); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.mfa-qr-wrap > strong { margin-top: 4px; font-size: 11px; }
.mfa-qr { display: block; width: 210px; height: 210px; margin: 12px auto 0; border: 8px solid #fff; border-radius: 9px; background: #fff; }
.mfa-instructions > p { margin: 0 0 12px; color: #52636c; font-size: 10px; line-height: 1.7; }
.mfa-instructions ol { display: grid; gap: 8px; margin: 0 0 14px; padding-left: 18px; color: #52636c; font-size: 9px; line-height: 1.6; }
.mfa-instructions details { padding-top: 12px; border-top: 1px solid #dce8e6; }
.mfa-instructions summary { color: var(--teal); cursor: pointer; font-size: 9px; font-weight: 700; }
.manual-secret { margin: 12px 0 7px; padding: 10px; border: 1px dashed #b9cccc; border-radius: 7px; color: #254a58; background: #fff; font-family: Consolas, monospace; font-size: 13px; font-weight: 700; letter-spacing: .09em; overflow-wrap: anywhere; }
.mfa-instructions details small { color: var(--danger); font-size: 8px; line-height: 1.5; }
.activation-form { margin-top: 20px; }
.activation-form > small { margin-top: 6px; color: var(--muted); font-size: 8px; }
.activation-form input[name="code"] { font-family: Consolas, monospace; font-size: 18px; letter-spacing: .24em; }
.activation-warning { display: flex; gap: 9px; margin-top: 18px; padding: 11px 12px; border: 1px solid #eed6b1; border-radius: 8px; color: #71501c; background: #fff9ef; font-size: 8px; line-height: 1.6; }
.activation-warning b { white-space: nowrap; }

.section-nav { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 17px; }
.section-nav a { padding: 8px 12px; border: 1px solid #d9e4e4; border-radius: 999px; color: #4f676f; background: #fff; font-size: 8px; font-weight: 700; text-decoration: none; }
.section-nav a:hover { border-color: #9dc3bf; color: var(--teal); background: #f5fbfa; }
.config-section { scroll-margin-top: 15px; }
.config-create { margin-bottom: 14px; padding: 11px 13px; border: 1px dashed #c8d9d7; border-radius: 8px; background: #fbfdfd; }
.config-create summary { color: var(--teal); cursor: pointer; font-size: 9px; font-weight: 800; }
.compact-form, .config-row { display: grid; gap: 9px; align-items: end; }
.four-columns { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.five-columns { grid-template-columns: 1fr 1.2fr 1.2fr .55fr .55fr; }
.stage-columns { grid-template-columns: .8fr 1fr .45fr 1.15fr .55fr .45fr .45fr; }
.compact-form { margin-top: 13px; }
.compact-form label, .config-row label, .workflow-header-form label { display: grid; gap: 4px; color: #607079; font-size: 8px; }
.compact-form input, .compact-form select, .compact-form textarea,
.config-row input, .config-row select, .config-row textarea,
.workflow-header-form input { width: 100%; min-width: 0; min-height: 34px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 6px; color: #334a54; background: #fff; font-size: 8px; }
.compact-form textarea, .config-row textarea { resize: vertical; }
.compact-form input:focus, .compact-form select:focus, .compact-form textarea:focus,
.config-row input:focus, .config-row select:focus, .config-row textarea:focus,
.workflow-header-form input:focus { border-color: #4b9f96; outline: none; box-shadow: 0 0 0 3px rgba(12,125,117,.1); }
.compact-form .wide, .config-row .config-row-meta { grid-column: 1 / -1; }
.double-column { grid-column: span 2; }
.checkbox-label { display: flex !important; min-height: 34px; align-items: center; gap: 6px !important; }
.checkbox-label input { width: auto; min-height: auto; }
.config-list { display: grid; gap: 8px; }
.config-row { padding: 11px 12px; border: 1px solid #e4ebeb; border-radius: 8px; background: #fff; }
.config-row:hover { border-color: #d3e2e0; background: #fcfefe; }
.config-row-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 7px; border-top: 1px solid #eef2f2; }
.config-row-meta span { color: var(--muted); font-size: 8px; }
.config-row input:disabled { color: #61747c; background: #f1f4f4; }
.config-row .errorlist, .compact-form .errorlist { margin: 0; padding: 0; color: var(--danger); font-size: 8px; list-style: none; }
.workflow-card { margin-top: 12px; padding: 14px; border: 1px solid #dce7e6; border-radius: 9px; background: #fbfdfd; }
.workflow-card + .workflow-card { margin-top: 16px; }
.workflow-header-form { display: grid; grid-template-columns: auto 1fr 2fr auto; align-items: end; gap: 9px; margin-bottom: 12px; }
.workflow-description { min-width: 0; }
.stage-list { margin-bottom: 10px; }

@media (max-width: 1100px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .content-grid.two-one, .content-grid.half { grid-template-columns: 1fr; }
  .preview-metrics { grid-template-columns: repeat(2, 1fr); }
  .four-columns, .five-columns, .stage-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .double-column { grid-column: span 2; }
  .workflow-header-form { grid-template-columns: auto 1fr; }
  .workflow-header-form .workflow-description { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .auth-shell { grid-template-columns: 1fr; padding: 30px 0; }
  .auth-shell.activation-shell { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .activation-card { padding: 25px 20px; }
  .account-summary { grid-template-columns: 1fr 1fr; }
  .account-summary div { padding: 7px 8px; border-right: 0; border-bottom: 1px solid #e1e8e9; }
  .account-summary div:nth-last-child(-n+2) { border-bottom: 0; }
  .mfa-setup { grid-template-columns: 1fr; }
  .account-form { grid-template-columns: 1fr; }
  .account-form .wide { grid-column: auto; }
  .invite-link-row { grid-template-columns: 1fr; }
  .invite-link-row [data-copy-status] { grid-column: auto; }
  .sidebar { position: relative; width: 100%; min-height: auto; }
  .sidebar nav { grid-template-columns: repeat(3, 1fr); }
  .user-card { margin-top: 20px; }
  .main-content { margin-left: 0; padding: 0 15px 30px; }
  .topbar { align-items: stretch; flex-direction: column; padding: 22px 0 15px; }
  .topbar > div > span { display: block; margin: 6px 0 0; }
  .org-filter select { width: 100%; }
  .metrics { grid-template-columns: 1fr; }
  .import-steps { grid-template-columns: 1fr; }
  .preview-metrics { grid-template-columns: 1fr; }
  .security-strip em { display: none; }
  .directive-form { grid-template-columns: 1fr; }
  .directive-form .wide { grid-column: auto; }
  .directive-list article { grid-template-columns: auto 1fr; }
  .directive-list article > .chip, .directive-list article > form { grid-column: 2; }
  .four-columns, .five-columns, .stage-columns, .workflow-header-form { grid-template-columns: 1fr; }
  .double-column, .workflow-header-form .workflow-description { grid-column: auto; }
  .config-row-meta { align-items: stretch; flex-direction: column; }
}
