:root {
  --bg: #edf1f5;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #17202e;
  --muted: #697586;
  --line: #d6dce5;
  --blue: #2f5fca;
  --cyan: #0d7c86;
  --green: #12715b;
  --amber: #b96b13;
  --red: #c73a3a;
  --ink: #152238;
  --nav: #101828;
  --nav-soft: #1d2939;
  --mint: #e7f6ee;
  --peach: #fff2dd;
  --gold: #d8a23a;
  --shadow: 0 18px 42px rgba(23, 32, 46, .08);
  --side: 260px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overflow-x: hidden; }
body {
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0, rgba(216, 162, 58, .12), transparent 260px),
    radial-gradient(circle at 92% 18%, rgba(13, 124, 134, .1), transparent 320px),
    radial-gradient(circle at 48% 0, rgba(47, 95, 202, .08), transparent 260px),
    linear-gradient(180deg, #f7f9fc 0, var(--bg) 280px),
    var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; color: inherit; border: 0; }
.hidden { display: none !important; }

.auth-root {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 48px;
  align-items: center;
  padding: 56px min(8vw, 96px);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, .08), rgba(8, 145, 178, .06)),
    var(--bg);
}
.auth-copy h1 {
  margin: 12px 0;
  max-width: 760px;
  font-size: 46px;
  line-height: 1.14;
  letter-spacing: 0;
}
.auth-copy p {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}
.eyebrow {
  display: inline-flex;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
}
.auth-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.auth-points span {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: #344054;
  font-weight: 700;
}
.auth-panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}
.auth-tabs button {
  height: 38px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}
.auth-tabs button.active {
  background: var(--surface);
  color: var(--blue);
  box-shadow: 0 1px 6px rgba(15, 23, 42, .08);
}
.auth-form { display: grid; gap: 13px; }
.auth-form label, .field {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  outline: none;
}
input, select { height: 40px; padding: 0 11px; }
textarea {
  min-height: 74px;
  padding: 10px 11px;
  resize: vertical;
  line-height: 1.65;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(37, 99, 235, .65);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}
