* { box-sizing: border-box; }
:root {
  --bg: #eef4f5;
  --panel: #ffffff;
  --line: #d9e4e8;
  --line-soft: #eaf0f3;
  --text: #071827;
  --muted: #6b7a8c;
  --muted-2: #8b98a8;
  --brand: #00877f;
  --brand-2: #00a296;
  --brand-soft: #e6f5f3;
  --danger: #b74b42;
  --navy: #071827;
  --shadow: 0 18px 48px rgba(7, 24, 39, .10);
}
html, body {
  max-width: 100%;
  overflow-x: hidden;
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin-top: 0; }
.muted { color: var(--muted); }
label { display: block; margin-bottom: 7px; color: #374960; font-size: 13px; font-weight: 750; }
input, textarea, select {
  width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid #ccd9df;
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 135, 127, .11); }
textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
.field { margin-bottom: 12px; }

.btn {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
}
.btn:hover { background: #00766f; }
.btn.secondary { background: #e7eef2; color: #132235; border-color: #e7eef2; }
.btn.secondary:hover { background: #dce6eb; }
.btn.ghost { background: #fff; color: #2c3e52; border-color: #cfdce2; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.small { min-height: 30px; padding: 0 10px; font-size: 12px; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.linklike { border: 0; padding: 0; background: transparent; color: var(--brand); font-weight: 850; cursor: pointer; }

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 36px;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(248,251,251,.92), rgba(248,251,251,.72)),
    radial-gradient(circle at 18% 18%, rgba(0,162,150,.18), transparent 34%),
    linear-gradient(135deg, #f8fbfb 0%, #e7f0f1 48%, #dfe9eb 100%);
}
.login-shell {
  width: min(1080px, 100%);
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) 430px;
  overflow: hidden;
  border: 1px solid rgba(7,24,39,.10);
  border-radius: 16px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 32px 100px rgba(7,24,39,.16);
}
.login-hero {
  position: relative;
  padding: 44px 54px;
  background:
    linear-gradient(145deg, rgba(0,135,127,.94), rgba(7,24,39,.96)),
    var(--navy);
  color: #fff;
  overflow: hidden;
}
.login-hero::before {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -110px;
  top: -90px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 48%;
  background: rgba(255,255,255,.08);
}
.login-hero::after {
  content: "";
  position: absolute;
  inset: auto 48px 42px auto;
  width: 260px;
  height: 180px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.04));
}
.login-qr-card {
  position: relative;
  z-index: 1;
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 22px 50px rgba(0,0,0,.18);
}
.brand-qr {
  width: 88px;
  height: 88px;
  display: block;
  border-radius: 14px;
  padding: 6px;
  background: #fff;
}
.login-carousel {
  position: relative;
  z-index: 1;
  margin-top: 38px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  box-shadow: 0 24px 70px rgba(0,0,0,.20);
}
.login-track {
  display: flex;
  width: 100%;
  animation: loginCarousel 20s infinite;
  animation-timing-function: steps(1, end);
}
.login-slide {
  flex: 0 0 100%;
  padding: 16px;
}
.login-slide img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10.2;
  height: auto;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 16px 42px rgba(7,24,39,.18);
}
.login-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.login-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.44);
  animation: loginDot 20s infinite;
}
.login-dots span:nth-child(2) { animation-delay: 5s; }
.login-dots span:nth-child(3) { animation-delay: 10s; }
.login-dots span:nth-child(4) { animation-delay: 15s; }
@keyframes loginCarousel {
  0%, 20% { transform: translateX(0); }
  25%, 45% { transform: translateX(-100%); }
  50%, 70% { transform: translateX(-200%); }
  75%, 95% { transform: translateX(-300%); }
  100% { transform: translateX(0); }
}
@keyframes loginDot {
  0%, 24% { background: #fff; transform: scale(1.25); }
  25%, 100% { background: rgba(255,255,255,.44); transform: scale(1); }
}
.login-panel {
  display: grid;
  align-content: center;
  padding: 56px 46px;
  background: #fff;
}
.login-panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 28px; }
.login-panel h2 { margin: 0; font-size: 30px; }
.login-panel-head span { color: var(--brand); font-weight: 850; }
.login label { color: #33465b; }
.login input { min-height: 46px; border-radius: 6px; }
.login-submit { width: 100%; min-height: 46px; margin-top: 6px; }
.msg { min-height: 22px; margin-top: 14px; color: #b15d00; word-break: break-all; }
.captcha-row { display: grid; grid-template-columns: 1fr 132px; gap: 10px; align-items: end; }
.captcha-image { height: 46px; padding: 0; border: 1px solid #ccd9df; background: #fff; border-radius: 6px; overflow: hidden; }
.captcha-image img { display: none; width: 100%; height: 100%; object-fit: cover; }
.captcha-visual { display: grid; place-items: center; width: 100%; height: 100%; color: var(--brand); font-weight: 900; }
.captcha-visual svg { display: block; width: 100%; height: 100%; }

.app { display: none; min-height: 100vh; }
.topbar { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; background: var(--navy); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.08); position: sticky; top: 0; z-index: 8; }
.brand { font-size: 20px; font-weight: 900; line-height: 1.05; }
.topbar .muted { color: #91a1b1; font-size: 13px; }
.layout { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: calc(100vh - 64px); }
.side { background: #fff; border-right: 1px solid var(--line); padding: 16px 12px; }
.nav { display: grid; gap: 4px; position: sticky; top: 80px; }
.nav button { text-align: left; border: 0; border-radius: 4px; background: transparent; padding: 12px 14px; color: #31445a; font-weight: 750; }
.nav button:hover { background: #f3f7f8; }
.nav button.active { background: var(--brand-soft); color: #006d66; font-weight: 900; }
.main { min-width: 0; max-width: 100%; padding: 22px 34px 40px 26px; overflow-x: hidden; overflow-y: auto; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; width: 100%; max-width: 100%; margin-bottom: 14px; }
.page-head > div { min-width: 0; }
.page-head h2 { margin: 0 0 5px; font-size: 26px; letter-spacing: 0; }
.page-head .btn { flex: 0 0 auto; margin-right: 0; }
.content-head {
  align-items: center;
}
.query {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(3, minmax(140px, .8fr)) minmax(96px, 120px);
  gap: 12px;
  align-items: end;
  padding: 14px;
  margin-bottom: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  max-width: 100%;
}
.query .field { margin: 0; min-width: 0; }
.query .btn[type="submit"] { align-self: end; }
.content-create-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 14px;
}
.content-create-bar.head-create-bar {
  width: min(680px, 58vw);
  margin: 0;
}
.content-create-bar button {
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid #cfe0e8;
  border-radius: 8px;
  background: #fff;
  color: #20364d;
  text-align: left;
  cursor: pointer;
}
.content-create-bar button:hover {
  border-color: #00958d;
  background: #f1fbf9;
}
.content-create-bar strong {
  display: block;
  margin-bottom: 4px;
  font-size: 17px;
  color: #0b2638;
}
.content-create-bar span {
  color: #64748b;
  font-size: 13px;
}
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 1px 0 rgba(7,24,39,.02); }
.health-line { padding: 16px; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.card { padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.card strong { display: block; margin-top: 6px; font-size: 26px; }

.metric-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.metric-strip > div { padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.metric-strip span { display: block; color: var(--muted); font-size: 12px; }
.metric-strip strong { display: block; margin: 4px 0; font-size: 24px; }
.metric-strip small { color: var(--muted-2); }
.material-tips { display: flex; gap: 10px; align-items: center; padding: 10px 12px; margin-bottom: 12px; border: 1px solid #cfe9e6; border-radius: 6px; background: #f1fbf9; color: #35505e; }
.material-tips strong { color: var(--brand); }

.material-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 332px; gap: 14px; align-items: start; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 760px; border-collapse: separate; border-spacing: 0; background: #fff; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: middle; font-size: 13px; }
th { color: #536579; font-weight: 900; background: #f8fafb; white-space: nowrap; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: #f7fbfb; }
tbody tr.selected-row { background: #edf8f6; }
.status { display: inline-flex; align-items: center; justify-content: center; min-width: 56px; padding: 3px 8px; border-radius: 999px; background: #e6f5f3; color: #006d66; font-size: 12px; font-weight: 800; }
.actions { display: flex; flex-wrap: nowrap; gap: 6px; white-space: nowrap; }
.compact-actions {
  flex-wrap: nowrap;
  align-items: center;
}
.thumb { width: 46px; height: 46px; object-fit: cover; border: 1px solid var(--line); border-radius: 6px; background: #f8fafb; }
.thumb-btn { border: 0; background: transparent; padding: 0; color: var(--brand); font-weight: 800; }
.empty { padding: 30px; color: #7c8998; text-align: center; background: #fff; border: 1px dashed #cfdade; border-radius: 6px; }

.inspector { position: sticky; top: 82px; padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: var(--shadow); }
.inspector-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.inspector-preview { min-height: 210px; display: grid; place-items: center; border: 1px solid var(--line-soft); border-radius: 6px; background: #f8fbfb; overflow: hidden; color: var(--muted); }
.inspector-preview img { width: 100%; max-height: 300px; object-fit: contain; display: block; }
.detail-list { display: grid; grid-template-columns: 74px 1fr; gap: 8px 10px; margin: 14px 0; font-size: 13px; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; min-width: 0; word-break: break-all; }
.copy-panel { padding: 12px; margin-top: 10px; border: 1px solid var(--line-soft); border-radius: 6px; background: #fbfcfd; line-height: 1.65; }
.copy-panel.subtle { background: #fffaf0; border-color: #f2e4bf; }
.copy-panel strong { display: block; margin-bottom: 6px; }
.copy-panel p { margin: 0; white-space: pre-wrap; }
.inspector-actions { display: flex; gap: 8px; margin-top: 12px; }
.source-file-card { display: grid; gap: 6px; justify-items: center; padding: 18px; text-align: center; color: #384a5e; }
.source-file-card strong { word-break: break-all; }
.source-file-card span { color: var(--muted); font-size: 12px; }

.modal-mask { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(7,24,39,.50); z-index: 30; }
.modal-mask.open { display: flex; }
.modal { width: min(1120px, 100%); max-height: min(820px, calc(100vh - 48px)); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: #fff; border-radius: 8px; box-shadow: 0 28px 90px rgba(0,0,0,.30); overflow: hidden; }
.modal-head, .modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line-soft); }
.modal-foot { justify-content: flex-end; border-top: 1px solid var(--line-soft); border-bottom: 0; background: #fbfcfd; }
.modal-head h3 { margin: 0; font-size: 19px; }
.modal-body { padding: 18px; overflow: auto; }
.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.span-2 { grid-column: span 2; }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; min-height: 38px; align-items: center; }
.radio-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 1px solid #cfdce2; border-radius: 999px; background: #fff; color: #34465a; cursor: pointer; white-space: nowrap; }
.radio-chip input { position: absolute; opacity: 0; pointer-events: none; }
.radio-chip:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: #006d66; font-weight: 900; }
.radio-chip:has(input[value="draft"]:checked) { border-color: #3b82f6; background: #eaf2ff; color: #1d4ed8; }
.radio-chip:has(input[value="published"]:checked) { border-color: var(--brand); background: var(--brand-soft); color: #006d66; }
.radio-chip:has(input[value="unpublished"]:checked) { border-color: #df5a52; background: #fff0ee; color: #b8322b; }
.radio-chip:has(input[value="archived"]:checked) { border-color: #c8d1da; background: #eef1f4; color: #586474; }
.editor-form .rich-textarea { min-height: 260px; }
.inner { margin-top: 12px; }
.editor-section { padding: 14px; border: 1px solid var(--line-soft); border-radius: 6px; background: #fff; }
.editor-section h4 { margin: 0 0 12px; font-size: 15px; }
.material-editor { display: grid; grid-template-columns: minmax(500px, 1fr) 336px; gap: 16px; }
.editor-main { display: grid; gap: 12px; align-content: start; }
.rich-textarea.compact { min-height: 150px; }
.upload-box { position: sticky; top: 0; display: grid; gap: 12px; align-content: start; padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: #f8fbfb; }
.preview-box { width: 100%; min-height: 220px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line-soft); border-radius: 6px; overflow: hidden; color: #7c8998; }
.preview-box img { width: 100%; max-height: 340px; object-fit: contain; display: block; }
.file-picker { display: block; margin: 0; padding: 10px 12px; border: 1px solid #cfdce2; border-radius: 4px; background: #fff; color: #132235; text-align: center; cursor: pointer; font-weight: 800; }
.file-picker:hover { border-color: var(--brand); color: var(--brand); }
.file-picker input { display: none; }
.file-hint { margin: 0; color: var(--muted); word-break: break-all; }
.subtle-panel { border: 1px solid var(--line-soft); border-radius: 6px; background: #fbfcfd; padding: 12px; }
.subtle-panel summary { cursor: pointer; color: #526173; font-weight: 850; }

.preview-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.preview-title h3 { margin: 0 0 5px; }
.preview-media { border: 1px solid var(--line); border-radius: 6px; background: #f8fafb; padding: 12px; text-align: center; }
.preview-media img { max-width: 100%; max-height: 560px; object-fit: contain; }
.article-body { margin-top: 16px; line-height: 1.75; color: #1d2b3a; }
.article-body img { max-width: 100%; height: auto; }

@media (max-width: 1180px) {
  .query { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .material-workspace { grid-template-columns: 1fr; }
  .inspector { position: static; }
}
@media (max-width: 900px) {
  .login { padding: 18px; }
  .login-shell { grid-template-columns: 1fr; min-height: 0; }
  .login-hero { display: none; }
  .login-panel { padding: 34px 24px; }
  .layout { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); }
  .nav { grid-template-columns: repeat(4, 1fr); position: static; }
  .cards, .metric-strip { grid-template-columns: repeat(2, 1fr); }
  .main { padding: 16px; }
  .material-editor,
  .content-editor { grid-template-columns: 1fr; }
  .upload-box { position: static; }
}
@media (max-width: 640px) {
  .grid-form, .query { grid-template-columns: 1fr; }
  .page-head { display: grid; }
  .page-head .btn { width: 100%; }
  .span-2 { grid-column: span 1; }
  .cards, .metric-strip { grid-template-columns: 1fr; }
  .modal-mask { padding: 10px; }
}

/* Product-grade OMS shell */
.app { min-height: 100vh; max-width: 100vw; overflow-x: hidden; background: #f4f8fb; }
.topbar {
  height: 68px;
  display: grid;
  grid-template-columns: minmax(210px, 270px) minmax(280px, 1fr) max-content;
  gap: 20px;
  align-items: center;
  padding: 0 36px 0 24px;
  background:
    radial-gradient(circle at 76% -40%, rgba(14, 101, 129, .42), transparent 34%),
    linear-gradient(135deg, #082034 0%, #061827 62%, #061522 100%);
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 8px 26px rgba(6, 21, 34, .18);
}
.top-brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: #fff; }
.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, #0bb7a9, #087d76);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 12px 26px rgba(0,135,127,.26);
}
.brand-mark svg { width: 27px; height: 27px; }
.brand { font-size: 19px; letter-spacing: 0; }
.topbar .muted { margin-top: 2px; font-size: 12px; color: rgba(226,238,246,.76); }
.global-search {
  height: 40px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.68);
  min-width: 0;
  max-width: 620px;
}
.global-search input {
  min-height: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  box-shadow: none;
}
.global-search input::placeholder { color: rgba(234,244,250,.74); }
.global-search kbd {
  min-width: 42px;
  padding: 4px 7px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 6px;
  background: rgba(3,15,26,.35);
  color: rgba(255,255,255,.78);
  font-size: 12px;
  text-align: center;
}
.top-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; min-width: 0; color: #fff; white-space: nowrap; }
.env-chip {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  font-weight: 800;
}
.env-chip i { width: 8px; height: 8px; border-radius: 50%; background: #35d179; box-shadow: 0 0 0 4px rgba(53,209,121,.12); }
.env-chip b { font-weight: 900; color: rgba(255,255,255,.78); }
.top-icon {
  position: relative;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #e9f2f7;
  font-weight: 900;
  flex: 0 0 auto;
}
.top-icon:hover { background: rgba(255,255,255,.08); }
.top-icon .badge {
  position: absolute;
  right: -5px;
  top: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e64b4b;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
}
.grid-icon::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  margin: 8px auto;
  background:
    radial-gradient(circle, currentColor 2px, transparent 3px) 0 0 / 8px 8px;
}
.user-pill { display: inline-flex; align-items: center; gap: 8px; padding-left: 6px; flex: 0 0 auto; }
.user-pill i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #12b8ab, #086d78);
  font-style: normal;
  font-weight: 900;
}
.top-actions #logoutBtn {
  min-height: 32px;
  padding: 0 9px;
  border-color: rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: #d9e9f1;
}
.layout {
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: calc(100vh - 68px);
  max-width: 100vw;
}
.side {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  border-right: 1px solid #dfe8ee;
}
.nav { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 4px; }
.nav-group {
  margin: 18px 8px 8px;
  color: #8b9aad;
  font-size: 12px;
  font-weight: 800;
}
.nav button {
  position: relative;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-radius: 6px;
  color: #31445a;
}
.nav button.active {
  background: linear-gradient(90deg, #e3f7f4 0%, #eefaf8 100%);
  color: #007a73;
}
.nav button.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 99px;
  background: #00958d;
}
.nav-icon {
  width: 18px;
  display: inline-grid;
  place-items: center;
  color: inherit;
  font-weight: 900;
}
.collapse-menu {
  margin-top: auto;
  padding: 14px 8px;
  border: 0;
  border-top: 1px solid #e6eef2;
  background: transparent;
  color: #536579;
  text-align: left;
  font-weight: 800;
}
.main { padding: 24px 36px 36px 26px; background: #f4f8fb; }
.page-head.material-head { margin-bottom: 22px; }
.page-head.material-head h2 {
  margin-bottom: 4px;
  font-size: 28px;
  line-height: 1.05;
  font-weight: 950;
}
.add-btn {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 5px;
  box-shadow: 0 10px 24px rgba(0,135,127,.16);
}
.material-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 18px;
  padding: 0;
  overflow: hidden;
}
.kpi {
  min-height: 116px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 28px;
  border-right: 1px solid #e5edf1;
}
.kpi:last-child { border-right: 0; }
.kpi span { display: block; color: #607187; font-size: 13px; font-weight: 800; }
.kpi strong { display: block; margin: 5px 0 2px; font-size: 28px; line-height: 1; font-weight: 900; }
.kpi small { color: #22a06b; font-size: 12px; }
.kpi-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  font-style: normal;
  font-size: 24px;
  font-weight: 900;
}
.kpi-icon.blue { color: #1d75ff; background: #edf4ff; }
.kpi-icon.green { color: #089581; background: #e9f8f4; }
.kpi-icon.amber { color: #2f7fe8; background: #edf4ff; }
.kpi-icon.gray { color: #536579; background: #f1f4f7; }
.material-filter {
  display: grid;
  grid-template-columns: 1.25fr .78fr .78fr .78fr 1.05fr 72px 72px auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  margin-bottom: 12px;
}
.material-filter .field { margin: 0; min-width: 0; }
.material-filter label { font-size: 12px; color: #4f6074; }
.input-with-icon { position: relative; }
.input-with-icon input { padding-right: 34px; }
.input-with-icon span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: #7d8ca0; }
.date-range {
  height: 38px;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid #ccd9df;
  border-radius: 4px;
  background: #fff;
}
.date-range input { min-height: 0; height: 34px; padding: 0; border: 0; box-shadow: none; }
.date-range b { color: #5f7186; font-size: 12px; }
.filter-more {
  height: 38px;
  border: 0;
  background: transparent;
  color: #34485d;
  font-weight: 800;
}
.table-toolbar {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  margin-bottom: 12px;
}
.check-line { display: inline-flex; align-items: center; gap: 8px; margin: 0 16px 0 0; font-size: 13px; color: #66778c; }
.check-line input { width: 16px; min-height: 16px; }
.toolbar-icons { display: flex; gap: 8px; }
.toolbar-icons button {
  width: 34px;
  height: 32px;
  border: 1px solid #d8e3e9;
  border-radius: 5px;
  background: #fff;
  color: #405268;
}
.material-workspace {
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
}
.material-table-wrap { overflow-x: auto; }
.material-table {
  min-width: 860px;
  table-layout: fixed;
}
.material-table th,
.material-table td {
  padding: 12px 12px;
  border-bottom: 1px solid #e8eff3;
  font-size: 13px;
}
.material-table th:nth-child(1),
.material-table td:nth-child(1) { width: 44px; }
.material-table th:nth-child(2),
.material-table td:nth-child(2) { width: 86px; }
.material-table th:nth-child(4),
.material-table td:nth-child(4) { width: 120px; }
.material-table th:nth-child(5),
.material-table td:nth-child(5) { width: 70px; }
.material-table th:nth-child(6),
.material-table td:nth-child(6),
.material-table th:nth-child(7),
.material-table td:nth-child(7) { width: 64px; }
.material-table th:nth-child(8),
.material-table td:nth-child(8) { width: 104px; }
.material-table th:nth-child(9),
.material-table td:nth-child(9) { width: 116px; }
.material-table input[type="checkbox"] { width: 16px; min-height: 16px; }
.material-thumb {
  width: 72px;
  height: 48px;
  display: block;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #dce7ec;
  background: #f5f8fa;
}
.material-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.row-title { display: inline-block; max-width: 260px; font-size: 13px; color: #102033; }
.material-table .muted {
  display: inline-block;
  max-width: 270px;
  margin-top: 3px;
  overflow: hidden;
  color: #65778c;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-actions { display: flex; gap: 7px; white-space: nowrap; }
.row-actions .linklike { font-size: 12px; }
.content-table {
  min-width: 1120px;
  table-layout: fixed;
}
.content-table th:nth-child(1),
.content-table td:nth-child(1) { width: 52px; }
.content-table th:nth-child(2),
.content-table td:nth-child(2) { width: 92px; }
.content-table th:nth-child(4),
.content-table td:nth-child(4) { width: 120px; }
.content-table th:nth-child(5),
.content-table td:nth-child(5) { width: 96px; }
.content-table th:nth-child(6),
.content-table td:nth-child(6) { width: 82px; }
.content-table th:nth-child(7),
.content-table td:nth-child(7) { width: 66px; }
.content-table th:nth-child(8),
.content-table td:nth-child(8) { width: 128px; }
.content-table th:nth-child(9),
.content-table td:nth-child(9) { width: 230px; }
.content-thumb {
  width: 72px;
  height: 48px;
  display: block;
  border: 1px solid #dce7ec;
  border-radius: 6px;
  overflow: hidden;
  background: #f5f8fa;
}
.content-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.topic-table th:nth-child(1),
.topic-table td:nth-child(1) { width: 56px; }
.topic-table th:nth-child(2),
.topic-table td:nth-child(2) { width: 92px; }
.topic-table th:nth-child(4),
.topic-table td:nth-child(4) { width: 110px; }
.topic-table th:nth-child(5),
.topic-table td:nth-child(5) { width: 76px; }
.topic-table th:nth-child(6),
.topic-table td:nth-child(6) { width: 86px; }
.topic-table th:nth-child(7),
.topic-table td:nth-child(7) { width: 70px; }
.topic-table th:nth-child(8),
.topic-table td:nth-child(8) { width: 140px; }
.topic-table th:nth-child(9),
.topic-table td:nth-child(9) { width: 260px; }
.topic-thumb {
  width: 74px;
  height: 48px;
  display: block;
  border: 1px solid #dce7ec;
  border-radius: 6px;
  overflow: hidden;
  background: #f5f8fa;
}
.topic-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.content-table td:nth-child(3) {
  min-width: 280px;
  width: auto;
  overflow: hidden;
}
.title-cell {
  min-width: 0;
}
.title-cell strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #102033;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.content-table td:nth-child(3) .muted {
  display: block;
  max-width: 100%;
  margin-top: 3px;
  overflow: hidden;
  color: #65778c;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.danger-text { color: #e04444 !important; }
.status-draft { background: #eaf2ff; color: #1d4ed8; }
.status-published { background: #e6f5f3; color: #006d66; }
.status-unpublished { background: #fff0ee; color: #b8322b; }
.status-archived { background: #f1f3f5; color: #7b8794; }
.pager {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 12px;
  color: #526174;
}
.pager > div { display: flex; gap: 8px; margin-left: auto; }
.pager select {
  width: auto;
  min-height: 32px;
  padding: 0 30px 0 10px;
  border-radius: 4px;
  background-color: #fff;
}
.pager button {
  min-width: 34px;
  height: 32px;
  border: 1px solid #d8e3e9;
  border-radius: 4px;
  background: #fff;
  color: #34485d;
}
.pager button:disabled {
  color: #a5b0bc;
  cursor: not-allowed;
  background: #f3f6f8;
}
.pager button.active { background: #00877f; color: #fff; border-color: #00877f; }
.pager label { display: inline-flex; align-items: center; gap: 8px; margin: 0; white-space: nowrap; }
.pager input { width: 48px; min-height: 32px; text-align: center; }
.material-drawer {
  top: 88px;
  padding: 0;
  overflow: hidden;
  border-radius: 0;
  box-shadow: 0 10px 28px rgba(7,24,39,.08);
}
.drawer-head {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid #e8eff3;
}
.drawer-head strong { font-size: 18px; }
.drawer-close {
  border: 0;
  background: transparent;
  color: #6d7d90;
  font-size: 22px;
}
.drawer-preview {
  margin: 14px;
  border-radius: 5px;
  overflow: hidden;
  background: #eef4f7;
}
.drawer-preview img {
  width: 100%;
  aspect-ratio: 16 / 8.2;
  display: block;
  object-fit: cover;
}
.preview-dots { display: flex; justify-content: center; gap: 8px; margin: 8px 0 14px; }
.preview-dots i { width: 6px; height: 6px; border-radius: 50%; background: #d1dbe2; }
.preview-dots i:first-child { background: #00877f; }
.drawer-preview-btn { width: calc(100% - 28px); margin: 0 14px 14px; }
.drawer-section {
  padding: 16px 18px;
  border-top: 1px solid #e8eff3;
}
.drawer-section h4 {
  margin: 0 0 12px;
  color: #102033;
  font-size: 14px;
}
.material-drawer .detail-list {
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px 14px;
  margin: 0;
}
.material-drawer .detail-list dt { color: #627388; }
.material-drawer .detail-list dd { color: #1f3045; }
.file-list dd { display: flex; justify-content: space-between; gap: 8px; }
.file-list span { color: #66778c; white-space: nowrap; }
.drawer-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.drawer-actions .btn { width: 100%; }
.drawer-collapse {
  padding: 15px 18px;
  border-top: 1px solid #e8eff3;
}
.drawer-collapse summary {
  display: flex;
  justify-content: space-between;
  color: #25384d;
  font-weight: 850;
  cursor: pointer;
}
@media (max-width: 1100px) {
  .topbar { grid-template-columns: 230px 1fr auto; }
  .global-search { max-width: none; }
  .material-workspace { grid-template-columns: 1fr; }
  .material-drawer { position: static; }
}

/* Viewport containment: keep the OMS shell inside the visible browser width. */
body {
  width: 100%;
  min-width: 0;
}
.login {
  min-height: 100dvh;
  overflow: hidden;
}
.login-shell {
  width: min(1280px, calc(100vw - 96px));
  min-height: min(640px, calc(100dvh - 96px));
  grid-template-columns: minmax(0, 1fr) minmax(380px, 440px);
}
.login-hero {
  min-width: 0;
}
.login-carousel {
  max-width: 100%;
}
.login-panel {
  min-width: 0;
}
.app {
  width: 100vw;
}
.topbar {
  width: 100vw;
  grid-template-columns: minmax(238px, 280px) minmax(260px, 520px) max-content;
  justify-content: space-between;
  padding-right: 22px;
}
.global-search {
  width: 100%;
}
.top-actions {
  min-width: 0;
  overflow: visible;
}
.env-chip {
  max-width: 132px;
}
.top-actions #logoutBtn {
  flex: 0 0 auto;
}
.layout {
  width: 100vw;
  overflow: hidden;
}
.main {
  width: calc(100vw - 220px);
  max-width: calc(100vw - 220px);
  min-width: 0;
  padding-right: 28px;
}
.view {
  width: 100%;
  min-width: 0;
}
.cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.query {
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(132px, .75fr)) minmax(92px, 116px);
}
.table-wrap,
.material-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}
.page-head .btn {
  white-space: nowrap;
}

@media (max-width: 1500px) {
  .topbar {
    grid-template-columns: 250px minmax(220px, 440px) max-content;
    gap: 14px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .env-chip {
    max-width: 112px;
  }
  .top-icon {
    width: 30px;
    height: 30px;
  }
  .user-pill strong {
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 1280px) {
  .topbar {
    grid-template-columns: 236px minmax(220px, 1fr) auto;
  }
  .env-chip,
  .top-icon[aria-label="帮助"],
  .top-icon.grid-icon {
    display: none;
  }
  .layout {
    grid-template-columns: 196px minmax(0, 1fr);
  }
  .main {
    width: calc(100vw - 196px);
    max-width: calc(100vw - 196px);
  }
  .side {
    padding-left: 10px;
    padding-right: 10px;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .global-search {
    display: none;
  }
  .topbar {
    grid-template-columns: minmax(210px, 1fr) auto;
  }
  .cards {
    grid-template-columns: 1fr;
  }
}

/* Login page final fit: fluid by viewport, never clipped by the browser edge. */
.login {
  padding: clamp(16px, 4vh, 48px) clamp(16px, 4vw, 56px);
  place-items: center;
  align-items: center;
}
.login-shell {
  width: min(1180px, 100%);
  min-height: 0;
  height: auto;
  max-height: none;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 400px);
}
.login-hero {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(16px, 3vh, 28px);
  padding: clamp(24px, 4vw, 42px);
}
.login-qr-card {
  width: clamp(76px, 8vw, 96px);
  height: clamp(76px, 8vw, 96px);
}
.brand-qr {
  width: calc(100% - 16px);
  height: calc(100% - 16px);
}
.login-carousel {
  align-self: center;
  margin-top: 0;
  max-height: min(420px, 48vh);
}
.login-slide {
  padding: 14px;
}
.login-slide img {
  aspect-ratio: 16 / 9;
  max-height: min(390px, 44vh);
}
.login-panel {
  padding: clamp(28px, 4vw, 46px) clamp(24px, 3.4vw, 40px);
}
.login-panel h2 {
  font-size: 28px;
}
.captcha-row {
  grid-template-columns: minmax(0, 1fr) 128px;
}

@media (max-height: 760px) and (min-width: 901px) {
  .login-carousel {
    max-height: 340px;
  }
  .login-slide img {
    max-height: 312px;
  }
  .login-panel {
    padding-top: 28px;
    padding-bottom: 28px;
  }
}

@media (max-width: 900px) {
  .login-shell {
    width: min(460px, calc(100vw - 32px));
    grid-template-columns: 1fr;
    max-height: none;
  }
  .login-hero {
    display: none;
  }
}

/* Final responsive containment. Do not size app columns with 100vw/calc;
   let CSS grid assign the remaining space so zoom and scrollbars cannot
   push content under the browser edge. */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
.app,
.topbar,
.layout {
  width: 100%;
  max-width: 100%;
}
.topbar {
  grid-template-columns: minmax(220px, 280px) minmax(220px, 520px) max-content;
}
.layout {
  grid-template-columns: 220px minmax(0, 1fr);
  overflow: hidden;
}
.side {
  min-width: 0;
}
.main {
  width: auto;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}
.view,
.panel,
.cards,
.query,
.material-kpis,
.material-filter,
.material-workspace {
  max-width: 100%;
  min-width: 0;
}
.cards {
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
}
.card {
  min-width: 0;
}
.query {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.query .btn[type="submit"] {
  min-width: 110px;
}
.material-kpis {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.material-filter {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.material-workspace {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
}

@media (max-width: 1280px) {
  .layout {
    grid-template-columns: 196px minmax(0, 1fr);
  }
  .main {
    width: auto;
    max-width: 100%;
  }
}

@media (max-width: 1100px) {
  .topbar {
    grid-template-columns: minmax(210px, 1fr) max-content;
  }
  .global-search {
    display: none;
  }
  .material-workspace {
    grid-template-columns: 1fr;
  }
}

/* Operation modals: grouped, readable, and action-oriented. */
.modal-mask {
  background: rgba(7, 24, 39, .46);
  backdrop-filter: blur(3px);
}
.modal {
  width: min(1480px, calc(100vw - 56px));
  max-height: min(90vh, 900px);
  border-radius: 12px;
  border: 1px solid rgba(216, 227, 233, .96);
  box-shadow: 0 34px 110px rgba(7, 24, 39, .30);
}
.modal:has(.topic-editor) {
  width: min(1220px, calc(100vw - 96px));
}
.modal-preview {
  width: min(900px, calc(100vw - 48px));
}
.modal-head {
  min-height: 62px;
  padding: 12px 22px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfe 100%);
}
.modal-eyebrow {
  margin: 0 0 2px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
}
.modal-head h3 {
  font-size: 21px;
  line-height: 1.2;
}
.modal-x {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: #eef4f7;
  color: #26384b;
  font-size: 24px;
  font-weight: 800;
}
.modal-x:hover {
  background: #e2ecf1;
}
.modal-body {
  padding: 14px 18px 18px;
  background: #f5f8fa;
}
.modal:has(.task-editor) .modal-body {
  overflow: hidden;
}
.modal-foot {
  position: sticky;
  bottom: 0;
  padding: 12px 22px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(6px);
}
.modal-foot .btn {
  min-width: 92px;
}
.ops-form {
  display: grid;
  gap: 10px;
}
.ops-section {
  padding: 14px;
  border: 1px solid #dce7ec;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(7, 24, 39, .03);
}
.ops-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #edf2f5;
}
.ops-section-head strong {
  font-size: 15px;
}
.ops-section-head span {
  color: #7a899b;
  font-size: 12px;
}
.ops-section .inner {
  margin-top: 0;
}
.content-basic-grid {
  gap: 10px 16px;
}
.content-basic-grid .field {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
}
.content-basic-grid .field label {
  margin: 0;
  white-space: nowrap;
}
.content-basic-grid .span-2 {
  grid-column: 1 / -1;
}
.content-basic-grid .radio-row {
  min-height: 34px;
}
.content-basic-grid input,
.content-basic-grid select {
  min-height: 36px;
}
.ops-section input,
.ops-section textarea,
.ops-section select,
.upload-box input,
.upload-box textarea,
.upload-box select {
  border-radius: 7px;
  background: #fbfdfe;
}
.ops-section textarea {
  min-height: 118px;
}
.ops-details summary {
  cursor: pointer;
  color: #26384b;
  font-weight: 900;
}
.publish-settings {
  padding-bottom: 10px;
}
.publish-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 12px;
}
.publish-grid .field {
  margin-bottom: 0;
}
.publish-grid label {
  margin-bottom: 6px;
}
.tag-field input {
  margin-bottom: 8px;
}
.tag-choice-host {
  max-height: 108px;
  overflow: auto;
}
.advanced-settings {
  margin-top: 10px;
  border-top: 1px solid #edf2f5;
}
.advanced-settings summary {
  width: fit-content;
  margin-top: 8px;
  cursor: pointer;
  color: #566a80;
  font-size: 13px;
  font-weight: 850;
}
.advanced-settings summary:hover {
  color: #007d76;
}
.advanced-settings .inner {
  margin-top: 10px;
}
.material-editor {
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
}
.content-editor {
  display: grid;
  grid-template-columns: minmax(760px, 1fr) 390px;
  gap: 14px;
  align-items: start;
}
.content-editor.article-content-editor {
  grid-template-columns: minmax(0, 7fr) minmax(300px, 3fr);
}
.content-editor.visual-content-editor {
  grid-template-columns: minmax(0, 7fr) minmax(300px, 3fr);
}
.task-editor .editor-main,
.task-editor .side-settings {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 0;
}
.task-editor {
  height: min(720px, calc(90vh - 154px));
  min-height: 0;
}
.task-editor .editor-main,
.task-editor .body-section,
.task-editor .rich-editor-shell {
  height: 100%;
}
.task-editor .body-section {
  min-height: 0;
}
.task-editor .side-settings {
  position: static;
  max-height: none;
  overflow: visible;
}
.article-content-editor .side-settings {
  height: 100%;
  min-height: 0;
  overflow: auto;
  padding-right: 6px;
}
.article-content-editor .side-settings::-webkit-scrollbar {
  width: 8px;
}
.article-content-editor .side-settings::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #c8d6dd;
}
.title-section .field,
.title-inline {
  margin-bottom: 0;
}
.title-inline {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px 14px 0;
}
.title-inline label {
  margin: 0;
}
.title-inline input {
  min-height: 42px;
  border: 0;
  border-bottom: 1px solid #dce7ec;
  border-radius: 0;
  background: transparent;
  font-size: 20px;
  font-weight: 850;
}
.sticky-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
}
.task-editor .rich-editor-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
}
.visual-content-editor .rich-editor-shell {
  grid-template-rows: auto minmax(0, 1fr);
}
.rich-editor.ql-container {
  min-height: 0;
  height: auto;
  overflow: auto;
  border: 0;
  font-size: 16px;
}
.rich-editor .ql-editor {
  min-height: 100%;
  padding: 18px;
  line-height: 1.85;
}
.article-editor .ql-editor {
  font-size: 17px;
}
.visual-editor .ql-editor {
  font-size: 16px;
}
.publish-stack {
  display: grid;
  gap: 12px;
}
.publish-stack .field {
  margin-bottom: 0;
}
.inline-field {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.inline-field label {
  margin: 0;
}
.choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.choice-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid #cfe0e8;
  border-radius: 999px;
  background: #fff;
  color: #35506a;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}
.choice-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.choice-chip:has(input:checked),
.choice-chip.active {
  border-color: #00958d;
  background: #e8f8f6;
  color: #007d76;
}
.upload-box {
  padding: 14px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(7, 24, 39, .03);
}
.content-editor .upload-box,
.content-editor .cover-upload-box {
  position: static;
  top: auto;
}
.upload-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.upload-title strong {
  font-size: 15px;
  color: #102033;
}
.upload-title span {
  color: #7a899b;
  font-size: 12px;
}
.preview-box {
  min-height: 180px;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fbfc 0%, #eef5f7 100%);
}
.cover-preview {
  aspect-ratio: 16 / 10;
  min-height: 0;
}
.file-picker {
  border-radius: 8px;
}
.ops-preview {
  padding: 18px;
  border: 1px solid #dce7ec;
  border-radius: 12px;
  background: #fff;
}
.preview-hero {
  margin-bottom: 16px;
  padding: 18px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ecf8f6 0%, #f8fbfd 100%);
}
.preview-hero h3 {
  margin: 10px 0 6px;
  font-size: 24px;
}
.preview-hero p {
  margin: 0;
  color: #65778c;
}
.type-guide { display: none; }
.type-guide strong {
  display: block;
  color: #00756f;
  font-size: 14px;
}
.type-guide p {
  margin: 5px 0 0;
  color: #5f7185;
  font-size: 13px;
}
.rich-editor-shell {
  border: 1px solid #d5e3ea;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 8px;
  border-bottom: 1px solid #e7eef2;
  background: #fbfdfe;
}
.rich-toolbar.ql-toolbar.ql-snow {
  border: 0;
  border-bottom: 1px solid #e7eef2;
}
.rich-toolbar .ql-formats {
  margin-right: 4px;
}
.rich-toolbar select {
  min-height: 30px;
  background: #fff;
}
.rich-toolbar button,
.rich-upload,
.rich-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid #cfe0e8;
  border-radius: 8px;
  background: #fff;
  color: #23364b;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.rich-toolbar.ql-toolbar.ql-snow .rich-upload-button {
  width: auto;
  min-width: 58px;
  padding: 0 12px;
  line-height: 1;
}
.rich-toolbar.ql-toolbar.ql-snow button.rich-upload-button::before,
.rich-toolbar.ql-toolbar.ql-snow button.rich-upload-button::after {
  content: none;
}
.rich-upload {
  color: #007d76;
  border-color: #b9e4de;
  background: #f1fbf9;
}
.rich-upload input {
  display: none;
}
.rich-status {
  color: #7a899b;
  font-size: 12px;
}
.material-picker-panel {
  padding: 12px;
  border-bottom: 1px solid #e7eef2;
  background: #f7fbfb;
}
.material-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.material-picker-head strong {
  font-size: 14px;
}
.material-picker-head button {
  border: 0;
  background: transparent;
  color: #007d76;
  font-weight: 850;
}
.material-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
  max-height: 250px;
  overflow: auto;
}
.material-picker-card {
  min-width: 0;
  padding: 8px;
  border: 1px solid #d4e2e8;
  border-radius: 8px;
  background: #fff;
  text-align: left;
}
.material-picker-card span {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 7px;
  background: #edf4f6;
  color: #567;
}
.material-picker-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.material-picker-card strong,
.material-picker-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.material-picker-card strong {
  margin-top: 7px;
  color: #102033;
}
.material-picker-card small,
.material-picker-state {
  color: #718196;
}
.rich-editor {
  min-height: 220px;
  padding: 14px;
  line-height: 1.8;
  color: #1b2d42;
  outline: none;
}
.rich-editor.ql-container {
  padding: 0;
}
.rich-editor:empty::before {
  content: attr(data-placeholder);
  color: #99a7b7;
}
.rich-editor h2,
.rich-render h2,
.article-body h2 {
  margin: 16px 0 10px;
  font-size: 20px;
}
.rich-editor blockquote,
.rich-render blockquote,
.article-body blockquote {
  margin: 12px 0;
  padding: 10px 12px;
  border-left: 4px solid #00958d;
  background: #f3fbfa;
  color: #4a5c70;
}
.rich-editor figure,
.rich-render figure,
.article-body figure {
  margin: 14px 0;
}
.rich-editor img,
.rich-render img,
.article-body img,
.rich-editor video,
.rich-render video,
.article-body video {
  max-width: 100%;
  border-radius: 10px;
  background: #eef5f7;
}
.rich-editor video,
.rich-render video,
.article-body video {
  width: 100%;
}
.rich-editor figcaption,
.rich-render figcaption,
.article-body figcaption {
  margin-top: 6px;
  color: #7a899b;
  font-size: 12px;
  text-align: center;
}
.rich-editor a,
.rich-render a,
.article-body a {
  color: #007d76;
  font-weight: 800;
}
.tag-picker {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.tag-picker::-webkit-scrollbar {
  display: none;
}
.tag-chip {
  flex: 0 0 auto;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid #cfe0e8;
  border-radius: 999px;
  background: #fff;
  color: #35506a;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.tag-chip.active {
  border-color: #00958d;
  background: #e8f8f6;
  color: #007d76;
}
.content-preview-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 14px 0 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #edf2f5;
}
.content-preview-meta span {
  color: #7a899b;
  font-size: 12px;
}
.visual-preview-hero {
  display: grid;
  grid-template-columns: 220px 1fr;
  align-items: center;
  gap: 18px;
}
.visual-preview-hero img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  background: #edf5f7;
}
.preview-hero small {
  display: block;
  margin-top: 8px;
  color: #65778c;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }
  .content-head {
    display: grid;
  }
  .content-create-bar.head-create-bar {
    width: 100%;
  }
  .content-create-bar {
    grid-template-columns: 1fr;
  }
  .content-editor,
  .material-editor,
  .grid-form {
    grid-template-columns: 1fr;
  }
  .span-2 {
    grid-column: span 1;
  }
  .content-basic-grid .field {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .content-basic-grid .span-2 {
    grid-column: span 1;
  }
  .publish-grid {
    grid-template-columns: 1fr;
  }
  .ops-section-head {
    display: block;
  }
  .ops-section-head span {
    display: block;
    margin-top: 4px;
  }
}

/* Fluid shell hardening: keep every primary screen within the viewport. */
body {
  min-width: 0;
}
[hidden] {
  display: none !important;
}
.login {
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
}
.login-shell {
  width: min(1180px, 100%);
  max-width: calc(100vw - clamp(24px, 6vw, 112px));
  grid-template-columns: minmax(0, 1fr) minmax(340px, 400px);
}
.login-panel,
.login-hero,
.login-carousel,
.login-track,
.login-slide {
  min-width: 0;
}
.login-slide img {
  max-width: 100%;
}
.app {
  min-width: 0;
}
.topbar {
  min-width: 0;
  grid-template-columns: minmax(210px, 280px) minmax(0, 520px) minmax(0, auto);
}
.top-brand,
.global-search,
.top-actions {
  min-width: 0;
}
.top-actions {
  overflow: hidden;
}
.layout {
  min-width: 0;
}
.main {
  box-sizing: border-box;
}
.page-head,
.query,
.cards,
.metric-strip,
.material-kpis,
.material-filter,
.material-workspace,
.panel,
.health-line {
  width: 100%;
  max-width: 100%;
}
.cards {
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}
.metric-strip {
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}
.card,
.kpi,
.panel {
  min-width: 0;
}

@media (max-width: 1440px) {
  .topbar {
    grid-template-columns: minmax(200px, 260px) minmax(0, 440px) auto;
  }
  .top-actions .env-chip,
  .top-actions .top-icon,
  .user-pill {
    display: none;
  }
}

@media (max-width: 980px) {
  .login-shell {
    max-width: calc(100vw - 32px);
    grid-template-columns: 1fr;
  }
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .layout {
    grid-template-columns: 1fr;
  }
  .side {
    display: none;
  }
}

/* OMS usability pass: compact sidebar, useful dashboard, clickable top actions. */
.side {
  padding-top: 10px !important;
  padding-bottom: 14px;
}
.nav {
  top: 78px !important;
}
.nav-group {
  margin-top: 12px !important;
}
.collapse-menu {
  min-height: 42px;
  border-radius: 8px;
}
.collapse-menu:hover {
  background: #f0f6f8;
  color: var(--brand);
}
body.sidebar-collapsed .layout {
  grid-template-columns: 68px minmax(0, 1fr) !important;
}
body.sidebar-collapsed .side {
  padding-left: 8px;
  padding-right: 8px;
}
body.sidebar-collapsed .nav button {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}
body.sidebar-collapsed .nav button:not(.active) {
  width: 44px;
}
body.sidebar-collapsed .nav button span + text,
body.sidebar-collapsed .nav button {
  font-size: 0;
}
body.sidebar-collapsed .nav-icon {
  font-size: 15px;
}
body.sidebar-collapsed .nav-group {
  height: 1px;
  margin: 10px 8px;
  overflow: hidden;
  color: transparent;
  background: #edf3f6;
}
body.sidebar-collapsed .collapse-menu {
  text-align: center;
  font-size: 12px;
}

.env-chip {
  border: 0;
  color: #fff;
}
.top-icon:focus-visible,
.env-chip:focus-visible {
  outline: 2px solid #69d8d0;
  outline-offset: 2px;
}
.top-panel {
  position: fixed;
  z-index: 40;
  padding: 10px;
  border: 1px solid rgba(207, 220, 226, .9);
  border-radius: 12px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 22px 60px rgba(7, 24, 39, .22);
  color: var(--text);
}
.top-panel[hidden] {
  display: none !important;
}
.top-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 8px 10px;
  border-bottom: 1px solid #edf2f5;
}
.top-panel-head strong {
  font-size: 15px;
}
.top-panel-head span {
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
}
.top-panel-list {
  display: grid;
  gap: 6px;
  padding-top: 8px;
}
.top-panel-list button,
.app-grid button {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #1d2f43;
  text-align: left;
}
.top-panel-list button {
  padding: 10px;
}
.top-panel-list button:hover,
.app-grid button:hover {
  background: #eef8f6;
}
.top-panel-list b,
.app-grid b {
  font-size: 13px;
}
.top-panel-list span,
.app-grid span,
.help-steps p {
  margin: 0;
  color: #6d7d90;
  font-size: 12px;
  line-height: 1.55;
}
.app-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 10px;
}
.app-grid button {
  padding: 12px;
  border: 1px solid #e4edf1;
}
.app-grid i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e6f5f3;
  color: var(--brand);
  font-style: normal;
  font-weight: 900;
}
.help-steps {
  display: grid;
  gap: 8px;
  padding: 12px 8px 4px;
}

.workbench-head {
  align-items: center;
}
.head-actions {
  display: flex;
  gap: 10px;
}
.workbench-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.metric-card {
  min-height: 118px;
  border: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
}
.metric-card:hover {
  border-color: #b8dcd7;
  box-shadow: 0 14px 34px rgba(7, 24, 39, .08);
}
.metric-card small {
  display: block;
  margin-top: 4px;
  color: #66778c;
}
.metric-card.warn strong {
  color: #b15d00;
}
.workbench-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 14px;
  margin-top: 14px;
}
.workbench-panel {
  padding: 16px;
}
.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.section-title h3 {
  margin: 0 0 4px;
  font-size: 17px;
}
.section-title p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.task-list,
.quick-grid,
.compact-list {
  display: grid;
  gap: 8px;
}
.task-list button,
.quick-grid button,
.compact-list button {
  border: 1px solid #e2ebf0;
  border-radius: 9px;
  background: #fff;
  color: #132235;
  text-align: left;
}
.task-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  padding: 12px;
}
.task-list b,
.task-list span {
  min-width: 0;
}
.task-list span {
  grid-column: 1;
  color: var(--muted);
  font-size: 12px;
}
.task-list i {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-style: normal;
  font-weight: 900;
}
.quick-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.quick-grid button {
  padding: 14px;
}
.quick-grid span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}
.compact-list button {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}
.compact-list span {
  color: var(--muted);
  font-size: 12px;
}
.material-compact button {
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
}
.material-compact img {
  grid-row: span 2;
  width: 54px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #dce7ec;
}
.system-strip {
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: space-between;
  margin-top: 14px;
  padding: 14px 16px;
}
.system-strip div {
  display: grid;
  gap: 3px;
}
.system-strip span {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1280px) {
  .workbench-cards,
  .workbench-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .head-actions,
  .system-strip {
    display: grid;
    width: 100%;
  }
  .workbench-cards,
  .workbench-grid,
  .quick-grid {
    grid-template-columns: 1fr;
  }
}

/* Full-width work area: use every pixel to the right of the sidebar. */
.layout {
  grid-template-columns: 220px minmax(0, 1fr) !important;
}
.main {
  width: 100% !important;
  max-width: none !important;
  padding: 28px 28px 40px 28px;
}
.view {
  width: 100%;
  max-width: none;
}
.page-head,
.query,
.material-filter,
.material-kpis,
.table-toolbar,
.material-workspace,
.panel {
  width: 100%;
  max-width: none;
}
.material-workspace {
  grid-template-columns: minmax(0, 1fr) clamp(360px, 25vw, 460px);
}
.material-table {
  min-width: 1000px;
}

@media (min-width: 1600px) {
  .material-filter {
    grid-template-columns: 1.25fr .78fr .78fr .78fr 1.05fr 84px 84px 82px;
  }
  .material-table {
    min-width: 1120px;
  }
  .row-title {
    max-width: 360px;
  }
  .material-table .muted {
    max-width: 380px;
  }
}

@media (max-width: 1280px) {
  .layout {
    grid-template-columns: 196px minmax(0, 1fr) !important;
  }
  .main {
    padding: 24px 22px 36px;
  }
}

@media (max-width: 1100px) {
  .material-workspace {
    grid-template-columns: 1fr;
  }
}

/* Screen-fit final pass: no viewport-width math, no document-level overflow. */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
body {
  min-width: 0;
}
.login {
  width: 100%;
  min-width: 0;
  padding: clamp(16px, 3vw, 40px);
  overflow-x: hidden;
}
.login-shell {
  width: min(1180px, 100%) !important;
  max-width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px) !important;
}
.login-hero,
.login-panel,
.login-carousel,
.login-track,
.login-slide {
  min-width: 0 !important;
  max-width: 100%;
}
.login-slide img {
  max-width: 100%;
}
.captcha-row {
  grid-template-columns: minmax(0, 1fr) minmax(112px, 128px);
}
.app,
.topbar,
.layout {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}
.topbar {
  grid-template-columns: minmax(200px, 280px) minmax(0, 520px) max-content !important;
}
.layout {
  grid-template-columns: 220px minmax(0, 1fr) !important;
  overflow: hidden;
}
.main {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: hidden;
  padding: 28px;
}
.view,
.page-head,
.query,
.cards,
.metric-strip,
.material-kpis,
.material-filter,
.table-toolbar,
.material-workspace,
.panel,
.health-line {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.material-workspace {
  grid-template-columns: minmax(0, 1fr) minmax(320px, clamp(340px, 24%, 430px));
}
.table-wrap,
.material-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}
.material-table {
  width: 100%;
  min-width: min(1000px, 100%);
}
.loading-panel {
  display: grid;
  min-height: 180px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}

.topic-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
}
.topic-editor-main,
.topic-cover-panel {
  display: grid;
  align-content: start;
  gap: 10px;
}
.topic-editor-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.topic-editor {
  padding: 12px;
}
.topic-editor .ops-section-head {
  margin-bottom: 8px;
  padding-bottom: 7px;
}
.topic-editor .field {
  margin-bottom: 0;
}
.topic-editor label {
  margin-bottom: 5px;
}
.topic-editor input,
.topic-editor select {
  min-height: 34px;
  padding: 6px 10px;
}
.topic-editor textarea {
  min-height: 82px;
  padding: 8px 10px;
  line-height: 1.45;
}
.topic-editor .radio-row {
  min-height: 34px;
  align-items: center;
}
.topic-editor .radio-chip span {
  min-height: 34px;
  padding: 0 12px;
}
.topic-cover-panel {
  padding: 10px;
  border: 1px solid #dce7ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(7, 24, 39, .03);
}
.topic-cover-preview {
  overflow: hidden;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  min-height: 0;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 800;
}
.topic-cover-panel .upload-title strong {
  font-size: 14px;
}
.topic-cover-panel .upload-title span {
  max-width: 180px;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topic-cover-panel .file-picker {
  min-height: 34px;
  padding: 7px 10px;
}
.topic-cover-panel .file-hint {
  margin: -2px 0 0;
  font-size: 12px;
}
.topic-cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.topic-cover-url-details {
  margin-top: 2px;
}
.topic-cover-url-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.topic-cover-url-details textarea {
  min-height: 84px;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.45;
}
.topic-workbench {
  display: grid;
  gap: 14px;
}
.topic-workbench-head,
.topic-panel-head,
.topic-list-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.topic-workbench-head h3,
.topic-workbench-head p {
  margin: 0;
}
.topic-workbench-head h3 {
  font-size: 18px;
}
.topic-workbench-head p,
.topic-panel-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.topic-workbench-grid {
  display: grid;
  grid-template-columns: minmax(360px, 42%) minmax(0, 1fr);
  gap: 14px;
  min-height: 520px;
}
.topic-workbench-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #dce7ec;
  border-radius: 10px;
  background: #fff;
}
.topic-selected-panel {
  grid-template-rows: auto minmax(0, 1fr);
}
.topic-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.topic-candidate-list,
.topic-selected-list {
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: auto;
  min-height: 0;
  padding-right: 2px;
}
.topic-candidate-row,
.topic-content-row {
  display: grid;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #dce7ec;
  border-radius: 8px;
  background: #fff;
}
.topic-candidate-row {
  grid-template-columns: 22px 64px minmax(0, 1fr) auto;
  cursor: pointer;
}
.topic-content-row {
  grid-template-columns: 22px 72px minmax(0, 1fr) 86px auto;
}
.topic-candidate-row:hover,
.topic-content-row:hover {
  border-color: #b8d3dc;
  background: #fbfdfe;
}
.topic-candidate-row img,
.topic-content-row img {
  width: 100%;
  height: 50px;
  border-radius: 6px;
  object-fit: cover;
  background: #eef4f7;
}
.topic-candidate-row strong,
.topic-content-row strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topic-candidate-row small,
.topic-content-row span {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topic-content-row input[type="number"] {
  width: 86px;
}
.topic-empty {
  display: grid;
  min-height: 120px;
  place-items: center;
  border: 1px dashed #c8d8df;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 800;
  background: #f8fbfc;
}

@media (max-width: 1440px) {
  .topbar {
    grid-template-columns: minmax(200px, 260px) minmax(0, 420px) max-content !important;
  }
}

@media (max-width: 1280px) {
  .layout {
    grid-template-columns: 196px minmax(0, 1fr) !important;
  }
  .main {
    padding: 24px 22px 36px;
  }
  .material-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  .topic-editor-layout,
  .topic-workbench-grid {
    grid-template-columns: 1fr;
  }
  .topic-workbench-grid {
    min-height: 0;
  }
}

@media (max-width: 980px) {
  .login-shell {
    grid-template-columns: 1fr !important;
  }
  .login-hero {
    display: none;
  }
  .topbar {
    grid-template-columns: minmax(0, 1fr) max-content !important;
  }
  .global-search,
  .top-actions .env-chip,
  .top-actions .top-icon,
  .user-pill {
    display: none;
  }
  .layout {
    grid-template-columns: 1fr !important;
  }
  .side {
    display: none;
  }
  .main {
    padding: 18px;
  }
  .topic-editor-row,
  .topic-candidate-row,
  .topic-content-row {
    grid-template-columns: 1fr;
  }
  .topic-candidate-row img,
  .topic-content-row img {
    width: 100%;
    height: 120px;
  }
}