.auth-form small { color: var(--muted); text-align: center; }

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  align-items: stretch;
}
.sidebar {
  position: relative;
  height: auto;
  min-height: 100vh;
  padding: 20px 14px 28px;
  border-right: 1px solid rgba(255,255,255,.08);
  background:
    radial-gradient(circle at 0 12%, rgba(216, 162, 58, .16), transparent 180px),
    radial-gradient(circle at 100% 56%, rgba(13, 124, 134, .18), transparent 210px),
    linear-gradient(180deg, #111b2e, #0f1728 58%, #121826);
  color: #e6edf7;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 8px 20px;
}
.logo {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--gold), #0d7c86);
  color: #fff;
  font-weight: 900;
}
.brand h1 { margin: 0; font-size: 16px; line-height: 1.3; }
.brand p { margin: 3px 0 0; color: #9aa8ba; font-size: 12px; }
.stage-nav { display: grid; gap: 7px; }
.stage {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  min-height: 68px;
  padding: 10px;
  border-radius: 8px;
  background: transparent;
  color: #c7d2e1;
  text-align: left;
}
.stage:nth-child(1) b { color: #80c7ff; }
.stage:nth-child(2) b { color: #d8a23a; }
.stage:nth-child(3) b { color: #66d2a5; }
.stage:nth-child(4) b { color: #f19292; }
.stage:hover { background: rgba(255,255,255,.07); }
.stage.active {
  background: linear-gradient(135deg, rgba(13, 124, 134, .3), rgba(47, 95, 202, .2));
  box-shadow: inset 3px 0 0 var(--gold);
  color: #fff;
}
.stage b {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255,255,255,.1);
  color: #d8a23a;
}
.stage strong { display: block; font-size: 14px; }
.stage small { display: block; margin-top: 3px; color: #9aa8ba; font-size: 12px; line-height: 1.35; }

.main, .sidebar, .panel, .question-card, .work-area { min-width: 0; }
.main { padding: 24px 24px 34px; }
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 20px;
  padding: 4px 2px 8px;
}
.topbar h2 { margin: 5px 0; font-size: 26px; letter-spacing: 0; }
.topbar p { margin: 0; color: var(--muted); line-height: 1.55; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.role-switch {
  display: none;
  gap: 4px;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.role-switch button {
  min-width: 58px;
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}
.role-switch button.active { background: var(--ink); color: #fff; }

.btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-weight: 800;
  white-space: nowrap;
}
.btn.primary { border-color: var(--blue); background: var(--blue); color: #fff; }
.btn.primary:hover { filter: brightness(.96); box-shadow: 0 8px 18px rgba(47, 95, 202, .18); }
.btn.soft { border-color: #bde4dd; background: var(--mint); color: #0f6d55; }
.btn.ghost { background: #fff; color: #344054; }
.btn.danger { color: var(--red); }
.btn.full { width: 100%; }
.btn:disabled, .icon-btn:disabled { cursor: not-allowed; opacity: .52; }

.btn.mini {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-head {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}
.panel-head h3 { margin: 0; font-size: 17px; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.mode-gate { display: grid; gap: 16px; }
.setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 410px;
  gap: 16px;
  align-items: start;
}
.setup-body, .enterprise-body {
  display: grid;
  gap: 16px;
  padding: 17px;
}
.inline-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}
.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.mode-card {
  min-height: 154px;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}
.mode-card.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}
.mode-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #102a43;
  color: #fff;
  font-weight: 900;
}
.mode-card h4 { margin: 0 0 7px; font-size: 17px; }
.mode-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.gate-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.account-grid .btn { grid-column: span 2; }
.qr-grid, .qr-mini-grid {
  display: grid;
  gap: 10px;
}
.qr-card {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}
.qr-card > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.qr-card strong { font-size: 14px; }
.qr-card span { color: var(--muted); font-size: 12px; }
.qr-card img {
  width: 112px;
  height: 112px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.qr-card input { font-size: 12px; }
.qr-card.locked {
  background: #f8fafc;
  border-style: dashed;
}
.qr-card.locked strong,
.qr-card.locked input {
  color: var(--muted);
}
.qr-placeholder {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f1f5f9;
  color: var(--muted);
  font-weight: 800;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(16, 42, 67, .45);
  backdrop-filter: blur(6px);
}

.notice-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  pointer-events: none;
  background: rgba(15, 23, 42, .08);
}

.notice-modal {
  width: min(390px, 100%);
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 18px;
  border: 1px solid #d7eadf;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 62px rgba(15, 23, 42, .2);
  animation: notice-pop .18s ease-out;
}

.notice-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e7f6ee;
  color: #0f6d55;
  font-size: 22px;
  font-weight: 900;
}

.notice-modal strong {
  display: block;
  color: #16202d;
  font-size: 17px;
  font-weight: 900;
}

.notice-modal p {
  margin: 4px 0 0;
  color: #667085;
  line-height: 1.5;
}

.notice-modal.error {
  border-color: #f1c6c6;
}

.notice-modal.error .notice-icon {
  background: #fff1f1;
  color: var(--red);
}

@keyframes notice-pop {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.qr-modal {
  position: relative;
  width: min(440px, 100%);
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(15, 23, 42, .24);
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f1f5f9;
  color: #475467;
  font-size: 22px;
  font-weight: 800;
}
.modal-head {
  display: grid;
  gap: 6px;
  padding-right: 38px;
}
.modal-badge {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--mint);
  color: #0f6d55;
  font-size: 12px;
  font-weight: 900;
}
.modal-head h3 {
  margin: 0;
  font-size: 22px;
}
.modal-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.modal-qr-box {
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fafc, #eef7f5);
}
.modal-qr-box img {
  width: 190px;
  height: 190px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.work-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 18px;
  align-items: start;
}
.work-area:not(.admin-layout) { grid-template-columns: minmax(0, 1fr); }
.head-actions, .toolbar {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}
.toolbar {
  padding: 12px 17px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(47, 95, 202, .04), rgba(13, 124, 134, .04)),
    #fbfcfe;
}
.admin-main-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 17px 0;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
  overflow-x: auto;
}
.admin-main-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: max-content;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-bottom-color: transparent;
  border-radius: 8px 8px 0 0;
  background: #f8fafc;
  color: #667085;
  font-weight: 900;
}
.admin-main-tabs button.active {
  background: #fff;
  color: var(--brand-strong);
  box-shadow: 0 -1px 8px rgba(15, 23, 42, .04);
}
.admin-main-tabs span {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--brand);
  font-size: 12px;
}
.toolbar > * { min-width: 0; }
.search { flex: 1 1 220px; min-width: 0; }
.select { width: 140px; max-width: 100%; }
.account-field {
  display: grid;
  grid-template-columns: auto 140px;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid #d6c28f;
  border-radius: 8px;
  background: #fff8e8;
  color: #9d6110;
  font-size: 20px;
  font-weight: 800;
}
.item-list {
  display: grid;
  max-height: none;
  overflow: visible;
}
.duties-flow-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin: 18px;
  padding: 18px;
  border: 1px solid #b9dfd0;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(18, 113, 91, .08), rgba(47, 95, 202, .05)),
    #f8fffb;
}
.duties-flow-footer strong {
  display: block;
  margin-bottom: 4px;
  color: #103a33;
  font-size: 17px;
  font-weight: 900;
}
.duties-flow-footer p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.item-card {
  display: grid;
  gap: 0;
  padding: 0;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(47, 95, 202, .035), transparent 260px),
    #fff;
}
.item-card:nth-child(4n + 2) {
  background:
    linear-gradient(90deg, rgba(13, 124, 134, .04), transparent 260px),
    #fff;
}
.item-card:nth-child(4n + 3) {
  background:
    linear-gradient(90deg, rgba(216, 162, 58, .05), transparent 260px),
    #fff;
}
.item-card:nth-child(4n + 4) {
  background:
    linear-gradient(90deg, rgba(18, 113, 91, .04), transparent 260px),
    #fff;
}
.item-card:hover { background-color: #fbfcff; }
.item-head {
  display: grid;
  grid-template-columns: 38px 42px minmax(180px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px 18px 10px;
  min-width: 0;
}
.item-head > b {
  width: 42px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef4ff;
  color: var(--brand);
  font-size: 16px;
  font-weight: 900;
}
.item-title {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f6f8fb;
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
}
.item-title:focus {
  border-color: rgba(47, 95, 202, .45);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(47, 95, 202, .1);
}
.item-title[readonly] {
  color: var(--text);
  cursor: default;
}
.status {
  display: inline-grid;
  place-items: center;
  min-width: 64px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef2f7;
  color: #475467;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.status.confirmed { background: #e9f8f0; color: #11744d; }
.status.changed { background: #e6fbfb; color: #08747d; }
.status.conflict { background: #fff2f2; color: #c2410c; }
.status.pending { background: #f1f5f9; color: #667085; }
.item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: max-content;
}
.item-actions .icon-btn,
.item-head > .icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 18px;
}
.item-actions .confirm {
  border-color: #b8cdfb;
  background: #eef4ff;
  color: #2457c5;
}
.item-actions .add {
  border-color: #efd49e;
  background: #fff8e8;
  color: #a45f0a;
}
.item-actions .danger {
  border-color: #f4b9b5;
  background: #fff1f0;
  color: #c0392b;
}
.item-body {
  display: grid;
  gap: 10px;
  padding: 0 18px 16px 110px;
}
.item-content {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  padding: 14px 16px;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
}
.duty-part-list {
  display: grid;
  gap: 10px;
}
.duty-part {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.duty-part > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #f0f7f5;
  color: #0d7c72;
  font-size: 14px;
  font-weight: 900;
}
.duty-part-content {
  width: 100%;
  min-height: 44px;
  overflow: hidden;
  resize: none;
  padding: 10px 12px;
  border: 1px solid #cfdaea;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
}
.duty-part-content:focus {
  border-color: rgba(47, 95, 202, .5);
  box-shadow: 0 0 0 3px rgba(47, 95, 202, .1);
}
.duty-part-content[readonly] {
  background: #f8fafc;
  color: #243244;
  cursor: default;
}
.ability-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ability-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid #d6e4ff;
  border-radius: 999px;
  background: #f4f8ff;
  color: #315899;
  font-size: 13px;
  font-weight: 800;
}
.empty-state {
  padding: 28px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}
.question-card {
  display: grid;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(47, 95, 202, .025), transparent 180px),
    #fff;
}
.question-card:nth-child(4n + 1) {
  background:
    linear-gradient(90deg, rgba(47, 95, 202, .045), transparent 210px),
    #fff;
}
.question-card:nth-child(4n + 2) {
  background:
    linear-gradient(90deg, rgba(13, 124, 134, .045), transparent 210px),
    #fff;
}
.question-card:nth-child(4n + 3) {
  background:
    linear-gradient(90deg, rgba(216, 162, 58, .055), transparent 210px),
    #fff;
}
.question-card:nth-child(4n + 4) {
  background:
    linear-gradient(90deg, rgba(18, 113, 91, .045), transparent 210px),
    #fff;
}
.question-card:hover { background: #fbfcff; }
.question-head {
  display: grid;
  grid-template-columns: 30px 42px minmax(220px, 1fr) auto;
  gap: 11px;
  align-items: center;
  min-width: 0;
}
.question-number {
  width: 38px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef2f7;
  color: #344054;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
.question-card:nth-child(4n + 1) .question-number { background: #eef5ff; color: #2f5fca; }
.question-card:nth-child(4n + 2) .question-number { background: #e7f7f7; color: #0d7c86; }
.question-card:nth-child(4n + 3) .question-number { background: #fff6dc; color: #a8610f; }
.question-card:nth-child(4n + 4) .question-number { background: #ecf8f1; color: #12715b; }
.duty-title-input {
  min-width: 0;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f7f9fc;
  font-size: 16px;
  font-weight: 900;
  color: var(--text);
}
.duty-title-input:focus {
  border-color: rgba(37, 99, 235, .45);
  background: #fff;
}
.duty-title-input[readonly] {
  color: var(--text);
  cursor: default;
}
.question-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: max-content;
}
.tool-btn:disabled,
.tool-mini:disabled {
  cursor: not-allowed;
  opacity: .45;
  transform: none;
  box-shadow: none;
}
.collapse-icon {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: #eef2f7;
  color: #344054;
  font-weight: 900;
}
.option-list {
  display: grid;
  gap: 10px;
  padding-left: 83px;
}
.option-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: start;
  min-width: 0;
}
.option-index {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: max-content;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.question-tools .card-actions {
  min-width: max-content;
  padding-top: 3px;
}
.option-list .card-actions {
  display: none;
}
.tool-btn,
.tool-mini {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #344054;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.tool-btn {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  font-size: 15px;
}
.tool-mini {
  width: 34px;
  height: 34px;
  margin-top: 4px;
}
.tool-btn:hover,
.tool-mini:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, .08);
}
.tool-btn:disabled:hover,
.tool-mini:disabled:hover {
  transform: none;
  box-shadow: none;
}
.tool-btn.save { border-color: #bde4dd; background: var(--mint); color: #0f6d55; }
.tool-btn.ok { border-color: #c5d4f4; background: #f0f4ff; color: var(--blue); }
.tool-btn.add { border-color: #edd39b; background: var(--peach); color: var(--amber); }
.tool-btn.warn,
.tool-mini.danger {
  border-color: #f1c6c6;
  background: #fff1f1;
  color: var(--red);
}
.tag {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.tag.blue { background: #eff6ff; color: #1d4ed8; }
.tag.teal { background: #e7f7f7; color: #0d7c86; }
.tag.green { background: #ecf8f1; color: #12715b; }
.tag.amber { background: #fff5df; color: #a8610f; }
.empty-state { padding: 34px; color: var(--muted); text-align: center; }

.side-panel {
  position: sticky;
  top: 22px;
  max-height: calc(100vh - 44px);
  overflow: auto;
}
.side-body {
  display: grid;
  gap: 14px;
  padding: 15px;
}
.flow-stack { display: grid; gap: 9px; }
.flow-step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.flow-step b {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #eef2f7;
  color: #344054;
}
.flow-step strong { color: var(--muted); font-size: 12px; }
.flow-step.done {
  border-color: #b7ddc9;
  background: linear-gradient(90deg, #eefaf4, #ffffff);
}
.flow-step:nth-child(1) b { background: #fff6dc; color: #a8610f; }
.flow-step:nth-child(2) b { background: #eef5ff; color: #2f5fca; }
.flow-step:nth-child(3) b { background: #e7f7f7; color: #0d7c86; }
.flow-step:nth-child(4) b { background: #f1ecff; color: #674bb1; }
.summary-card {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff, #fbfcfe);
}
.summary-card h4 {
  margin: 0;
  padding-bottom: 3px;
  color: #344054;
  font-size: 14px;
}
.submission-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}
.submission-item, .flow-item {
  display: grid;
  gap: 4px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}
.submission-item strong { font-size: 12px; }
.submission-item span, .flow-item { color: var(--muted); font-size: 12px; line-height: 1.5; }
.record-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.record-tabs button {
  height: 38px;
  border-radius: 7px;
  background: transparent;
  color: #667085;
  font-weight: 900;
}
.record-tabs button.active {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 1px 5px rgba(15, 23, 42, .08);
}
.record-tabs span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: 4px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--brand);
  font-size: 12px;
}
.record-table {
  display: grid;
  gap: 6px;
  max-height: 340px;
  overflow: auto;
  padding-right: 2px;
}
.record-page {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: #fff;
}
.record-page-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid #cfe6df;
  border-radius: 8px;
  background: linear-gradient(90deg, #f4fbf8, #f7fbff);
}
.record-page-summary strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}
.record-page-summary span {
  padding: 6px 11px;
  border-radius: 999px;
  background: #e7f6ee;
  color: #0f6d55;
  font-weight: 900;
}
.record-page-summary p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.assessment-record-page .record-page-summary {
  align-items: start;
}

.record-page-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.record-page-actions .btn {
  min-height: 36px;
}

.record-page .record-table {
  max-height: min(62vh, 620px);
}
.record-page .record-row {
  grid-template-columns: 34px 70px minmax(160px, 1fr) minmax(180px, 1fr) 120px;
  min-width: 720px;
  font-size: 14px;
}
.record-row {
  display: grid;
  grid-template-columns: 26px 42px minmax(80px, 1fr) minmax(128px, 1.2fr) 76px;
  gap: 8px;
  align-items: center;
  min-width: 420px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  font-size: 12px;
}
.record-head {
  background: #f1f5f9;
  color: #667085;
  font-weight: 900;
}
.record-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
}
.link-button {
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 900;
  text-align: left;
  text-decoration: underline;
}
.link-button:hover { color: var(--brand-strong); }
.detail-modal {
  position: relative;
  width: min(980px, calc(100vw - 28px));
  height: min(86vh, 820px);
  max-height: min(86vh, 820px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.detail-modal-body {
  display: grid;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-color: #b8c4d3 transparent;
  scrollbar-width: thin;
}
.detail-modal-body::-webkit-scrollbar {
  width: 8px;
}
.detail-modal-body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #b8c4d3;
}
.detail-modal-body::-webkit-scrollbar-track {
  background: transparent;
}
#detailModal.radar-active .detail-modal {
  width: min(1120px, calc(100vw - 28px));
  height: min(94vh, 980px);
  max-height: min(94vh, 980px);
}

#detailModal.radar-active .radar-chart svg {
  max-width: 760px;
}

.summary-modal {
  position: relative;
  width: min(1040px, calc(100vw - 28px));
  height: min(88vh, 860px);
  max-height: min(88vh, 860px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(214, 224, 235, .92);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-strong);
}
.summary-modal-body {
  display: grid;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-color: #b8c4d3 transparent;
  scrollbar-width: thin;
}
.summary-modal-body::-webkit-scrollbar {
  width: 8px;
}
.summary-modal-body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #b8c4d3;
}
.summary-modal-body::-webkit-scrollbar-track {
  background: transparent;
}
.summary-duty-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  background: #fbfcfd;
}
.summary-duty-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
}
.summary-duty-head b {
  width: 38px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef4ff;
  color: var(--brand-strong);
  font-weight: 900;
}
.summary-item-title {
  height: 42px;
  padding: 0 14px;
  border-color: #d9e3ee;
  background: #fff;
  color: #16202d;
  font-size: 17px;
  font-weight: 900;
}
.summary-duty-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  min-width: max-content;
}
.summary-duty-actions .icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 18px;
}
.summary-duty-actions .confirm {
  border-color: #c5d6ff;
  background: #eef4ff;
  color: var(--brand-strong);
}
.summary-duty-actions .add {
  border-color: #f0d39a;
  background: #fff7e7;
  color: #9a5f11;
}
.summary-duty-actions .danger {
  border-color: #f2c3c0;
  background: #fff2f1;
  color: var(--red);
}
.summary-duty-card.summary-deleted {
  border-color: #f2c3c0;
  background: #fff7f6;
}
.summary-duty-card.summary-deleted .summary-item-title,
.summary-duty-card.summary-deleted .duty-part-content,
.summary-duty-card.summary-deleted .item-content {
  color: #8a4a43;
  text-decoration: line-through;
}
.summary-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #e4ebf2;
}
.detail-duty-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}
.detail-duty-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.detail-duty-head b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 32px;
  border-radius: 8px;
  background: #eef4ff;
  color: var(--brand);
}
.detail-duty-head strong {
  font-size: 16px;
}
.detail-duty-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 1180px) {
  .setup-grid, .work-area, .work-area:not(.admin-layout) { grid-template-columns: 1fr; }
  .side-panel { position: static; }
  .mode-grid { grid-template-columns: 1fr; }
  .item-list { max-height: none; }
}
@media (max-width: 980px) {
  .item-head {
    grid-template-columns: 34px 38px minmax(160px, 1fr) auto;
  }
  .item-actions {
    grid-column: 3 / -1;
    justify-content: flex-start;
  }
  .item-body { padding-left: 102px; }
  .question-head {
    grid-template-columns: 30px 42px minmax(160px, 1fr);
  }
  .question-tools {
    grid-column: 3 / 4;
    justify-content: space-between;
    min-width: 0;
  }
  .option-list { padding-left: 83px; }
}
@media (max-width: 820px) {
  .auth-root { grid-template-columns: 1fr; padding: 28px; }
  .auth-copy h1 { font-size: 34px; }
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    min-height: 0;
    padding-bottom: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .stage-nav {
    grid-auto-flow: column;
    grid-auto-columns: minmax(180px, 220px);
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 6px;
  }
  .main { padding: 14px; }
  .topbar { align-items: stretch; flex-direction: column; }
  .top-actions { align-items: stretch; flex-direction: column; }
  .role-switch { overflow-x: auto; }
  .toolbar .btn, .toolbar .select { flex: 1 1 150px; }
  .toolbar .search { flex-basis: 100%; }
  .inline-row, .account-grid { grid-template-columns: 1fr; }
  .account-grid .btn { grid-column: auto; }
  .account-field { grid-template-columns: 1fr; }
  .duties-flow-footer,
  .record-page-summary,
  .detail-duty-head {
    grid-template-columns: 1fr;
  }
  .item-head {
    grid-template-columns: 34px 38px minmax(0, 1fr);
    gap: 8px;
    padding: 12px;
  }
  .item-head > b {
    width: 36px;
    height: 32px;
  }
  .item-title {
    height: 38px;
    font-size: 15px;
  }
  .status {
    grid-column: 2 / 3;
    justify-self: start;
  }
  .item-actions {
    grid-column: 3 / 4;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .item-body {
    padding: 0 12px 14px;
  }
  .option-list { padding-left: 0; }
  .question-card { padding: 13px; }
  .question-head {
    grid-template-columns: 30px 38px minmax(0, 1fr);
    gap: 8px;
  }
  .question-number { width: 34px; }
  .question-tools {
    grid-column: 1 / -1;
    justify-content: space-between;
  }
  .option-row {
    grid-template-columns: 30px minmax(0, 1fr) 34px;
    gap: 8px;
  }
  .summary-modal {
    width: min(100%, calc(100vw - 20px));
    height: min(88vh, 820px);
    padding: 16px;
  }
  .summary-duty-head {
    grid-template-columns: 38px minmax(0, 1fr);
  }
  .summary-duty-head .status {
    grid-column: 2 / 3;
    justify-self: start;
  }
  .summary-duty-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .summary-modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* 2026-07 UI polish: visual-only refresh. */
:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #f7f9fb;
  --text: #17202a;
  --muted: #667085;
  --line: #dce3ea;
  --blue: #3164d4;
  --brand: #3164d4;
  --brand-strong: #214aa5;
  --cyan: #0b7f8f;
  --green: #16815f;
  --amber: #b7791f;
  --red: #c2413c;
  --ink: #182230;
  --nav: #161b22;
  --nav-soft: #222a35;
  --mint: #e8f6f1;
  --peach: #fff5e5;
  --gold: #d49a2a;
  --shadow: 0 14px 34px rgba(22, 27, 34, .08);
  --shadow-strong: 0 20px 56px rgba(22, 27, 34, .16);
  --ring: 0 0 0 3px rgba(49, 100, 212, .14);
}

html {
  background: var(--bg);
}

body {
  background:
    linear-gradient(180deg, #fbfcfd 0, #f4f6f8 320px),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
.btn,
.icon-btn,
.mode-card,
.stage,
.record-row,
.question-card,
.item-card {
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

input,
select,
textarea {
  border-color: var(--line);
  border-radius: 7px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(16, 24, 40, .02);
}

input:hover,
select:hover,
textarea:hover {
  border-color: #c7d2df;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: var(--ring);
}

.auth-root {
  background:
    linear-gradient(135deg, rgba(49, 100, 212, .08), rgba(11, 127, 143, .05)),
    linear-gradient(180deg, #fbfcfd, #f4f6f8);
}

.auth-copy h1 {
  color: #111827;
  font-weight: 900;
}

.eyebrow {
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.auth-points span {
  border-color: #d7e1ec;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 8px 20px rgba(16, 24, 40, .05);
}

.auth-panel,
.panel,
.detail-modal,
.qr-modal {
  border-color: rgba(214, 224, 235, .92);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-panel {
  background:
    linear-gradient(180deg, #ffffff, #fbfcfd);
}

.auth-tabs,
.record-tabs {
  border-color: #dde6ef;
  background: #eef3f8;
}

.auth-tabs button.active,
.record-tabs button.active {
  color: var(--brand-strong);
  box-shadow: 0 6px 16px rgba(16, 24, 40, .08);
}

.sidebar {
  border-right: 1px solid rgba(255, 255, 255, .08);
  background:
    linear-gradient(180deg, #1a212b 0, #141a22 54%, #181d25 100%);
}

.brand {
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  margin-bottom: 12px;
}

.logo {
  background: linear-gradient(135deg, #3164d4, #0b7f8f 58%, #d49a2a);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .22);
}

.stage {
  border: 1px solid transparent;
  color: #c9d4df;
}

.stage:hover {
  border-color: rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .06);
}

.stage.active {
  border-color: rgba(255, 255, 255, .14);
  background: linear-gradient(135deg, rgba(49, 100, 212, .26), rgba(11, 127, 143, .18));
  box-shadow: inset 3px 0 0 var(--gold), 0 12px 24px rgba(0, 0, 0, .16);
}

.stage b {
  background: rgba(255, 255, 255, .11);
}

.main {
  padding: 28px 30px 40px;
}

.topbar {
  min-height: 92px;
  padding: 8px 2px 16px;
  border-bottom: 1px solid rgba(220, 227, 234, .68);
}

.topbar h2 {
  color: #111827;
  font-size: 28px;
  font-weight: 900;
}

.btn {
  min-height: 40px;
  border-radius: 7px;
  border-color: #d8e1eb;
  background: #fff;
  color: #253041;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.btn:hover {
  border-color: #c4cfdb;
  background: #fbfcfd;
  transform: translateY(-1px);
}

.btn.primary {
  border-color: var(--brand);
  background: linear-gradient(180deg, #3f73de, var(--brand));
  color: #fff;
  box-shadow: 0 10px 22px rgba(49, 100, 212, .2);
}

.btn.primary:hover {
  filter: none;
  box-shadow: 0 14px 30px rgba(49, 100, 212, .26);
}

.btn.soft {
  border-color: #c7e6dc;
  background: #eefaf5;
  color: #12684f;
}

.btn.ghost {
  background: #fff;
}

.panel {
  background: var(--surface);
  overflow: clip;
}

.panel-head {
  min-height: 74px;
  padding: 17px 20px;
  background:
    linear-gradient(180deg, #ffffff, #fafbfd);
}

.panel-head h3 {
  color: #17202a;
  font-size: 18px;
  font-weight: 900;
}

.setup-body,
.enterprise-body,
.side-body {
  padding: 20px;
}

.mode-card {
  border-color: #dbe5ef;
  background:
    linear-gradient(180deg, #ffffff, #fbfcfd);
  box-shadow: 0 1px 0 rgba(16, 24, 40, .03);
}

.mode-card:hover {
  border-color: #bfd0e2;
  box-shadow: 0 12px 28px rgba(16, 24, 40, .08);
  transform: translateY(-2px);
}

.mode-card.active {
  border-color: var(--brand);
  background:
    linear-gradient(180deg, #ffffff, #f5f8ff);
  box-shadow: 0 0 0 3px rgba(49, 100, 212, .12), 0 14px 32px rgba(49, 100, 212, .1);
}

.mode-card strong {
  color: #17202a;
  font-size: 18px;
  font-weight: 900;
}

.mode-card span,
.mode-card em {
  color: var(--muted);
  font-style: normal;
}

.toolbar,
.admin-main-tabs {
  background: #fbfcfd;
}

.toolbar {
  padding: 14px 20px;
}

.admin-main-tabs button {
  border-color: #dbe5ef;
  background: #eef3f8;
  color: #64748b;
}

.admin-main-tabs button:hover {
  color: #334155;
}

.admin-main-tabs button.active {
  background: #fff;
  color: var(--brand-strong);
  box-shadow: 0 -1px 10px rgba(16, 24, 40, .05);
}

.admin-main-tabs span,
.record-tabs span,
.record-page-summary span {
  background: #eaf1ff;
  color: var(--brand-strong);
}

.stage-nav,
.admin-main-tabs,
.record-table {
  scrollbar-width: none;
}

.stage-nav::-webkit-scrollbar,
.admin-main-tabs::-webkit-scrollbar,
.record-table::-webkit-scrollbar {
  display: none;
}

.icon-btn {
  border-color: #d8e1eb;
  background: #fff;
  color: #4b5563;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.icon-btn:hover {
  border-color: #bdcad8;
  background: #f8fafc;
  transform: translateY(-1px);
}

.item-list {
  background: #fff;
}

.item-card {
  border-bottom-color: #e4ebf2;
  background: #fff;
}

.item-card:nth-child(4n + 2),
.item-card:nth-child(4n + 3),
.item-card:nth-child(4n + 4) {
  background: #fff;
}

.item-card:hover {
  background: #fbfcff;
}

.item-head {
  padding: 15px 20px 11px;
}

.item-head > b,
.question-number,
.detail-duty-head b {
  background: #eef4ff;
  color: var(--brand-strong);
}

.item-title {
  background: #f7f9fb;
  color: #16202d;
}

.status {
  border: 1px solid transparent;
  font-size: 12px;
}

.status.confirmed {
  border-color: #bee7d3;
  background: #eaf8f0;
  color: #126a4c;
}

.status.changed {
  border-color: #b7e5ec;
  background: #e9f8fa;
  color: #087383;
}

.status.conflict {
  border-color: #ffd2c9;
  background: #fff0ed;
  color: #b84326;
}

.item-actions .confirm {
  border-color: #c5d6ff;
  background: #eef4ff;
  color: var(--brand-strong);
}

.item-actions .add {
  border-color: #f0d39a;
  background: #fff7e7;
  color: #9a5f11;
}

.item-actions .danger {
  border-color: #f2c3c0;
  background: #fff2f1;
  color: var(--red);
}

.item-body {
  padding-bottom: 18px;
}

.duty-part > span {
  background: #edf8f6;
  color: #0a6d72;
}

.duty-part-content {
  border-color: #d9e3ee;
  background: #fff;
}

.duty-part-content[readonly] {
  background: #f8fafc;
}

.duties-flow-footer,
.record-page-summary {
  border-color: #cce5da;
  background:
    linear-gradient(90deg, rgba(22, 129, 95, .08), rgba(49, 100, 212, .04)),
    #fbfffd;
}

.side-panel {
  top: 24px;
}

.flow-step,
.summary-card,
.submission-item,
.flow-item,
.record-row,
.detail-duty-card,
.qr-card {
  border-color: #dfe7ef;
  background: #fff;
}

.flow-step.done {
  border-color: #bfe5d1;
  background: linear-gradient(90deg, #eefaf4, #ffffff);
}

.record-page {
  background: #fff;
}

.record-row:hover {
  border-color: #cbd8e6;
  box-shadow: 0 8px 18px rgba(16, 24, 40, .06);
}

.link-button {
  color: var(--brand-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.modal-backdrop {
  background: rgba(16, 24, 40, .48);
}

.qr-modal,
.detail-modal {
  box-shadow: var(--shadow-strong);
}

.modal-close {
  background: #f3f6fa;
}

.modal-close:hover {
  background: #e8eef5;
}

.modal-qr-box {
  background:
    linear-gradient(180deg, #f9fbfd, #f2f7f8);
}

.modal-qr-box img {
  box-shadow: 0 12px 28px rgba(16, 24, 40, .08);
}

.ability-empty {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 18px;
  padding: 22px;
  border: 1px solid #cfe3f6;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(49, 100, 212, .08), rgba(11, 127, 143, .05)),
    #ffffff;
}

.ability-empty h3 {
  margin: 10px 0 6px;
  font-size: 22px;
}

.ability-empty p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.ability-card {
  display: grid;
  border-bottom: 1px solid #e4ebf2;
  background: #fff;
}

.ability-card:hover {
  background: #fbfcff;
}

.ability-card-head {
  display: grid;
  grid-template-columns: 38px 42px minmax(180px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 15px 20px 11px;
}

.ability-card-head > b {
  width: 42px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef4ff;
  color: var(--brand-strong);
  font-weight: 900;
}

.ability-title {
  height: 42px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f7f9fb;
  color: #16202d;
  font-size: 17px;
  font-weight: 900;
}

.ability-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  min-width: max-content;
}

.ability-actions .icon-btn,
.ability-card-head > .icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 18px;
}

.ability-actions .confirm {
  border-color: #c5d6ff;
  background: #eef4ff;
  color: var(--brand-strong);
}

.ability-actions .add {
  border-color: #f0d39a;
  background: #fff7e7;
  color: #9a5f11;
}

.ability-actions .danger {
  border-color: #f2c3c0;
  background: #fff2f1;
  color: var(--red);
}

.ability-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .52fr);
  gap: 14px;
  padding: 0 20px 18px 112px;
}

.ability-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #344054;
  font-size: 13px;
  font-weight: 900;
}

.ability-field span {
  color: #536175;
}

.ability-duty,
.ability-list-input {
  width: 100%;
  min-height: 116px;
  resize: vertical;
  border-color: #d9e3ee;
  background: #fff;
  line-height: 1.65;
}

.ability-duty {
  min-height: 156px;
  background: #f8fafc;
}

.ability-list-input {
  min-height: 156px;
  font-weight: 800;
}

.ability-card-body .ability-tags {
  grid-column: 1 / -1;
}

.ability-inline-add {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #dbe7f3;
  border-radius: 8px;
  background: #f8fbff;
}

.ability-new-input {
  height: 40px;
  background: #fff;
}

.final-ability-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  padding-right: 2px;
}

.final-ability-list span {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  background: #fbfcfe;
  color: #253041;
  font-weight: 800;
}

.final-ability-list b {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--brand-strong);
  font-size: 12px;
}

.final-ability-list p,
.summary-card small {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.final-ability-item {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  background: #fbfcfe;
}

.final-ability-item div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.final-ability-item strong {
  color: #22262f;
  font-size: 13px;
}

.final-ability-item b {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--brand-strong);
  font-size: 12px;
}

.final-ability-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.assessment-empty {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 18px;
  padding: 24px;
  border: 1px solid #cfe3f6;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(47, 95, 202, .08), rgba(18, 113, 91, .06)), #fff;
}

.assessment-empty h3,
.assessment-intro h3 {
  margin: 9px 0 6px;
  font-size: 22px;
}

.assessment-empty p,
.assessment-intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.assessment-dashboard,
.question-admin-page,
.assessment-form {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.assessment-metrics,
.question-status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.assessment-metrics > div,
.question-status-strip > div {
  min-width: 0;
  padding: 16px;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  background: #fff;
}

.assessment-metrics span,
.question-status-strip span,
.radar-head p,
.section-title p,
.question-title span,
.question-preview span {
  color: var(--muted);
}

.assessment-metrics span,
.assessment-metrics small,
.question-status-strip span,
.question-status-strip small {
  display: block;
  font-size: 12px;
  line-height: 1.4;
}

.assessment-metrics strong,
.question-status-strip strong {
  display: block;
  margin: 5px 0;
  color: #16202d;
  font-size: 24px;
  line-height: 1.1;
}

.radar-grid,
.response-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.radar-panel,
.response-table,
.question-bank-list,
.assessment-intro,
.assessment-question,
.question-editor {
  min-width: 0;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  background: #fff;
}

.radar-panel {
  padding: 16px;
}

.radar-head,
.section-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.section-title > div {
  min-width: 0;
}

.radar-head h4,
.section-title h4 {
  margin: 0;
  color: #16202d;
  font-size: 16px;
}

.radar-head p,
.section-title p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.select.compact {
  width: min(100%, 280px);
  height: 36px;
}

.radar-chart {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.radar-chart svg {
  width: 100%;
  max-width: 840px;
  height: auto;
  margin: 0 auto;
  display: block;
}

.radar-grid-ring {
  stroke: #e5e9ee;
  stroke-width: 1.5;
}

.radar-grid-ring.outer {
  stroke: #d5dde6;
  stroke-width: 1.8;
}

.radar-axis {
  stroke: #edf1f5;
  stroke-width: 1.2;
}

.radar-axis-label {
  fill: #46505c;
  font-size: 18px;
  font-weight: 800;
}

.radar-scale-label {
  fill: #667085;
  font-size: 18px;
  font-weight: 700;
}

.radar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: center;
}

.radar-legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.radar-legend i {
  width: 11px;
  height: 11px;
  border-radius: 999px;
}

.response-table {
  overflow: hidden;
}

.response-table .section-title,
.question-bank-list .section-title {
  padding: 14px 16px 0;
}

.response-title {
  align-items: flex-start;
  flex-wrap: wrap;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.section-actions .btn {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.response-table table {
  width: 100%;
  border-collapse: collapse;
}

.response-table th,
.response-table td {
  padding: 10px 12px;
  border-top: 1px solid #e7edf4;
  text-align: left;
  font-size: 13px;
}

.response-table th {
  background: #f8fafc;
  color: #344054;
  font-weight: 900;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.assessment-radar-panel {
  margin: 0 0 14px;
}

.assessment-radar-panel .empty-state.compact {
  min-height: 96px;
  display: grid;
  place-items: center;
  border: 1px dashed #d8e1eb;
  border-radius: 8px;
  background: #f8fafc;
}

.radar-modal-content {
  display: grid;
  gap: 16px;
}

.radar-score-table {
  overflow: auto;
  border: 1px solid #e3eaf2;
  border-radius: 8px;
}

.radar-score-table table {
  width: 100%;
  border-collapse: collapse;
}

.radar-score-table th,
.radar-score-table td {
  padding: 9px 11px;
  border-top: 1px solid #edf2f7;
  text-align: left;
  font-size: 12px;
}

.radar-score-table th {
  border-top: 0;
  background: #f8fafc;
  color: #344054;
  font-weight: 900;
}

.radar-generated-at {
  margin: 0;
  color: #667085;
  font-size: 12px;
}

.question-bank-list {
  display: grid;
  gap: 12px;
  overflow: hidden;
}

.question-editor-list {
  display: grid;
  gap: 10px;
  padding: 0 16px;
  align-items: start;
}

.question-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
}

.question-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.question-editor-head .question-title {
  flex: 1 1 auto;
  min-width: 0;
}

.question-editor-head .question-title div {
  min-width: 0;
}

.question-editor-head .question-title strong,
.question-editor-head .question-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.question-editor-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 0 0 auto;
}

.question-card-save {
  min-height: 38px;
  height: 38px;
  padding: 0 16px;
}

.question-editor.dirty {
  border-color: #e8ba62;
  box-shadow: 0 0 0 3px rgba(185, 107, 19, .1);
}

.question-editor.saved {
  border-color: #8fd5b1;
  box-shadow: 0 0 0 3px rgba(18, 113, 91, .12);
}

.question-card-save.dirty {
  border-color: #d29328;
  background: linear-gradient(180deg, #dca446, #b96b13);
  color: #fff;
}

.question-card-save.saved {
  border-color: #12715b;
  background: linear-gradient(180deg, #1c9b75, #12715b);
  color: #fff;
}

.question-save-status {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.question-save-status.dirty {
  background: #fff4dc;
  color: #9d6110;
}

.question-save-status.saved {
  background: #e7f6ee;
  color: #0f6d55;
}

.question-edit-grid {
  display: grid;
  grid-template-columns: minmax(120px, .85fr) minmax(150px, 1.15fr);
  gap: 10px;
  align-items: start;
}

.question-edit-grid .wide {
  grid-column: 1 / -1;
}

.question-edit-grid textarea,
.option-editor-list textarea {
  min-height: 40px;
  padding: 8px 10px;
  line-height: 1.45;
}

.question-edit-grid textarea {
  resize: vertical;
}

.option-editor-list textarea {
  resize: none;
  overflow-y: auto;
}

.question-edit-grid textarea[data-question-field="question"] {
  height: 58px;
}

.question-edit-grid textarea[data-question-field="behavior_standard"],
.option-editor-list textarea[data-option-field="text"] {
  height: 40px;
}

.option-editor-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.question-option-editor {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 132px;
  gap: 12px;
  align-items: center;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid #e7edf4;
  border-radius: 8px;
  background: #fbfcfe;
}

.question-option-editor strong {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef4ff;
  color: var(--blue);
  font-size: 16px;
}

.question-option-editor label {
  display: grid;
  grid-template-columns: auto minmax(0, 72px);
  gap: 8px;
  align-items: center;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.question-option-editor input {
  height: 38px;
  padding: 0 10px;
}

.question-bottom-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 4px 16px 16px;
}

.question-preview {
  display: grid;
  gap: 8px;
  padding: 15px 16px;
  border-top: 1px solid #e7edf4;
}

.question-preview > div,
.question-title {
  display: flex;
  gap: 10px;
  align-items: center;
}

.question-preview strong,
.question-title strong {
  color: #16202d;
}

.question-preview p,
.assessment-question p {
  margin: 0;
  color: #263244;
  line-height: 1.65;
}

.question-preview ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.question-preview li {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  color: #344054;
  font-size: 13px;
  line-height: 1.5;
}

.question-preview small {
  color: var(--muted);
  line-height: 1.5;
}

.assessment-intro {
  padding: 20px;
}

.assessment-question {
  display: grid;
  gap: 13px;
  padding: 18px;
}

.question-title b {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #eef4ff;
  color: var(--blue);
}

.question-title div {
  display: grid;
  gap: 3px;
}

.answer-options {
  display: grid;
  gap: 9px;
}

.answer-options label {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  background: #fbfcfe;
  cursor: pointer;
}

.answer-options label:has(input:checked) {
  border-color: rgba(47, 95, 202, .6);
  background: #eef4ff;
}

.answer-options input {
  width: 16px;
  height: 16px;
  margin-top: 3px;
}

.answer-options span {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  color: #263244;
  line-height: 1.55;
}

.answer-options b {
  color: var(--blue);
}

@media (max-width: 820px) {
  .main {
    padding: 16px;
  }

  .topbar {
    min-height: auto;
  }

  .panel-head,
  .toolbar,
  .setup-body,
  .enterprise-body,
  .side-body {
    padding-left: 14px;
    padding-right: 14px;
  }

  .ability-empty,
  .assessment-empty,
  .assessment-metrics,
  .question-status-strip,
  .radar-grid,
  .response-grid,
  .ability-card-head,
  .ability-card-body {
    grid-template-columns: 1fr;
  }

  .question-editor-head,
  .question-bottom-actions {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .question-editor-head {
    flex-direction: column;
  }

  .question-editor-actions {
    flex-wrap: wrap;
  }

  .question-card-save {
    flex: 1 1 120px;
  }

  .question-option-editor {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .question-option-editor label {
    grid-column: 2;
    grid-template-columns: auto minmax(0, 88px);
    justify-content: flex-start;
  }

  .ability-empty {
    margin: 12px;
  }

  .assessment-dashboard,
  .assessment-form {
    padding: 12px;
  }

  .ability-card-head {
    gap: 8px;
    padding: 12px;
  }

  .ability-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .ability-card-body {
    padding: 0 12px 14px;
  }

  .ability-inline-add {
    grid-template-columns: 1fr;
  }
}

/* 2026-07 compact premium console skin, visual-only. */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #f8f9fb;
  --text: #20242c;
  --muted: #747b86;
  --line: #e4e7ec;
  --blue: #2563eb;
  --brand: #2563eb;
  --brand-strong: #1d4ed8;
  --cyan: #0891b2;
  --green: #0f9f75;
  --amber: #b7791f;
  --red: #e14d68;
  --ink: #22262f;
  --mint: #e7f8f2;
  --peach: #fff5e5;
  --gold: #c99a2e;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 14px 38px rgba(16, 24, 40, .045);
  --shadow-strong: 0 18px 52px rgba(16, 24, 40, .16);
  --ring: 0 0 0 3px rgba(37, 99, 235, .12);
  --side: 236px;
}

html,
body {
  background: var(--bg);
}

body {
  color: var(--text);
  font-family: "Inter", "MiSans", "HarmonyOS Sans SC", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 14px;
}

button,
input,
select,
textarea {
  letter-spacing: 0;
}

.app {
  grid-template-columns: var(--side) minmax(0, 1fr);
  background: var(--bg);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 0;
  padding: 22px 12px 16px;
  border-right: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  box-shadow: none;
}

.brand {
  gap: 10px;
  margin: 0 0 18px;
  padding: 0 10px 18px;
  border-bottom: 1px solid #eef0f3;
}

.logo {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 14px;
  box-shadow: none;
}

.brand h1 {
  color: #1f232b;
  font-size: 15px;
  font-weight: 900;
}

.brand p {
  color: #8b929e;
  font-size: 11px;
}

.stage-nav {
  gap: 7px;
}

.stage {
  grid-template-columns: 34px minmax(0, 1fr);
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #656d78;
}

.stage:hover {
  border-color: #eceff3;
  background: #f8f9fb;
  box-shadow: none;
}

.stage.active {
  border-color: #dcdfe5;
  background: #eeeeef;
  color: #1f232b;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, .02);
}

.stage b {
  width: 32px;
  height: 32px;
  border: 1px solid #e1e5ea;
  border-radius: 999px;
  background: #fff;
  color: #1f232b !important;
  font-size: 13px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
}

.stage strong {
  color: inherit;
  font-size: 13px;
  font-weight: 900;
}

.stage small {
  display: none;
}

.main {
  min-height: 100vh;
  padding: 0 26px 30px;
  background: #fafafa;
}

.topbar {
  min-height: 78px;
  margin: 0 -26px 26px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
}

.topbar > div:first-child {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "icon title" "icon desc";
  gap: 2px 12px;
  align-items: center;
}

.topbar > div:first-child::before {
  content: "□";
  grid-area: icon;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #dfe8ef;
  border-radius: 8px;
  background: #fff;
  color: var(--cyan);
  font-size: 18px;
  line-height: 1;
}

.topbar .eyebrow {
  display: none;
}

.topbar h2 {
  grid-area: title;
  margin: 0;
  color: #111827;
  font-size: 22px;
  font-weight: 900;
}

.topbar p {
  grid-area: desc;
  max-width: 900px;
  color: #7b8390;
  font-size: 12px;
  line-height: 1.45;
}

.top-actions {
  gap: 8px;
}

.panel,
.auth-panel,
.qr-modal,
.detail-modal,
.summary-modal,
.mode-card,
.summary-card,
.flow-step,
.submission-item,
.flow-item,
.record-row,
.item-card,
.ability-card,
.question-editor,
.radar-panel,
.response-table,
.question-bank-list,
.assessment-question,
.assessment-intro {
  border-color: var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.panel {
  box-shadow: var(--shadow);
}

.panel-head {
  min-height: 58px;
  padding: 12px 16px;
  border-bottom-color: #eceff3;
  background: #fff;
}

.panel-head h3,
.section-title h4,
.radar-head h4,
.summary-card h4 {
  color: #22262f;
  font-size: 15px;
  font-weight: 900;
}

.panel-head p,
.section-title p,
.radar-head p,
.summary-card p {
  color: #7b8390;
  font-size: 12px;
}

input,
select {
  height: 36px;
  border-color: #dfe3e8;
  border-radius: 999px;
  background: #f8f9fb;
  color: #242936;
  font-size: 13px;
}

textarea {
  border-color: #dfe3e8;
  border-radius: 8px;
  background: #fff;
  color: #242936;
  font-size: 13px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #94a3b8;
  box-shadow: var(--ring);
}

.item-title,
.ability-title,
.duty-title-input,
.ability-duty,
.ability-list-input,
.duty-part-content,
.question-edit-grid input,
.question-edit-grid textarea,
.question-option-editor input {
  border-radius: 7px;
}

.btn {
  min-width: 36px;
  min-height: 34px;
  padding: 0 12px;
  border-color: #dfe3e8;
  border-radius: 999px;
  background: #fff;
  color: #2d333d;
  font-size: 13px;
  font-weight: 900;
  box-shadow: none;
}

.btn:hover {
  border-color: #c8ced8;
  background: #f9fafb;
  transform: translateY(-1px);
}

.btn.icon-only,
.btn.mini,
.head-actions .btn,
.top-actions .btn,
.modal-actions .btn,
.modal-actions a.btn {
  width: 36px;
  min-width: 36px;
  padding: 0;
}

.btn.command,
.head-actions .btn.command,
.top-actions .btn.command {
  width: auto;
  min-width: 92px;
  padding: 0 14px;
}

.btn.primary {
  border-color: #1f2937;
  background: #1f2937;
  color: #fff;
  box-shadow: none;
}

.btn.primary:hover {
  background: #111827;
  box-shadow: 0 8px 18px rgba(17, 24, 39, .16);
}

.btn.soft {
  border-color: #cdeee3;
  background: #edf9f5;
  color: #0f8d68;
}

.btn.ghost {
  border-color: #e2e5ea;
  background: #fff;
  color: #5b626f;
}

.btn.danger {
  border-color: #ffd6df;
  background: #fff5f7;
  color: var(--red);
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-color: #dfe3e8;
  border-radius: 999px;
  background: #fff;
  color: #3b414c;
  font-size: 17px;
  box-shadow: none;
}

.icon-btn:hover {
  border-color: #c8ced8;
  background: #f9fafb;
}

.item-actions .confirm,
.ability-actions .confirm,
.summary-duty-actions .confirm {
  border-color: #cdeee3;
  background: #edf9f5;
  color: #0f8d68;
}

.item-actions .add,
.ability-actions .add,
.summary-duty-actions .add {
  border-color: #eee2bc;
  background: #fff9e8;
  color: #9a6412;
}

.icon-btn.danger,
.item-actions .danger,
.ability-actions .danger,
.summary-duty-actions .danger {
  border-color: #ffd6df;
  background: #fff5f7;
  color: var(--red);
}

.setup-grid {
  width: 100%;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr);
}

.setup-grid:has(.enterprise-admin:not(.hidden)) {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
}

.setup-body,
.enterprise-body,
.side-body,
.assessment-dashboard,
.question-admin-page,
.assessment-form {
  gap: 12px;
  padding: 14px;
}

.inline-row {
  grid-template-columns: minmax(0, 1fr) 36px;
}

.mode-grid {
  gap: 10px;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.mode-card {
  min-height: 104px;
  gap: 6px;
  padding: 13px 14px;
  background: #fff;
}

.mode-card:hover,
.mode-card.active {
  transform: none;
}

.mode-card.active {
  border-color: #1f2937;
  background: #f8f9fb;
  box-shadow: inset 0 0 0 1px #1f2937;
}

.mode-card strong {
  color: #22262f;
  font-size: 16px;
}

.mode-card span,
.mode-card em {
  color: #747b86;
  font-size: 12px;
}

.mode-gate {
  width: 100%;
  gap: 12px;
}

.mode-gate .panel-head {
  min-height: 50px;
  padding: 10px 16px;
}

.mode-gate .setup-body {
  padding: 12px 16px 14px;
}

.mode-gate .field {
  gap: 5px;
}

.mode-gate .gate-actions {
  margin-top: 2px;
}

.gate-actions,
.head-actions,
.toolbar,
.record-page-actions,
.section-actions,
.question-bottom-actions,
.table-actions {
  gap: 8px;
}

.toolbar {
  padding: 10px 14px;
  border-bottom-color: #eceff3;
  background: #fff;
}

.search {
  flex-basis: 280px;
}

.select {
  width: 132px;
}

.account-field {
  grid-template-columns: auto 132px;
}

.admin-main-tabs {
  gap: 7px;
  padding: 10px 14px 0;
  background: #fff;
}

.admin-main-tabs button {
  height: 34px;
  padding: 0 13px;
  border-color: #e1e5ea;
  border-radius: 999px;
  background: #fff;
  color: #616977;
  font-size: 13px;
}

.admin-main-tabs button.active {
  border-color: #cfd4dc;
  background: #eeeeef;
  color: #1f232b;
  box-shadow: none;
}

.admin-main-tabs span,
.record-tabs span,
.record-page-summary span {
  min-width: 22px;
  height: 20px;
  background: #f0f1f3;
  color: #4b5563;
}

.work-area {
  gap: 16px;
}

.work-area.admin-layout {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.side-panel {
  top: 16px;
  max-height: calc(100vh - 32px);
}

.item-card,
.question-card {
  background: #fff !important;
}

.item-card:hover,
.question-card:hover,
.ability-card:hover,
.record-row:hover {
  background: #fafbfc;
  box-shadow: none;
}

.item-head,
.ability-card-head {
  gap: 10px;
  padding: 10px 14px 8px;
}

.item-head {
  grid-template-columns: 34px 38px minmax(160px, 1fr) auto auto;
}

.item-head > b,
.ability-card-head > b,
.question-number,
.question-title b,
.detail-duty-head b {
  width: 34px;
  height: 30px;
  border: 1px solid #e1e6ee;
  border-radius: 999px;
  background: #f5f7fa;
  color: #3e4652;
  font-size: 12px;
}

.item-title,
.ability-title,
.duty-title-input {
  height: 36px;
  background: #f8f9fb;
  font-size: 14px;
  font-weight: 900;
}

.status {
  min-width: 58px;
  height: 26px;
  padding: 0 10px;
  font-size: 12px;
}

.status.confirmed {
  border-color: #aee9d2;
  background: #e8faf2;
  color: #0f9f75;
}

.status.changed {
  border-color: #bae6fd;
  background: #eef9ff;
  color: #0b7fa5;
}

.status.conflict {
  border-color: #ffd4df;
  background: #fff4f6;
  color: #d63757;
}

.item-body,
.ability-card-body {
  gap: 8px;
  padding: 0 14px 12px 96px;
}

.duty-part-list,
.answer-options,
.option-editor-list {
  gap: 7px;
}

.duty-part {
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
}

.duty-part > span {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
}

.duty-part-content {
  min-height: 38px;
  padding: 8px 10px;
}

.ability-tags {
  gap: 6px;
}

.ability-tags span,
.tag {
  min-height: 24px;
  padding: 4px 9px;
  border-color: #dfe7f3;
  background: #f8fafc;
  color: #516070;
  font-size: 12px;
}

.duties-flow-footer,
.record-page-summary,
.ability-empty,
.assessment-empty {
  margin: 14px;
  padding: 14px;
  border-color: #e2e6ec;
  background: #fbfcfd;
}

.duties-flow-footer strong,
.record-page-summary strong {
  color: #22262f;
  font-size: 15px;
}

.ability-stage-block {
  display: grid;
  gap: 12px;
  margin: 14px;
  padding: 14px;
  border: 1px solid #e2e6ec;
  border-radius: 8px;
  background: #fbfcfd;
}

.ability-stage-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.ability-stage-head h3 {
  margin: 6px 0 4px;
  color: #17202a;
  font-size: 18px;
  font-weight: 900;
}

.ability-stage-head p {
  margin: 0;
  color: #7b8390;
  font-size: 13px;
  line-height: 1.55;
}

.ability-stage-head > strong {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #dfe7ef;
  border-radius: 999px;
  background: #fff;
  color: #536175;
  font-size: 12px;
}

.ability-stage-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.ability-stage-block .ability-empty {
  margin: 0;
}

.ability-stage-list {
  display: grid;
  gap: 8px;
}

.ability-stage-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid #e2e6ec;
}

.ability-summary-block {
  background: #fff;
}

.ability-summary-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ability-summary-status span {
  padding: 6px 10px;
  border: 1px solid #dfe7ef;
  border-radius: 999px;
  background: #f8fafc;
  color: #536175;
  font-size: 12px;
  font-weight: 800;
}

.ability-summary-status em {
  font-style: normal;
}

.final-ability-list.wide {
  grid-template-columns: repeat(2, minmax(360px, 1fr));
  gap: 16px;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.final-ability-editor {
  gap: 12px;
  padding: 16px;
  background: linear-gradient(180deg, #ffffff, #fbfcfe);
  box-shadow: 0 8px 20px rgba(23, 32, 46, .04);
}

.final-ability-item .final-ability-editor-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.final-ability-item .final-ability-state,
.final-ability-item .final-ability-card-actions {
  display: flex;
  align-items: center;
}

.final-ability-state {
  gap: 10px;
  min-width: 0;
}

.final-ability-card-actions {
  gap: 8px;
}

.final-review-badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border: 1px solid #dfe7ef;
  border-radius: 999px;
  background: #f8fafc;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

.final-ability-list .final-review-badge {
  display: inline-flex;
  grid-template-columns: none;
  width: auto;
  min-height: 28px;
  padding: 0 10px;
  line-height: 1;
}

.final-review-badge.dirty {
  border-color: #f2d48a;
  background: #fff8e6;
  color: #9a5b0b;
}

.final-review-badge.confirmed {
  border-color: #b9e6d4;
  background: #ecfdf5;
  color: #0f7a58;
}

.final-ability-field {
  display: grid;
  gap: 7px;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

.final-ability-list .final-ability-field span {
  display: block;
  grid-template-columns: none;
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #667085;
  line-height: 1.2;
}

.final-ability-name {
  height: 42px;
  border-color: #dbe3ec;
  background: #fff;
  font-size: 16px;
  font-weight: 900;
}

.final-ability-definition {
  min-height: 116px;
  border-color: #dbe3ec;
  background: #fff;
  color: #435064;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
}

.final-ability-editor .icon-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
}

.final-ability-editor .final-check {
  border-color: #cfe7dc;
  background: #effaf5;
  color: #0f7a58;
  font-weight: 900;
}

.final-ability-editor.review-dirty {
  border-color: #f2d48a;
  background: linear-gradient(180deg, #fffdfa, #fff9ec);
}

.final-ability-editor.review-confirmed {
  border-color: #b9e6d4;
  background: linear-gradient(180deg, #ffffff, #f3fbf7);
}

.final-ability-editor.review-attention {
  animation: final-review-pulse 1.2s ease-out;
}

@keyframes final-review-pulse {
  0%, 100% { box-shadow: 0 8px 20px rgba(23, 32, 46, .04); }
  30% { box-shadow: 0 0 0 4px rgba(216, 162, 58, .2), 0 12px 26px rgba(23, 32, 46, .08); }
}

@media (max-width: 1180px) {
  .final-ability-list.wide {
    grid-template-columns: 1fr;
  }
}

.flow-stack,
.submission-list,
.record-table {
  gap: 7px;
}

.flow-step {
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 9px;
}

.flow-step b {
  width: 28px;
  height: 28px;
  border-radius: 999px;
}

.summary-card {
  gap: 8px;
  padding: 11px;
}

.record-page {
  gap: 10px;
  padding: 14px;
}

.record-page-summary {
  grid-template-columns: minmax(0, 1fr) auto;
}

.record-row {
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  background: #fff;
}

.record-head {
  background: #f8f9fb;
}

.record-page .record-row {
  grid-template-columns: 30px 56px minmax(150px, 1fr) minmax(170px, 1fr) 104px;
}

.link-button {
  color: #1f2937;
  font-weight: 900;
}

.question-status-strip,
.assessment-metrics {
  gap: 10px;
}

.question-status-strip > div,
.assessment-metrics > div {
  padding: 12px;
}

.assessment-metrics strong,
.question-status-strip strong {
  font-size: 20px;
}

.question-bank-list .section-title,
.response-table .section-title {
  padding: 12px 14px 0;
}

.question-editor-list {
  gap: 8px;
  padding: 0 14px;
}

.question-editor {
  gap: 8px;
  padding: 10px;
  background: #fff;
}

.question-editor-head {
  gap: 10px;
}

.question-editor-actions {
  gap: 6px;
  padding: 2px;
}

.question-card-save {
  width: 34px;
  min-width: 34px;
  padding: 0;
}

.question-save-status {
  font-size: 11px;
}

.question-edit-grid {
  gap: 8px;
}

.question-option-editor {
  grid-template-columns: 34px minmax(0, 1fr) 112px;
  gap: 8px;
  min-height: 54px;
  padding: 8px 10px;
}

.question-option-editor strong {
  width: 30px;
  height: 30px;
  border-radius: 999px;
}

.question-bottom-actions {
  padding: 2px 14px 14px;
}

.response-table th,
.response-table td,
.radar-score-table th,
.radar-score-table td {
  padding: 8px 10px;
  font-size: 12px;
}

.response-table th,
.radar-score-table th {
  background: #f8f9fb;
  color: #5e6673;
}

.table-actions {
  flex-wrap: nowrap;
}

.answer-options label {
  padding: 8px 10px;
  border-radius: 8px;
}

.answer-options label:has(input:checked) {
  border-color: #1f2937;
  background: #f8f9fb;
}

.modal-backdrop {
  background: rgba(17, 24, 39, .42);
  backdrop-filter: blur(8px);
}

.qr-modal,
.detail-modal,
.summary-modal,
.notice-modal {
  border-color: #e4e7ec;
  box-shadow: var(--shadow-strong);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #f8f9fb;
  color: #4b5563;
  font-size: 20px;
}

.modal-badge {
  background: #edf9f5;
  color: #0f8d68;
}

.radar-chart svg {
  max-width: 760px;
}

@media (max-width: 1180px) {
  :root {
    --side: 214px;
  }

  .work-area.admin-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .side-panel {
    position: static;
    max-height: none;
  }
}

@media (max-width: 820px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    padding: 0 4px 10px;
  }

  .stage-nav {
    grid-template-columns: repeat(4, minmax(80px, 1fr));
    overflow-x: auto;
  }

  .stage {
    grid-template-columns: 30px minmax(0, 1fr);
    min-width: 116px;
  }

  .main {
    padding: 0 12px 20px;
  }

  .topbar {
    margin: 0 -12px 14px;
    padding: 12px;
  }

  .topbar h2 {
    font-size: 19px;
  }

  .item-head,
  .ability-card-head,
  .question-option-editor,
  .record-page-summary,
  .duties-flow-footer {
    grid-template-columns: 1fr;
  }

  .item-body,
  .ability-card-body {
    padding: 0 12px 12px;
  }

  .table-actions {
    flex-wrap: wrap;
  }
}

/* Step 5: improvement direction */
.stage:nth-child(5) b {
  color: #d7a344;
}

.improvement-page {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.improvement-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(132px, 1fr));
  width: max-content;
  max-width: 100%;
  padding: 4px;
  border: 1px solid #d7dde6;
  border-radius: 8px;
  background: #f4f6f8;
}

.improvement-tabs button {
  min-height: 36px;
  padding: 0 15px;
  border-radius: 6px;
  background: transparent;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.improvement-tabs button:hover {
  color: #26384c;
}

.improvement-tabs button.active {
  background: #fff;
  color: #244f9e;
  box-shadow: 0 1px 5px rgba(15, 23, 42, .1);
}

.improvement-tabs span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 5px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e9edf3;
  color: #475467;
  font-size: 11px;
}

.improvement-tabs button.active span {
  background: #e8effc;
  color: #244f9e;
}

.improvement-status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid #d8dee7;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.improvement-status-strip > div {
  display: grid;
  gap: 3px;
  min-height: 64px;
  padding: 12px 15px;
  border-right: 1px solid #e4e8ee;
  background: #fafbfc;
}

.improvement-status-strip > div:last-child {
  border-right: 0;
}

.improvement-status-strip > div.done {
  background: #f4faf7;
}

.improvement-status-strip span {
  color: #7a8492;
  font-size: 11px;
  font-weight: 700;
}

.improvement-status-strip strong {
  color: #3b4654;
  font-size: 14px;
}

.improvement-status-strip .done strong {
  color: #16745d;
}

.improvement-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 3px 0 1px;
}

.improvement-page-head h3 {
  margin: 7px 0 4px;
  color: #182433;
  font-size: 20px;
  line-height: 1.25;
}

.improvement-page-head p {
  max-width: 760px;
  margin: 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.65;
}

.improvement-report-actions,
.improvement-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.report-state {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid #d7dde6;
  border-radius: 6px;
  background: #f7f8fa;
  color: #667085;
  font-size: 11px;
  line-height: 1.25;
}

.report-state.ready {
  border-color: #b9dfd1;
  background: #edf9f5;
  color: #14735a;
}

.report-state.stale {
  border-color: #edd39d;
  background: #fff8e8;
  color: #94610e;
}

.improvement-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.improvement-metrics > div {
  display: grid;
  gap: 4px;
  min-height: 88px;
  padding: 13px 15px;
  border: 1px solid #dbe1e8;
  border-radius: 8px;
  background: #fff;
}

.improvement-metrics span,
.improvement-metrics small {
  color: #7a8492;
  font-size: 11px;
}

.improvement-metrics strong {
  color: #24364b;
  font-size: 24px;
  line-height: 1;
}

.improvement-radar-panel {
  margin: 0;
  padding: 16px 0 4px;
  border: 0;
  border-top: 1px solid #dfe4ea;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.improvement-radar-panel .radar-chart {
  max-width: 900px;
  margin: 0 auto;
}

.improvement-weak-section,
.improvement-score-table {
  display: grid;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid #dfe4ea;
}

.improvement-weak-section .section-title,
.improvement-score-table .section-title {
  margin: 0;
}

.improvement-weak-list {
  display: grid;
  border-top: 1px solid #dfe4ea;
}

.improvement-weak-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
  padding: 17px 2px;
  border-bottom: 1px solid #e5e9ef;
}

.improvement-weak-rank {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.improvement-weak-rank > b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: #eef2f6;
  color: #34465b;
  font-size: 15px;
}

.improvement-priority {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 4px 7px;
  border-radius: 5px;
  background: #fdecec;
  color: #b33a3a;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.improvement-priority.watch {
  background: #fff4dd;
  color: #9a6213;
}

.improvement-priority.steady {
  background: #eaf7f1;
  color: #18745d;
}

.improvement-weak-main {
  display: grid;
  gap: 10px;
}

.improvement-weak-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.improvement-weak-head h5 {
  margin: 0 0 4px;
  color: #1f2d3d;
  font-size: 16px;
}

.improvement-weak-head p,
.improvement-objective,
.improvement-measure {
  margin: 0;
  color: #5f6d7c;
  font-size: 13px;
  line-height: 1.65;
}

.improvement-score-pair {
  display: flex;
  gap: 7px;
  flex-shrink: 0;
}

.improvement-score-pair span {
  padding: 6px 8px;
  border: 1px solid #dce2e9;
  border-radius: 6px;
  background: #f8fafb;
  color: #667085;
  font-size: 11px;
}

.improvement-score-pair b {
  color: #26384c;
  font-size: 13px;
}

.improvement-objective,
.improvement-measure {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 8px;
  padding: 9px 10px;
  border-left: 3px solid #6b89bd;
  background: #f6f8fb;
}

.improvement-measure {
  border-left-color: #47a184;
  background: #f4faf7;
}

.improvement-objective strong,
.improvement-measure strong {
  color: #34465b;
  font-size: 12px;
}

.improvement-actions-list {
  display: grid;
  gap: 6px;
}

.improvement-actions-list p {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin: 0;
  color: #445264;
  font-size: 13px;
  line-height: 1.6;
}

.improvement-actions-list b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e9eef5;
  color: #41566b;
  font-size: 11px;
}

.improvement-score-table .response-table,
.personal-report-table {
  margin: 0;
  overflow-x: auto;
}

.improvement-score-table table,
.personal-report-table table {
  min-width: 820px;
}

.score-gap {
  color: #b54747;
  font-weight: 800;
}

.score-good {
  color: #18745d;
  font-weight: 800;
}

.improvement-empty {
  min-height: 230px;
}

#detailModal.improvement-modal-active .detail-modal {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
}

.improvement-modal-content {
  display: grid;
  gap: 16px;
}

.improvement-modal-actions {
  position: sticky;
  bottom: -18px;
  padding: 12px 0 2px;
  border-top: 1px solid #dfe4ea;
  background: #fff;
}

@media (max-width: 980px) {
  .improvement-status-strip,
  .improvement-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .improvement-status-strip > div:nth-child(2) {
    border-right: 0;
  }

  .improvement-status-strip > div:nth-child(-n + 2) {
    border-bottom: 1px solid #e4e8ee;
  }

  .improvement-page-head,
  .improvement-weak-head {
    flex-direction: column;
  }

  .improvement-report-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 820px) {
  .stage-nav {
    grid-template-columns: repeat(5, minmax(112px, 1fr));
  }

  .improvement-tabs {
    width: 100%;
  }

  .improvement-status-strip,
  .improvement-metrics {
    grid-template-columns: 1fr;
  }

  .improvement-status-strip > div,
  .improvement-status-strip > div:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid #e4e8ee;
  }

  .improvement-status-strip > div:last-child {
    border-bottom: 0;
  }

  .improvement-weak-item {
    grid-template-columns: 1fr;
  }

  .improvement-weak-rank {
    flex-direction: row;
    align-items: center;
  }

  .improvement-score-pair {
    flex-wrap: wrap;
  }
}

/* 2026-07-12 final industrial console theme. Visual overrides only. */
:root {
  --bg: #f2f5f7;
  --surface: #ffffff;
  --surface-soft: #f7f9fb;
  --text: #172033;
  --muted: #687386;
  --line: #d9e0e8;
  --blue: #2864dc;
  --brand: #168fc4;
  --brand-strong: #0f78a8;
  --cyan: #19aeba;
  --green: #16836b;
  --amber: #b46c1a;
  --red: #d64555;
  --ink: #111d2d;
  --nav: #091423;
  --nav-soft: #102237;
  --shadow: 0 1px 2px rgba(9, 20, 35, .04), 0 8px 24px rgba(9, 20, 35, .055);
  --shadow-strong: 0 24px 64px rgba(5, 13, 24, .22);
  --ring: 0 0 0 3px rgba(22, 143, 196, .14);
  --side: 244px;
}

html,
body {
  background: var(--bg);
}

body {
  color: var(--text);
  background: var(--bg);
  font-family: "Inter", "MiSans", "HarmonyOS Sans SC", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 14px;
}

/* Authentication */
.auth-root {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
  gap: clamp(48px, 8vw, 124px);
  padding: clamp(36px, 6vw, 76px) clamp(28px, 8vw, 116px);
  overflow: hidden;
  background: #071321;
}

.auth-root::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  background-image:
    linear-gradient(rgba(64, 157, 194, .075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(64, 157, 194, .075) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, .72) 56%, transparent 100%);
}

.auth-root::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(110deg, rgba(7, 19, 33, .04) 0 45%, rgba(8, 35, 52, .9) 76%, #071321 100%);
}

.auth-copy {
  position: relative;
  max-width: 760px;
  padding-left: 22px;
}

.auth-copy::before {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 0;
  width: 3px;
  background: #1ab4c2;
}

.auth-emblem {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin-bottom: 28px;
  border: 1px solid rgba(74, 202, 215, .42);
  border-radius: 6px;
  background: rgba(13, 43, 61, .82);
  color: #72e0e6;
  font-size: 17px;
  font-weight: 900;
  box-shadow: inset 0 0 0 5px rgba(20, 174, 186, .055);
}

.auth-copy .eyebrow {
  color: #58cbd5;
  font-size: 11px;
  letter-spacing: 0;
}

.auth-copy h1 {
  max-width: none;
  margin: 10px 0 8px;
  color: #f2f8fb;
  font-size: clamp(36px, 4.3vw, 58px);
  line-height: 1.12;
  letter-spacing: 0;
}

.auth-product {
  display: block;
  color: #8ba8b8;
  font-size: 13px;
  font-weight: 800;
}

.auth-copy > p {
  max-width: 650px;
  margin-top: 28px;
  color: #a9bdc9;
  font-size: 15px;
  line-height: 1.9;
}

.auth-points {
  gap: 0;
  margin-top: 32px;
  border-top: 1px solid rgba(148, 183, 200, .18);
  border-bottom: 1px solid rgba(148, 183, 200, .18);
}

.auth-points span {
  padding: 12px 18px;
  border: 0;
  border-right: 1px solid rgba(148, 183, 200, .18);
  border-radius: 0;
  background: transparent;
  color: #7797a9;
  font-size: 10px;
  font-weight: 800;
}

.auth-points span:first-child {
  padding-left: 0;
}

.auth-panel {
  width: 100%;
  padding: 28px;
  border: 1px solid rgba(100, 170, 197, .25);
  border-radius: 8px;
  background: rgba(10, 28, 43, .94);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .34);
  backdrop-filter: blur(16px);
}

.auth-panel-head {
  margin-bottom: 20px;
}

.auth-panel-head > span {
  color: #42c4ce;
  font-size: 10px;
  font-weight: 900;
}

.auth-panel-head h2 {
  margin: 7px 0 5px;
  color: #f0f7fa;
  font-size: 21px;
}

.auth-panel-head p {
  margin: 0;
  color: #7f9bab;
  font-size: 12px;
}

.auth-tabs {
  gap: 0;
  padding: 0;
  margin-bottom: 20px;
  border: 0;
  border-bottom: 1px solid rgba(117, 159, 178, .2);
  border-radius: 0;
  background: transparent;
}

.auth-tabs button {
  position: relative;
  height: 40px;
  border-radius: 0;
  color: #7792a2;
}

.auth-tabs button.active {
  background: transparent;
  color: #eef9fb;
  box-shadow: inset 0 -2px 0 #22b7c4;
}

.auth-form {
  gap: 14px;
}

.auth-form label {
  gap: 7px;
  color: #9db2bf;
  font-size: 12px;
}

.auth-form input,
.auth-form select {
  height: 42px;
  border-color: rgba(122, 169, 190, .25);
  border-radius: 6px;
  background: #0b2132;
  color: #f1f7fa;
}

.auth-form input::placeholder {
  color: #5f7c8d;
}

.auth-form input:focus,
.auth-form select:focus {
  border-color: #23aebc;
  box-shadow: 0 0 0 3px rgba(35, 174, 188, .12);
}

.auth-root .btn.primary {
  height: 42px;
  border-color: #168fc4;
  border-radius: 6px;
  background: #168fc4;
  box-shadow: none;
}

.auth-root .btn.primary:hover {
  border-color: #20a7d9;
  background: #20a7d9;
}

.auth-form small {
  color: #607c8d;
}

/* Application shell */
.app {
  grid-template-columns: var(--side) minmax(0, 1fr);
  background: var(--bg);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 0;
  padding: 18px 12px;
  border-right: 1px solid #172c42;
  background: var(--nav);
  color: #dce8ef;
  box-shadow: none;
}

.brand {
  gap: 10px;
  margin: 0 0 14px;
  padding: 2px 8px 18px;
  border-bottom: 1px solid rgba(137, 178, 198, .15);
}

.logo {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid rgba(70, 198, 210, .38);
  border-radius: 6px;
  background: #102a3d;
  color: #67d6df;
  font-size: 15px;
  box-shadow: inset 0 -2px 0 rgba(25, 174, 186, .18);
}

.brand-kicker {
  display: block;
  margin-bottom: 3px;
  color: #4fbac6;
  font-size: 9px;
  font-weight: 800;
}

.brand h1 {
  color: #f2f7fa;
  font-size: 14px;
}

.brand p {
  margin-top: 3px;
  color: #688295;
  font-size: 10px;
}

.stage-nav {
  gap: 4px;
}

.stage {
  position: relative;
  grid-template-columns: 32px minmax(0, 1fr);
  min-height: 56px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #8da2b2;
}

.stage:hover {
  border-color: rgba(104, 163, 190, .13);
  background: #0d1d2e;
  color: #dce8ef;
}

.stage.active {
  border-color: rgba(46, 157, 193, .24);
  background: #10253a;
  color: #ffffff;
  box-shadow: inset 3px 0 0 #19aeba;
}

.stage b {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(126, 167, 188, .22);
  border-radius: 5px;
  background: #0d1d2d;
  color: #718c9d !important;
  font-size: 11px;
  box-shadow: none;
}

.stage.active b {
  border-color: rgba(58, 193, 206, .4);
  background: #12334a;
  color: #61d1db !important;
}

.stage strong {
  color: inherit;
  font-size: 13px;
}

.stage small {
  display: block;
  margin-top: 2px;
  color: #5f798b;
  font-size: 10px;
}

.stage.active small {
  color: #86a6b8;
}

.main {
  min-height: 100vh;
  padding: 0 24px 28px;
  background: var(--bg);
}

.topbar {
  min-height: 72px;
  margin: 0 -24px 18px;
  padding: 13px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
}

.topbar > div:first-child {
  display: block;
}

.topbar > div:first-child::before {
  content: none;
}

.topbar .eyebrow {
  display: block;
  margin-bottom: 3px;
  color: var(--brand-strong);
  font-size: 9px;
  font-weight: 900;
}

.topbar h2 {
  margin: 0;
  color: #172033;
  font-size: 20px;
  line-height: 1.25;
}

.topbar p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

/* Controls and surfaces */
input,
select {
  height: 36px;
  border-color: var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
}

textarea {
  border-color: var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: var(--ring);
}

.btn {
  min-width: 36px;
  min-height: 34px;
  padding: 0 12px;
  border-color: var(--line);
  border-radius: 6px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  box-shadow: none;
  transition: border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.btn:hover {
  border-color: #bac5d1;
  background: #f7f9fb;
  transform: translateY(-1px);
}

.btn.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.btn.primary:hover {
  border-color: #1f55c6;
  background: #1f55c6;
  box-shadow: 0 7px 16px rgba(40, 100, 220, .2);
}

.btn.soft {
  border-color: #b9e3e8;
  background: #ecf8fa;
  color: #117983;
}

.btn.ghost {
  border-color: #dce2e9;
  background: #fff;
  color: #526071;
}

.btn.danger,
.icon-btn.danger {
  border-color: #f1c8ce;
  background: #fff5f6;
  color: #c93f50;
}

.btn.icon-only,
.btn.mini,
.head-actions .btn,
.top-actions .btn,
.modal-actions .btn,
.modal-actions a.btn {
  width: 34px;
  min-width: 34px;
  padding: 0;
}

.btn.command,
.head-actions .btn.command,
.top-actions .btn.command {
  width: auto;
  min-width: 88px;
  padding: 0 12px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-color: var(--line);
  border-radius: 6px;
  background: #fff;
  color: #425267;
  box-shadow: none;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

.icon-btn:hover {
  border-color: #b8c5d1;
  background: #f4f7f9;
  transform: translateY(-1px);
}

.panel,
.auth-panel,
.qr-modal,
.detail-modal,
.summary-modal,
.mode-card,
.summary-card,
.flow-step,
.submission-item,
.flow-item,
.record-row,
.item-card,
.ability-card,
.question-editor,
.radar-panel,
.response-table,
.question-bank-list,
.assessment-question,
.assessment-intro {
  border-color: var(--line);
  border-radius: 7px;
}

.panel {
  background: #fff;
  box-shadow: var(--shadow);
}

.panel-head {
  min-height: 56px;
  padding: 11px 15px;
  border-bottom-color: #e3e8ee;
  background: #fff;
}

.panel-head h3,
.section-title h4,
.radar-head h4,
.summary-card h4 {
  color: #1b2737;
  font-size: 15px;
  font-weight: 900;
}

.panel-head p,
.section-title p,
.radar-head p,
.summary-card p {
  color: #748093;
  font-size: 11px;
}

.setup-grid,
.work-area {
  gap: 14px;
}

.setup-grid:has(.enterprise-admin:not(.hidden)) {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 350px);
}

.setup-body,
.enterprise-body,
.side-body,
.assessment-dashboard,
.question-admin-page,
.assessment-form {
  gap: 12px;
  padding: 14px;
}

.mode-grid {
  gap: 10px;
  grid-template-columns: repeat(3, minmax(200px, 1fr));
}

.mode-card {
  position: relative;
  min-height: 108px;
  gap: 6px;
  padding: 14px;
  background: #fff;
  overflow: hidden;
}

.mode-card::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: transparent;
}

.mode-card:hover {
  border-color: #b9c7d4;
  background: #fbfcfd;
  transform: translateY(-1px);
}

.mode-card.active {
  border-color: #72b8d4;
  background: #f3fafc;
  box-shadow: inset 0 0 0 1px rgba(22, 143, 196, .16);
}

.mode-card.active::after {
  background: var(--brand);
}

.mode-card strong,
.mode-card h4 {
  color: #1d2a3a;
  font-size: 15px;
}

.mode-card span,
.mode-card em,
.mode-card p {
  color: #6d798b;
  font-size: 11px;
}

.mode-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: #10283b;
  color: #59cad4;
}

.toolbar {
  gap: 8px;
  padding: 9px 13px;
  border-bottom-color: #e5e9ee;
  background: #f8fafb;
}

.admin-main-tabs {
  gap: 4px;
  padding: 9px 13px 0;
  border-bottom: 1px solid #e6eaf0;
  background: #fff;
}

.admin-main-tabs button,
.record-tabs button,
.improvement-tabs button {
  border-radius: 6px 6px 0 0;
}

.admin-main-tabs button {
  height: 34px;
  border-color: transparent;
  background: transparent;
  color: #687588;
}

.admin-main-tabs button.active {
  border-color: #dfe5eb;
  border-bottom-color: #fff;
  background: #fff;
  color: #172033;
  box-shadow: inset 0 2px 0 var(--brand);
}

.work-area.admin-layout {
  grid-template-columns: minmax(0, 1fr) 350px;
}

.side-panel {
  top: 14px;
  max-height: calc(100vh - 28px);
}

.item-card,
.ability-card,
.question-card,
.question-editor,
.record-row {
  background: #fff !important;
}

.item-card:hover,
.question-card:hover,
.ability-card:hover,
.record-row:hover {
  border-color: #c9d3dd;
  background: #fafcfd !important;
  box-shadow: none;
}

.item-head,
.ability-card-head {
  gap: 9px;
  padding: 10px 13px 8px;
}

.item-head > b,
.ability-card-head > b,
.question-number,
.question-title b,
.detail-duty-head b {
  border-color: #dce4eb;
  border-radius: 5px;
  background: #f2f6f8;
  color: #456071;
}

.item-title,
.ability-title,
.duty-title-input {
  border-radius: 6px;
  background: #f8fafb;
}

.status,
.tag,
.ability-tags span,
.final-review-badge,
.ability-summary-status span,
.improvement-priority,
.improvement-score-pair span {
  border-radius: 5px;
}

.item-body,
.ability-card-body {
  gap: 8px;
  padding-bottom: 12px;
}

.duty-part > span,
.flow-step b,
.question-option-editor strong,
.improvement-actions-list b {
  border-radius: 5px;
}

.ability-stage-block {
  gap: 12px;
  margin: 14px;
  padding: 14px;
  border-color: #dfe6ec;
  border-radius: 7px;
  background: #f7f9fb;
}

.ability-summary-block {
  background: #fff;
}

.ability-stage-head > strong {
  border-radius: 5px;
}

.final-ability-list.wide {
  gap: 12px;
}

.final-ability-editor {
  gap: 10px;
  padding: 13px;
  background: #fff;
  box-shadow: none;
}

.final-ability-editor.review-dirty {
  border-color: #e7c16e;
  background: #fffaf0;
}

.final-ability-editor.review-confirmed {
  border-color: #98d3bd;
  background: #f5fbf8;
}

.final-ability-name {
  height: 38px;
  font-size: 14px;
}

.final-ability-definition {
  min-height: 94px;
  font-size: 13px;
}

.record-page,
.question-admin-page,
.assessment-dashboard,
.improvement-page {
  gap: 12px;
}

.record-row {
  border-radius: 5px;
}

.record-head,
.response-table th,
.radar-score-table th,
.personal-report-table th {
  background: #eef3f6;
  color: #46566a;
}

.response-table th,
.response-table td,
.radar-score-table th,
.radar-score-table td,
.personal-report-table th,
.personal-report-table td {
  padding: 8px 10px;
  border-color: #e0e6ec;
  font-size: 12px;
}

.question-status-strip,
.assessment-metrics,
.improvement-status-strip,
.improvement-metrics {
  gap: 8px;
}

.question-status-strip > div,
.assessment-metrics > div,
.improvement-metrics > div {
  padding: 11px 12px;
  border-radius: 6px;
  box-shadow: none;
}

.assessment-metrics strong,
.question-status-strip strong,
.improvement-metrics strong {
  color: #173044;
  font-size: 19px;
}

.question-bank-list .section-title,
.response-table .section-title {
  padding: 11px 13px 0;
}

.question-editor-list {
  gap: 8px;
  padding: 0 13px;
}

.question-editor {
  gap: 8px;
  padding: 10px;
}

.question-editor.dirty {
  border-color: #e4bd65;
  box-shadow: inset 3px 0 0 #d9a32d;
}

.question-editor.saved {
  border-color: #9ad3bf;
  box-shadow: inset 3px 0 0 #279476;
}

.question-option-editor {
  min-height: 52px;
  border-radius: 6px;
  background: #f8fafb;
}

.answer-options label {
  border-radius: 6px;
}

.answer-options label:has(input:checked) {
  border-color: #66a9c6;
  background: #f0f9fb;
}

.radar-panel,
.improvement-radar-panel {
  border-color: #dce4eb;
  background: #fff;
  box-shadow: none;
}

.radar-chart svg {
  max-width: 760px;
}

.radar-grid-ring {
  fill: rgba(22, 143, 196, .025);
  stroke: #ccd8e1;
}

.radar-axis {
  stroke: #d3dde5;
}

.radar-axis-label {
  fill: #526277;
  font-weight: 700;
}

.improvement-tabs {
  border-radius: 6px;
  background: #eaf0f4;
}

.improvement-tabs button {
  border-radius: 5px;
}

.improvement-tabs button.active {
  background: #fff;
  color: #164f6d;
  box-shadow: inset 0 -2px 0 var(--brand), 0 1px 3px rgba(9, 20, 35, .08);
}

.improvement-status-strip {
  border-color: #dce4eb;
  border-radius: 7px;
  background: #fff;
  box-shadow: none;
}

.improvement-weak-section,
.improvement-score-table {
  border-color: #dce4eb;
  border-radius: 7px;
  background: #fff;
}

.improvement-weak-item {
  border-color: #e0e6ec;
  border-radius: 6px;
  background: #fbfcfd;
}

.improvement-objective,
.improvement-measure {
  border-radius: 0 5px 5px 0;
}

.modal-backdrop {
  background: rgba(6, 15, 26, .62);
  backdrop-filter: blur(7px);
}

.qr-modal,
.detail-modal,
.summary-modal,
.notice-modal {
  border-color: #dce3e9;
  border-radius: 8px;
  box-shadow: var(--shadow-strong);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

@media (max-width: 1180px) {
  :root {
    --side: 220px;
  }

  .work-area.admin-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .side-panel {
    position: static;
    max-height: none;
  }
}

@media (max-width: 820px) {
  .auth-root {
    grid-template-columns: 1fr;
    gap: 28px;
    align-content: center;
    padding: 28px 18px;
  }

  .auth-root::before {
    mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .65) 45%, transparent 100%);
  }

  .auth-root::after {
    background: linear-gradient(180deg, rgba(7, 19, 33, .02), #071321 62%);
  }

  .auth-copy {
    padding-left: 16px;
  }

  .auth-emblem {
    width: 46px;
    height: 46px;
    margin-bottom: 18px;
    font-size: 13px;
  }

  .auth-copy h1 {
    font-size: 31px;
  }

  .auth-copy > p {
    margin-top: 16px;
    font-size: 13px;
  }

  .auth-points {
    margin-top: 20px;
  }

  .auth-points span {
    padding: 9px 10px;
    font-size: 9px;
  }

  .auth-panel {
    padding: 20px;
  }

  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 10px;
    border-right: 0;
    border-bottom: 1px solid #173047;
  }

  .brand {
    margin-bottom: 8px;
    padding: 0 4px 10px;
  }

  .brand p {
    display: none;
  }

  .stage-nav {
    grid-template-columns: repeat(5, minmax(124px, 1fr));
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: none;
  }

  .stage-nav::-webkit-scrollbar {
    display: none;
  }

  .stage {
    grid-template-columns: 28px minmax(0, 1fr);
    min-width: 124px;
    min-height: 48px;
    padding: 7px 8px;
  }

  .stage small {
    display: none;
  }

  .main {
    padding: 0 12px 20px;
  }

  .topbar {
    min-height: 66px;
    flex-direction: row;
    align-items: center;
    margin: 0 -12px 14px;
    padding: 11px 12px;
  }

  .top-actions {
    flex: 0 0 auto;
    margin-left: auto;
  }

  .topbar h2 {
    font-size: 18px;
  }

  .topbar p {
    max-width: calc(100vw - 74px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .setup-grid,
  .setup-grid:has(.enterprise-admin:not(.hidden)),
  .mode-grid,
  .work-area,
  .work-area.admin-layout,
  .final-ability-list.wide {
    grid-template-columns: 1fr;
  }

  .mode-grid {
    min-width: 0;
  }

  .mode-card {
    min-width: 0;
    min-height: 96px;
  }

  .panel-head,
  .ability-stage-head,
  .improvement-page-head,
  .improvement-weak-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-head .head-actions,
  .ability-stage-actions,
  .improvement-report-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .toolbar {
    align-items: stretch;
  }

  .toolbar .search,
  .toolbar .select,
  .toolbar .account-field {
    width: 100%;
    flex-basis: 100%;
  }

  .item-head,
  .ability-card-head,
  .question-option-editor,
  .record-page-summary,
  .duties-flow-footer,
  .improvement-weak-item {
    grid-template-columns: 1fr;
  }

  .item-body,
  .ability-card-body {
    padding: 0 12px 12px;
  }

  .response-table,
  .radar-score-table,
  .personal-report-table,
  .record-table {
    overflow-x: auto;
  }

  .question-option-editor label {
    width: 100%;
  }

  .question-editor-actions {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  .question-card-save {
    width: 34px;
    min-width: 34px;
    flex: 0 0 34px;
    padding: 0;
  }

  .table-actions,
  .improvement-score-pair {
    flex-wrap: wrap;
  }
}

@media (max-width: 520px) {
  .auth-copy > p,
  .auth-points {
    display: none;
  }

  .auth-panel {
    padding: 18px;
  }

  .topbar p {
    display: none;
  }

  .panel-head {
    min-height: 50px;
    padding: 10px 12px;
  }

  .setup-body,
  .enterprise-body,
  .side-body,
  .assessment-dashboard,
  .question-admin-page,
  .assessment-form,
  .record-page {
    padding: 11px;
  }
}
