:root {
  --bg: #f3f6fb;
  --ink: #101828;
  --muted: #667085;
  --line: rgba(15, 23, 42, 0.08);
  --blue: #075fae;
  --deep: #07366f;
  --gold: #c69a42;
  --card: rgba(255, 255, 255, 0.86);
  --shadow: 0 24px 70px rgba(7, 54, 111, 0.10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(198, 154, 66, 0.18), transparent 24%),
    radial-gradient(circle at 84% 6%, rgba(7, 95, 174, 0.14), transparent 22%),
    var(--bg);
  font-family: "SF Pro Display", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
}

button, input, textarea, select {
  font: inherit;
}

button {
  height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #eef3f9;
  color: var(--deep);
  font-weight: 800;
  cursor: pointer;
}

.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--deep));
  box-shadow: 0 14px 34px rgba(7, 95, 174, 0.20);
}

.ghost {
  background: #fff;
  color: var(--deep);
  border: 1px solid var(--line);
}

button.danger,
.danger {
  background: rgba(185, 28, 28, 0.08);
  color: #9f1d1d;
  border: 1px solid rgba(185, 28, 28, 0.14);
  box-shadow: none;
}

.admin-only {
  display: none !important;
}

body.can-manage-ops-admins .admin-only {
  display: inline-flex !important;
}

body.can-manage-ops-admins .ops-card.admin-only {
  display: grid !important;
}

body.can-manage-ops-admins .endpoint-card.admin-only {
  display: grid !important;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  background: rgba(255, 255, 255, 0.72);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.brand img {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  object-fit: cover;
}

.brand strong { display: block; font-size: 18px; }
.brand span { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }

.nav {
  margin-top: 26px;
  display: grid;
  gap: 8px;
}

.nav button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  height: 46px;
  padding: 0 16px;
  background: transparent;
  color: var(--muted);
}

.nav button.active {
  background: linear-gradient(135deg, rgba(7, 95, 174, 0.10), rgba(198, 154, 66, 0.12));
  color: var(--deep);
}

.sidebar-foot {
  margin-top: auto;
  padding: 18px;
  border-radius: 22px;
  background: #f8fafc;
  color: var(--muted);
}

.sidebar-foot strong {
  display: block;
  margin-top: 6px;
  color: var(--deep);
}

.workspace {
  padding: 30px;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.topbar h1 {
  margin: 4px 0 0;
  font-size: 38px;
  letter-spacing: -1px;
}

.kicker, .eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.top-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-actions button {
  white-space: nowrap;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.hero-panel {
  margin: 24px 0;
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 22px;
  align-items: center;
}

.hero-panel h2,
.panel h2,
.panel h3 {
  margin: 8px 0 8px;
}

.hero-panel p,
.hint {
  color: var(--muted);
  line-height: 1.7;
}

.endpoint-card {
  padding: 18px;
  border-radius: 24px;
  background: #fff;
  display: grid;
  gap: 10px;
}

input, textarea, select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

textarea {
  min-height: 104px;
  padding: 12px 14px;
  resize: vertical;
}

.code {
  min-height: 220px;
  font-family: "SF Mono", Consolas, monospace;
}

.module { display: none; }
.module.active { display: block; }

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.metric {
  padding: 22px;
  border-radius: 26px;
  background: #fff;
  border: 1px solid var(--line);
}

.metric span {
  display: block;
  color: var(--muted);
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
  color: var(--deep);
}

.grid {
  display: grid;
  gap: 20px;
}

.grid.two {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr);
  align-items: start;
}

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

.panel:not(.hero-panel) {
  padding: 22px;
}

.form-card {
  display: grid;
  gap: 14px;
}

.inline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.product-list,
.list,
.table {
  display: grid;
  gap: 12px;
}

.product-card,
.row {
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line);
}

.product-card {
  cursor: pointer;
}

.product-card.active {
  border-color: rgba(7, 95, 174, 0.36);
  box-shadow: 0 16px 32px rgba(7, 95, 174, 0.10);
}

.product-card h3,
.row h3 {
  margin: 0 0 8px;
}

.product-card-main {
  min-width: 0;
}

.product-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.product-card-actions button {
  height: 32px;
  min-width: 64px;
  padding: 0 12px;
  font-size: 13px;
}

.muted {
  color: var(--muted);
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(198, 154, 66, 0.14);
  color: #95680f;
  font-size: 12px;
  font-weight: 800;
}

.policy-preview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.policy-preview span,
.checklist span {
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  color: var(--muted);
}

.watermark-panel label,
.form-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.watermark-panel .wm-control-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.watermark-panel .wm-control-row input[type="range"] {
  flex: 1;
  min-width: 220px;
}

.watermark-panel .wm-number-input {
  width: 96px;
}

.watermark-panel .wm-color-input {
  width: 54px;
  min-height: 42px;
  padding: 4px;
}

.watermark-panel .wm-color-text {
  width: 150px;
  text-transform: uppercase;
}

.bridge-flow {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.bridge-flow span {
  padding: 16px 18px;
  border-radius: 999px;
  background: #fff;
  font-weight: 900;
  color: var(--deep);
}

.bridge-flow b {
  width: 42px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--blue));
}

.bridge-metrics {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.bridge-metric,
.compact-panel {
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(7, 95, 174, 0.08);
}

.bridge-metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.bridge-metric strong {
  display: block;
  margin-top: 6px;
  color: var(--deep);
  font-size: 24px;
}

.bridge-admin-grid {
  margin-top: 16px;
}

.compact-panel h3 {
  margin: 6px 0 12px;
}

.compact-table .row {
  box-shadow: none;
}

.compact-table .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.compact-table .row-actions button {
  width: auto;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(8, 67, 128, .12);
  background: rgba(239, 247, 255, .92);
  color: #0a4f92;
  font-size: 13px;
  font-weight: 800;
  box-shadow: none;
}

.fulfillment-panel {
  display: grid;
  gap: 16px;
}

.fulfillment-metrics {
  margin-top: 0;
}

.fulfillment-all-panel {
  margin-top: 0;
}

.fulfillment-table .row {
  display: grid;
  gap: 8px;
}

.fulfillment-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.fulfillment-row-head h3 {
  margin: 0;
}

.tag.light {
  color: #0a4f92;
  background: rgba(232, 242, 255, .92);
}

.checklist {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.toast {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 220;
  max-width: min(420px, calc(100vw - 48px));
  padding: 14px 18px;
  border-radius: 18px;
  background: #101828;
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition: 180ms ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    radial-gradient(circle at 72% 18%, rgba(70, 151, 234, .28), transparent 34%),
    radial-gradient(circle at 20% 62%, rgba(214, 171, 76, .18), transparent 35%),
    rgba(245, 250, 255, .72);
  backdrop-filter: blur(28px) saturate(1.18);
}

.auth-gate.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity .22s ease, transform .22s ease;
}

.auth-card {
  width: min(460px, 100%);
  padding: 34px;
  border-radius: 34px;
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(189, 213, 236, .82);
  box-shadow: 0 30px 90px rgba(26, 61, 98, .18);
}

.auth-card h1 {
  margin: 4px 0 10px;
  font-size: 34px;
  letter-spacing: 0;
  color: #0b2547;
}

.auth-card p {
  margin: 0 0 22px;
  color: #6a7b91;
  line-height: 1.65;
}

.auth-card label {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 800;
  color: #2a3f59;
}

.auth-card input {
  min-height: 46px;
  border: 1px solid rgba(194, 214, 234, .9);
  border-radius: 18px;
  padding: 0 16px;
  background: rgba(247, 251, 255, .88);
  color: #0b2547;
  font: inherit;
  outline: none;
}

.auth-card .remember-login-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: #4e627a;
}

.auth-card .remember-login-row input {
  width: 18px;
  height: 18px;
  min-height: 0;
  padding: 0;
  border-radius: 5px;
}

.auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}

.auth-actions button:disabled {
  cursor: wait;
  opacity: .72;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(238, 245, 253, .88);
  border: 1px solid rgba(200, 218, 236, .9);
  color: #6a7b91;
  font-size: 12px;
  font-weight: 900;
}

.admin-badge.online {
  color: #0d5f43;
  background: rgba(219, 246, 229, .86);
  border-color: rgba(157, 221, 184, .92);
}

@media (max-width: 1100px) {
  body { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .hero-panel, .grid.two, .metrics { grid-template-columns: 1fr; }
}

/* Launch v3: executive SaaS polish for customer-facing operations. */
body {
  grid-template-columns: 248px 1fr;
  background:
    radial-gradient(circle at 16% 6%, rgba(0, 94, 184, 0.10), transparent 22%),
    linear-gradient(145deg, #f8fbff 0%, #eef4fb 42%, #f7f1e6 100%);
}

.sidebar {
  padding: 20px;
  background: rgba(255, 255, 255, 0.80);
}

.brand {
  border-radius: 22px;
  box-shadow: 0 18px 46px rgba(8, 52, 98, 0.10);
}

.brand img {
  width: 46px;
  height: 46px;
  border-radius: 16px;
}

.nav {
  margin-top: 22px;
}

.nav button {
  height: 44px;
  border-radius: 16px;
  font-size: 14px;
}

.workspace {
  padding: 24px 28px 36px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  margin: -24px -28px 22px;
  padding: 20px 28px 14px;
  background: rgba(248, 251, 255, 0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(10, 41, 79, 0.06);
}

.topbar h1 {
  font-size: 30px;
  letter-spacing: -0.6px;
}

.top-actions button,
.endpoint-card button,
.section-head button,
.form-card button {
  height: 40px;
  min-width: 104px;
}

.hero-panel {
  margin: 0 0 20px;
  padding: 22px;
  grid-template-columns: 1fr minmax(360px, 420px);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.88), rgba(255,255,255,0.68)),
    radial-gradient(circle at 82% 18%, rgba(198,154,66,0.18), transparent 28%);
}

.hero-panel h2 {
  font-size: 26px;
  margin-bottom: 6px;
}

.hero-panel p {
  margin: 0;
  max-width: 760px;
}

.endpoint-card {
  border: 1px solid rgba(7, 95, 174, 0.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}

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

.metric {
  padding: 18px;
  border-radius: 22px;
  box-shadow: 0 16px 38px rgba(8, 52, 98, 0.06);
}

.metric strong {
  font-size: 28px;
}

.panel {
  border-radius: 26px;
  box-shadow: 0 18px 52px rgba(8, 52, 98, 0.08);
}

.panel:not(.hero-panel) {
  padding: 20px;
}

.grid.two {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.76fr);
}

.section-head {
  margin-bottom: 14px;
}

.section-head h2,
.section-head h3,
.panel h2,
.panel h3 {
  letter-spacing: -0.3px;
}

.product-card,
.row {
  padding: 14px;
  border-radius: 18px;
}

.product-card h3,
.row h3 {
  font-size: 16px;
}

.muted,
.hint {
  font-size: 13px;
  line-height: 1.55;
}

input,
textarea,
select {
  min-height: 42px;
  border-radius: 14px;
}

.code {
  min-height: 180px;
}

.bridge-flow span {
  padding: 13px 16px;
}

.checklist span,
.policy-preview span {
  border: 1px solid rgba(7, 95, 174, 0.08);
}

@media (max-width: 1100px) {
  body { grid-template-columns: 1fr; }
  .topbar { position: static; margin: 0 0 18px; padding: 0; background: transparent; border: 0; }
  .hero-panel { grid-template-columns: 1fr; }
  .bridge-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Phase 3C: admin mall/content ops controls. */
.section-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.form-actions button {
  flex: 1 1 160px;
}

.chip-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(7, 95, 174, 0.10);
  background: rgba(248, 251, 255, 0.78);
}

.admin-status {
  min-height: 20px;
  margin: 0 0 16px;
}

.admin-status.ok {
  color: #087443;
}

.admin-status.bad {
  color: #a45b12;
}

.admin-status.loading {
  color: var(--blue);
}

.ops-admin-layout {
  grid-template-columns: minmax(420px, 0.92fr) minmax(460px, 1.08fr);
  align-items: start;
}

.ops-admin-form {
  gap: 18px;
}

.ops-admin-form > label {
  display: grid;
  gap: 8px;
  color: var(--deep);
  font-weight: 850;
}

.ops-admin-form input,
.ops-admin-form select {
  font-weight: 700;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 22px;
  border: 1px solid rgba(7, 95, 174, 0.10);
  background:
    radial-gradient(circle at 88% 0%, rgba(7, 95, 174, 0.08), transparent 34%),
    rgba(248, 251, 255, 0.82);
}

.check-chip {
  position: relative;
  display: inline-flex;
  padding: 0;
  border: 0;
  background: transparent;
}

.check-chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  opacity: 0;
  cursor: pointer;
}

.check-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.90);
  border: 1px solid rgba(7, 95, 174, 0.12);
  color: var(--deep);
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.check-chip input:checked + span {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--deep));
  border-color: rgba(7, 95, 174, 0.10);
  box-shadow: 0 10px 22px rgba(7, 95, 174, 0.18);
}

.ops-admin-list-panel {
  min-height: 420px;
}

.admin-list {
  display: grid;
  gap: 12px;
}

.admin-empty {
  display: grid;
  gap: 8px;
  min-height: 120px;
  align-content: center;
  padding: 20px;
  border-radius: 22px;
  border: 1px dashed rgba(7, 95, 174, 0.18);
  background: rgba(248, 251, 255, 0.72);
  color: var(--muted);
}

.admin-empty b {
  color: var(--deep);
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 0%, rgba(198, 154, 66, 0.08), transparent 30%),
    rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(7, 95, 174, 0.11);
}

.admin-row.active {
  border-color: rgba(7, 95, 174, 0.34);
  box-shadow: 0 16px 32px rgba(7, 95, 174, 0.10);
}

.admin-row h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--deep);
}

.admin-row .muted {
  max-width: 720px;
  line-height: 1.55;
}

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

.admin-row-actions button {
  height: 36px;
  min-width: 78px;
  padding: 0 14px;
}

.connection-panel {
  margin-top: 20px;
}

.connection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.connection-grid span {
  min-height: 72px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(7, 95, 174, 0.10);
  color: var(--muted);
  display: grid;
  align-content: center;
  gap: 4px;
}

.connection-grid b {
  color: var(--deep);
}

.connection-grid span.ok {
  background: rgba(231, 247, 239, 0.86);
  border-color: rgba(20, 132, 78, 0.16);
  color: #147a48;
}

.connection-grid span.bad {
  background: rgba(255, 245, 235, 0.88);
  border-color: rgba(198, 112, 22, 0.18);
  color: #9a5c0f;
}

.product-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
}

#contentList .product-card {
  grid-template-columns: 1fr;
}

.product-thumb {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(198, 154, 66, 0.20), transparent 40%),
    linear-gradient(135deg, #edf5ff, #fffaf0);
  border: 1px solid rgba(7, 95, 174, 0.10);
  display: grid;
  place-items: center;
  color: rgba(7, 54, 111, 0.52);
  font-size: 13px;
  font-weight: 800;
}

.product-thumb img,
.cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.tag.light {
  background: rgba(7, 95, 174, 0.08);
  color: var(--deep);
}

.cover-uploader {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(7, 95, 174, 0.10);
  background: rgba(248, 251, 255, 0.78);
}

.cover-preview {
  width: 148px;
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 18%, rgba(7, 95, 174, 0.18), transparent 34%),
    radial-gradient(circle at 20% 80%, rgba(198, 154, 66, 0.18), transparent 42%),
    #fff;
  border: 1px solid rgba(7, 95, 174, 0.10);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.cover-actions {
  display: grid;
  gap: 10px;
}

.cover-actions input[type="file"] {
  padding-top: 9px;
}

.small-code {
  min-height: 118px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--deep);
}

.form-card .check-row {
  display: flex;
  grid-template-columns: none;
}

.check-row input {
  width: auto;
  min-height: auto;
}

.product-editor {
  gap: 18px;
}

.form-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.operator-badge {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(7, 95, 174, 0.08);
  color: var(--deep);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.operator-guide {
  padding: 14px 16px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 92% 8%, rgba(198, 154, 66, 0.16), transparent 34%),
    rgba(248, 251, 255, 0.88);
  border: 1px solid rgba(7, 95, 174, 0.10);
  display: grid;
  gap: 4px;
}

.operator-guide strong {
  color: var(--deep);
}

.operator-guide span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

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

.preset-grid button {
  height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(7, 95, 174, 0.10);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: none;
}

.form-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(7, 95, 174, 0.08);
}

.field-group-title {
  display: grid;
  gap: 4px;
  padding-bottom: 4px;
}

.field-group-title strong {
  color: var(--deep);
  font-size: 16px;
}

.field-group-title span,
.field-label small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  font-weight: 600;
}

.field-label {
  display: grid;
  gap: 8px;
  color: var(--deep);
  font-size: 13px;
  font-weight: 900;
  min-width: 0;
  line-height: 1.35;
}

.field-label input,
.field-label textarea,
.field-label select {
  font-weight: 700;
}

.field-label textarea::placeholder,
.field-label input::placeholder {
  color: rgba(102, 112, 133, 0.72);
}

.advanced-field {
  opacity: 0.92;
}

.publish-section {
  background:
    linear-gradient(135deg, rgba(7, 95, 174, 0.06), rgba(198, 154, 66, 0.08)),
    rgba(255, 255, 255, 0.76);
}

@media (max-width: 860px) {
  .connection-grid,
  .cover-uploader {
    grid-template-columns: 1fr;
  }

  .preset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Phase 3C redesign: Figma light-field + ops console component system. */
:root {
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --surface-soft: rgba(246, 250, 255, 0.72);
  --blue-900: #07315f;
  --blue-700: #075faa;
  --blue-100: #eaf4ff;
  --gold-500: #c99a38;
  --gold-100: #fff4d8;
  --radius-lg: 30px;
  --radius-md: 22px;
  --ops-shadow: 0 22px 60px rgba(8, 52, 98, 0.10);
}

body {
  position: relative;
  overflow-x: hidden;
  background: linear-gradient(145deg, #f8fbff 0%, #eef6ff 46%, #fff8ed 100%);
  font-size: 14px;
}

.light-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.field-orb {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
}

.field-orb-cool {
  right: -90px;
  top: -150px;
  background: radial-gradient(circle, rgba(64, 151, 239, 0.36), rgba(64, 151, 239, 0));
}

.field-orb-warm {
  left: 210px;
  top: 110px;
  background: radial-gradient(circle, rgba(229, 186, 91, 0.30), rgba(229, 186, 91, 0));
}

.sidebar,
.topbar,
.panel,
.metric,
.product-card,
.row,
.endpoint-card,
.compact-panel,
.bridge-metric,
.form-section,
.assistant-card,
.module-intro,
.ops-card {
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
}

.sidebar {
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 18px 0 60px rgba(8, 52, 98, 0.06);
}

.brand {
  background:
    radial-gradient(circle at 18% 22%, rgba(7, 95, 170, 0.08), transparent 46%),
    rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(7, 95, 174, 0.08);
}

.brand strong {
  color: var(--blue-900);
  letter-spacing: -0.2px;
}

.nav button {
  display: flex;
  align-items: center;
  font-weight: 850;
  letter-spacing: -0.1px;
  border: 1px solid transparent;
}

.nav button.active {
  background:
    linear-gradient(135deg, rgba(7, 95, 170, 0.10), rgba(255, 244, 216, 0.72));
  border-color: rgba(7, 95, 174, 0.10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.topbar {
  background: rgba(248, 251, 255, 0.76);
}

.top-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 700;
}

button {
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(8, 52, 98, 0.10);
}

button:active {
  transform: translateY(0);
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(7, 95, 170, 0.34);
  box-shadow: 0 0 0 4px rgba(7, 95, 170, 0.08);
}

.hero-panel {
  overflow: hidden;
  position: relative;
}

.hero-panel::after {
  content: "";
  position: absolute;
  right: -92px;
  top: -86px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(7, 95, 170, 0.18), rgba(7, 95, 170, 0));
  pointer-events: none;
}

.ops-flow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.ops-flow span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(7, 95, 174, 0.08);
  color: var(--blue-900);
  font-weight: 900;
}

.ops-flow b {
  width: 28px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-500), var(--blue-700));
  opacity: 0.65;
}

.ops-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.ops-card {
  min-height: 124px;
  padding: 18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 86% 18%, rgba(7, 95, 170, 0.10), transparent 34%),
    rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(7, 95, 174, 0.08);
  box-shadow: 0 16px 42px rgba(8, 52, 98, 0.06);
}

.ops-card:nth-child(2) {
  background:
    radial-gradient(circle at 84% 22%, rgba(229, 186, 91, 0.18), transparent 38%),
    rgba(255, 255, 255, 0.78);
}

.ops-index {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--blue-100);
  color: var(--blue-700);
  font-weight: 950;
  margin-bottom: 12px;
}

.ops-card strong {
  display: block;
  color: var(--blue-900);
  font-size: 17px;
}

.ops-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.ops-card-action {
  cursor: pointer;
}

.ops-card-action:hover {
  transform: translateY(-1px);
  border-color: rgba(7, 95, 174, 0.18);
  box-shadow: 0 20px 50px rgba(8, 52, 98, 0.10);
}

.module-intro {
  margin-bottom: 16px;
  padding: 16px 18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 94% 10%, rgba(229, 186, 91, 0.16), transparent 26%),
    rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(7, 95, 174, 0.08);
  box-shadow: 0 16px 42px rgba(8, 52, 98, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.module-intro strong {
  display: block;
  color: var(--blue-900);
  font-size: 16px;
}

.module-intro span:not(.sync-pill) {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.55;
  font-weight: 700;
}

.sync-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(7, 95, 170, 0.08);
  color: var(--blue-900);
  font-weight: 900;
  white-space: nowrap;
}

.sync-pill.ok {
  background: rgba(20, 132, 78, 0.12);
  color: #147a48;
}

.sync-pill.warn {
  background: rgba(229, 186, 91, 0.20);
  color: #8d640f;
}

.product-workbench {
  grid-template-columns: minmax(320px, 0.42fr) minmax(680px, 1fr);
  align-items: start;
}

.content-workbench {
  grid-template-columns: minmax(320px, 0.46fr) minmax(560px, 1fr);
  align-items: start;
}

.product-list {
  position: sticky;
  top: 112px;
  max-height: calc(100vh - 140px);
  overflow: auto;
  padding-right: 4px;
}

.product-list::-webkit-scrollbar,
.workspace::-webkit-scrollbar {
  width: 8px;
}

.product-list::-webkit-scrollbar-thumb {
  background: rgba(7, 95, 170, 0.16);
  border-radius: 999px;
}

.product-editor {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.92), rgba(250,252,255,0.78)),
    radial-gradient(circle at 86% 10%, rgba(7,95,170,0.10), transparent 28%);
}

.editor-assistant {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.assistant-card {
  padding: 14px;
  border-radius: 22px;
  background: rgba(247, 251, 255, 0.78);
  border: 1px solid rgba(7, 95, 174, 0.08);
}

.assistant-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.mini-product-preview {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 14px;
  align-items: stretch;
}

.mini-product-cover {
  min-height: 112px;
  border-radius: 20px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 72% 20%, rgba(7, 95, 170, 0.30), transparent 36%),
    linear-gradient(135deg, #005baa, #07366f);
  color: rgba(255,255,255,0.82);
  font-weight: 950;
}

.mini-product-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-product-body {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 8px;
}

.mini-product-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mini-product-top span {
  color: var(--gold-500);
  font-weight: 950;
  font-size: 12px;
}

.mini-product-top strong {
  color: var(--blue-700);
  font-size: 24px;
  letter-spacing: -0.4px;
}

.mini-product-preview h4 {
  margin: 0;
  color: var(--blue-900);
  font-size: 19px;
  line-height: 1.25;
}

.mini-product-preview p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.5;
}

.publish-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.check-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255,255,255,0.76);
  border: 1px solid rgba(7, 95, 174, 0.08);
}

.check-item > span {
  width: 28px;
  height: 28px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 950;
  background: rgba(7, 95, 170, 0.10);
  color: var(--blue-700);
}

.check-item.warn > span {
  background: rgba(229, 186, 91, 0.20);
  color: #8d640f;
}

.check-item strong {
  display: block;
  color: var(--blue-900);
}

.check-item p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.form-section {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.82);
}

.field-group-title strong {
  display: flex;
  align-items: center;
  gap: 8px;
}

.field-group-title strong::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-500), var(--blue-700));
}

.form-card .primary[type="submit"] {
  justify-self: start;
  min-width: 148px;
}

.bridge-card {
  background:
    radial-gradient(circle at 88% 8%, rgba(7,95,170,0.12), transparent 30%),
    rgba(255, 255, 255, 0.82);
}

.school-data-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.compact-metric {
  min-height: 102px;
  padding: 18px 20px;
  background:
    radial-gradient(circle at 86% 12%, rgba(7, 95, 170, 0.12), transparent 34%),
    rgba(255, 255, 255, 0.82);
}

.compact-metric strong {
  font-size: 34px;
  letter-spacing: -0.8px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(4, minmax(128px, 1fr)) minmax(110px, 0.7fr) auto auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 20px;
}

.filter-bar label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  min-width: 0;
  line-height: 1.35;
}

.filter-bar input,
.filter-bar select {
  min-height: 42px;
  min-width: 0;
  border-radius: 16px;
  border: 1px solid rgba(7, 95, 174, 0.12);
  background: rgba(255, 255, 255, 0.82);
  color: var(--blue-900);
  font-weight: 800;
}

.filter-bar button {
  height: 42px;
  white-space: nowrap;
}

.class-code-form {
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 14px 16px;
  align-items: start;
}

.class-code-form label {
  min-width: 0;
  overflow: visible;
}

.class-code-form label,
.class-code-form input,
.class-code-form select {
  width: 100%;
  box-sizing: border-box;
}

.class-code-form label {
  overflow-wrap: anywhere;
}

.class-code-form .cc-name-field { grid-column: span 3; }
.class-code-form .cc-direction-field { grid-column: span 2; }
.class-code-form .cc-year-field { grid-column: span 2; }
.class-code-form .cc-service-field { grid-column: span 5; }
.class-code-form .cc-owner-field { grid-column: span 3; }
.class-code-form .cc-qq-field { grid-column: span 2; }
.class-code-form .cc-group-field { grid-column: span 3; }
.class-code-form .cc-seat-field { grid-column: span 2; }
.class-code-form .cc-submit {
  grid-column: span 2;
  align-self: start;
  margin-top: 25px;
  width: 100%;
  min-width: 0;
}

.class-code-form .cc-service-field small {
  min-height: 32px;
  margin-top: 5px;
  line-height: 1.35;
}

.cc-list-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.cc-list-heading h3,
.cc-list-heading .hint { margin: 0; }
.cc-list-heading .hint { margin-top: 5px; }
.cc-list-filters { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(150px, 190px); gap: 10px; min-width: min(100%, 480px); }
.cc-list-filters label { display: grid; gap: 5px; color: #607089; font-size: 11.5px; font-weight: 800; }
.cc-list-filters input,
.cc-list-filters select { width: 100%; min-height: 38px; box-sizing: border-box; border: 1px solid #dce5f1; border-radius: 10px; padding: 7px 11px; background: #fff; color: #20344f; font-weight: 700; }
.cc-direction-group { margin-top: 12px; overflow: hidden; border: 1px solid #e0e8f3; border-radius: 14px; background: #fff; }
.cc-direction-group > summary { display: flex; align-items: center; gap: 10px; padding: 12px 15px; cursor: pointer; list-style: none; background: linear-gradient(135deg, #f4f8ff, #fffaf1); color: #193c67; font-weight: 900; }
.cc-direction-group > summary::-webkit-details-marker { display: none; }
.cc-direction-group > summary::before { content: '›'; color: #6c8fb8; font-size: 20px; transform: rotate(0deg); transition: transform .15s ease; }
.cc-direction-group[open] > summary::before { transform: rotate(90deg); }
.cc-direction-group > summary em { padding: 3px 8px; border-radius: 999px; background: #e7f0fc; color: #476b95; font-size: 11px; font-style: normal; font-weight: 800; }
.cc-table-scroll { width: 100%; overflow-x: auto; }
.cc-directory-table { min-width: 1100px; margin: 0; }
.cc-directory-table thead th { background: #fbfcfe; }
.cc-directory-table th:last-child,
.cc-directory-table td:last-child { min-width: 270px; }
.cc-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cc-actions .ghost { min-height: 30px; padding: 5px 9px; }
.cc-directory-empty { display: grid; place-items: center; gap: 5px; min-height: 150px; padding: 20px; border: 1px dashed #d8e3f0; border-radius: 14px; background: #fbfdff; text-align: center; }
.cc-directory-empty b { color: #31445e; }
.cc-directory-empty span { color: #8793a5; font-size: 12px; }

.cmg-members-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; padding: 14px 16px; border: 1px solid #dfe8f3; border-radius: 14px 14px 0 0; background: linear-gradient(135deg, #f4f8ff, #fffaf2); }
.cmg-members-head h4,
.cmg-members-head p { margin: 0; }
.cmg-members-head p { margin-top: 4px; color: #738197; font-size: 12px; }
.cmg-members-table-wrap { overflow-x: auto; border: 1px solid #dfe8f3; border-top: 0; border-radius: 0 0 14px 14px; }
.cmg-members-table { min-width: 920px; margin: 0; }
.cmg-status { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 850; white-space: nowrap; }
.cmg-status.is-inherit { background: #edf3fb; color: #526f91; }
.cmg-status.is-all { background: #e9f7ef; color: #187547; }
.cmg-status.is-custom { background: #e9f2ff; color: #195ca8; }
.cmg-status.is-none { background: #fff0f0; color: #ad4141; }
.cmg-editor { margin-top: 14px; padding: 16px; border: 1px solid #cadbef; border-radius: 16px; background: #fbfdff; box-shadow: 0 12px 30px rgba(35, 79, 128, .08); }
.cmg-editor-head { display: flex; align-items: start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.cmg-editor-head .eyebrow,
.cmg-editor-head h4,
.cmg-editor-head span { margin: 0; }
.cmg-editor-head h4 { margin-top: 3px; color: #1f3553; }
.cmg-editor-head span { display: block; margin-top: 4px; color: #8491a3; font-size: 11.5px; }
.cmg-mode-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.cmg-mode-grid.is-single { grid-template-columns: minmax(0, 1fr); }
.cmg-mode-card { display: flex; align-items: flex-start; gap: 9px; min-width: 0; padding: 12px; border: 1px solid #dde6f2; border-radius: 13px; background: #fff; cursor: pointer; }
.cmg-mode-card:hover { border-color: #9ebce0; }
.cmg-mode-card.is-active { border-color: #3b83cf; background: #f0f6ff; box-shadow: 0 0 0 3px rgba(59, 131, 207, .08); }
.cmg-mode-card input { width: 16px !important; height: 16px !important; min-width: 16px !important; margin: 2px 0 0 !important; padding: 0 !important; appearance: auto !important; -webkit-appearance: auto !important; }
.cmg-mode-card span { display: grid; gap: 4px; min-width: 0; }
.cmg-mode-card b { color: #263b58; font-size: 12.5px; }
.cmg-mode-card small { color: #7a8799; font-size: 11px; line-height: 1.45; }
.cmg-mode-note { margin-top: 12px; padding: 12px 14px; border: 1px solid #e3eaf3; border-radius: 12px; background: #fff; color: #5f6e82; font-size: 12px; line-height: 1.55; }
.cmg-custom-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 11px 13px; border: 1px solid #dfe8f3; border-radius: 12px; background: #f5f8fc; }
.cmg-custom-head > div { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.cmg-custom-head b { color: #2a405d; font-size: 12.5px; }
.cmg-custom-head span { color: #7c899a; font-size: 11px; }
.cmg-course-list { display: grid; gap: 9px; margin-top: 10px; }
.cmg-course-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 12px; border: 1px solid #e1e8f2; border-radius: 12px; background: #fff; }
.cmg-course-row.is-selected { border-color: #a8c5e6; background: #f7fbff; }
.cmg-course-check { display: flex; align-items: flex-start; gap: 9px; min-width: 0; cursor: pointer; }
.cmg-course-check input,
.cmg-lesson-item input { width: 16px !important; height: 16px !important; min-width: 16px !important; margin: 2px 0 0 !important; padding: 0 !important; appearance: auto !important; -webkit-appearance: auto !important; }
.cmg-course-check span { display: grid; gap: 3px; min-width: 0; }
.cmg-course-check b { color: #263b58; font-size: 12.5px; }
.cmg-course-check small { color: #8490a1; font-size: 10.5px; overflow-wrap: anywhere; }
.cmg-course-actions { display: flex; align-items: center; gap: 8px; color: #738297; font-size: 11px; font-weight: 750; }
.cmg-lesson-panel { grid-column: 1 / -1; min-width: 0; padding-top: 10px; border-top: 1px solid #e5edf6; }
.cmg-lesson-tools { display: grid; grid-template-columns: minmax(210px, .8fr) minmax(220px, 1fr) auto auto; gap: 8px; align-items: center; margin-bottom: 9px; }
.cmg-lesson-tools.is-append { grid-template-columns: minmax(210px, .8fr) minmax(180px, 1fr) auto auto auto; }
.cmg-lesson-tools > div { display: grid; gap: 2px; }
.cmg-lesson-tools b { color: #2c405c; font-size: 12px; }
.cmg-lesson-tools span { color: #8591a2; font-size: 10.5px; }
.cmg-lesson-tools input { width: 100%; min-height: 34px; box-sizing: border-box; border: 1px solid #dce5f0; border-radius: 9px; padding: 6px 9px; }
.cmg-lesson-groups { display: grid; gap: 9px; max-height: 430px; overflow-y: auto; padding-right: 4px; }
.cmg-lesson-groups > section { overflow: hidden; border: 1px solid #e2eaf4; border-radius: 11px; background: #fff; }
.cmg-category-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-bottom: 1px solid #e7edf5; background: #f6f9fd; }
.cmg-category-head > div { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cmg-category-head b { color: #31506f; font-size: 12px; }
.cmg-category-head span { color: #7e8c9e; font-size: 10.5px; }
.cmg-lesson-item { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto auto; gap: 9px; align-items: center; padding: 8px 10px; border-top: 1px solid #f0f3f7; cursor: pointer; }
.cmg-lesson-item:first-of-type { border-top: 0; }
.cmg-lesson-item:hover { background: #f7faff; }
.cmg-lesson-item span { color: #35465d; font-size: 12px; overflow-wrap: anywhere; }
.cmg-access { min-width: 82px; padding: 3px 7px; border-radius: 999px; color: transparent; background: transparent; font-size: 10px; font-weight: 800; line-height: 1.2; text-align: center; white-space: nowrap; }
.cmg-access.is-missing { color: #a33d3d; background: #fff0f0; }
.cmg-access.is-partial { color: #9a6500; background: #fff7df; }
.cmg-access.is-granted { color: #287252; background: #eaf7f0; }
.cmg-lesson-item em { color: #929eae; font-size: 10.5px; font-style: normal; white-space: nowrap; }
.cmg-actions { display: flex; align-items: center; gap: 9px; margin-top: 14px; }

.owner-password-form {
  grid-template-columns: repeat(3, minmax(160px, 1fr)) auto !important;
}

@media (max-width: 1480px) {
  .class-code-form {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }

  .class-code-form .cc-name-field { grid-column: span 3; }
  .class-code-form .cc-direction-field { grid-column: span 2; }
  .class-code-form .cc-year-field { grid-column: span 1; }
  .class-code-form .cc-service-field { grid-column: span 6; }
  .class-code-form .cc-owner-field,
  .class-code-form .cc-qq-field,
  .class-code-form .cc-group-field { grid-column: span 2; }
  .class-code-form .cc-seat-field,
  .class-code-form .cc-submit { grid-column: span 3; }
}

@media (max-width: 900px) {
  .class-code-form {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .owner-password-form {
    grid-template-columns: 1fr !important;
  }

  .class-code-form .cc-name-field,
  .class-code-form .cc-direction-field,
  .class-code-form .cc-year-field,
  .class-code-form .cc-service-field,
  .class-code-form .cc-owner-field,
  .class-code-form .cc-qq-field,
  .class-code-form .cc-group-field,
  .class-code-form .cc-seat-field,
  .class-code-form .cc-submit { grid-column: 1 / -1; }

  .cc-list-heading { align-items: stretch; flex-direction: column; }
  .cc-list-filters { grid-template-columns: 1fr; min-width: 0; }
  .cmg-mode-grid { grid-template-columns: 1fr; }
  .cmg-course-row,
  .cmg-lesson-tools,
  .cmg-lesson-tools.is-append { grid-template-columns: 1fr; }
  .cmg-course-actions { justify-content: space-between; }
  .cmg-lesson-item { grid-template-columns: 18px minmax(0, 1fr) auto; }
  .cmg-access { grid-column: 2; justify-self: start; }
  .cmg-lesson-item em { grid-column: 3; grid-row: 1; }
}

.inline-check {
  align-self: center;
  padding-top: 18px;
  white-space: nowrap;
}

.school-data-workbench {
  grid-template-columns: minmax(360px, 0.58fr) minmax(620px, 1fr);
  align-items: start;
}

.school-program-list {
  top: 112px;
}

.school-program-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 62px;
  align-items: start;
  gap: 14px;
  cursor: pointer;
}

.school-program-card.active {
  border-color: rgba(7, 95, 170, 0.36);
  box-shadow: 0 22px 48px rgba(7, 95, 170, 0.12);
  background:
    radial-gradient(circle at 88% 14%, rgba(229, 186, 91, 0.16), transparent 34%),
    rgba(255, 255, 255, 0.92);
}

.school-program-main {
  min-width: 0;
}

.school-program-main h3 {
  margin: 10px 0 8px;
  color: var(--blue-900);
  font-size: 18px;
  letter-spacing: -0.2px;
}

.school-program-main p {
  margin: 4px 0 0;
  line-height: 1.45;
}

.school-program-meta {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  align-content: center;
  background:
    linear-gradient(135deg, rgba(7, 95, 170, 0.10), rgba(255, 244, 216, 0.86));
  color: var(--blue-900);
  border: 1px solid rgba(7, 95, 174, 0.10);
}

.school-program-meta b {
  font-size: 20px;
  line-height: 1;
}

.school-program-meta span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.tag.ok {
  background: rgba(20, 132, 78, 0.12);
  color: #147a48;
}

.tag.warn {
  background: rgba(229, 186, 91, 0.20);
  color: #8d640f;
}

.tag.bad {
  background: rgba(201, 66, 66, 0.12);
  color: #a63636;
}

.school-program-editor {
  gap: 18px;
  background:
    radial-gradient(circle at 94% 4%, rgba(7, 95, 170, 0.10), transparent 28%),
    rgba(255, 255, 255, 0.88);
}

.source-preview {
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(7, 95, 174, 0.10);
  background: rgba(246, 250, 255, 0.72);
  display: grid;
  gap: 10px;
}

.source-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.source-snippet {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(7, 95, 174, 0.08);
}

.source-snippet b {
  display: block;
  color: var(--blue-900);
  margin-bottom: 6px;
}

.source-snippet p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 13px;
}

.compact-code {
  min-height: 150px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
}

.mini-code {
  min-height: 92px;
}

.chart-preview {
  background:
    radial-gradient(circle at 88% 0%, rgba(229, 186, 91, 0.14), transparent 32%),
    rgba(247, 251, 255, 0.82);
}

.mini-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-chip-row span {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(7, 95, 174, 0.10);
  background: rgba(255, 255, 255, 0.86);
  color: var(--blue-900);
  font-size: 12px;
  font-weight: 850;
}

.chart-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(7, 95, 174, 0.10);
  background: rgba(255, 255, 255, 0.88);
}

.chart-card-head,
.chart-bar-row {
  display: grid;
  grid-template-columns: minmax(80px, 0.42fr) minmax(120px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.chart-card-head {
  grid-template-columns: minmax(0, 1fr) auto;
}

.chart-card-head strong {
  color: var(--blue-900);
}

.chart-card-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.chart-bars {
  display: grid;
  gap: 9px;
}

.chart-bar-row span,
.chart-bar-row b {
  color: var(--blue-900);
  font-size: 12px;
  font-weight: 900;
}

.chart-bar-row i {
  display: block;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue-700), rgba(229, 186, 91, 0.86));
}

.service-group-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.service-filter-bar {
  grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(148px, 1fr)) minmax(110px, 0.72fr) auto auto;
}

.service-group-workbench {
  grid-template-columns: minmax(360px, 0.58fr) minmax(620px, 1fr);
  align-items: start;
  margin-bottom: 20px;
}

.service-bulk-grid {
  align-items: start;
}

.service-group-list {
  top: 112px;
}

.service-group-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 62px;
  align-items: start;
  gap: 14px;
  cursor: pointer;
}

.service-group-card.active {
  border-color: rgba(7, 95, 170, 0.36);
  box-shadow: 0 22px 48px rgba(7, 95, 170, 0.12);
  background:
    radial-gradient(circle at 88% 14%, rgba(229, 186, 91, 0.16), transparent 34%),
    rgba(255, 255, 255, 0.92);
}

.service-group-main {
  min-width: 0;
}

.service-group-main h3 {
  margin: 10px 0 8px;
  color: var(--blue-900);
  font-size: 18px;
  letter-spacing: -0.2px;
}

.service-group-main p {
  margin: 4px 0 0;
  line-height: 1.45;
}

.service-group-meta {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  align-content: center;
  background:
    linear-gradient(135deg, rgba(7, 95, 170, 0.10), rgba(255, 244, 216, 0.86));
  color: var(--blue-900);
  border: 1px solid rgba(7, 95, 174, 0.10);
}

.service-group-meta b {
  font-size: 20px;
  line-height: 1;
}

.service-group-meta span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.service-group-editor {
  gap: 18px;
  background:
    radial-gradient(circle at 92% 4%, rgba(229, 186, 91, 0.13), transparent 28%),
    rgba(255, 255, 255, 0.88);
}

@media (max-width: 1280px) {
  .product-workbench,
  .content-workbench,
  .school-data-workbench,
  .service-group-workbench {
    grid-template-columns: 1fr;
  }

  .product-list,
  .school-program-list,
  .service-group-list {
    position: static;
    max-height: none;
  }

  .filter-bar:not(.class-code-form),
  .service-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .ops-quick-grid,
  .metrics,
  .mini-product-preview,
  .publish-checklist,
  .school-data-metrics,
  .service-group-metrics,
  .filter-bar:not(.class-code-form),
  .service-filter-bar {
    grid-template-columns: 1fr;
  }

  .module-intro {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Dev25: stable account workspace and responsive course-library internals. */
#appAccounts {
  --aa-control-height: 42px;
}

#appAccounts .section-head {
  margin-bottom: 12px;
}

#appAccounts .aa-tabs {
  gap: 2px;
  margin-bottom: 16px;
  padding: 3px;
  border-color: #dce5ef;
  background: rgba(247, 250, 253, .92);
}

#appAccounts .aa-tab {
  min-width: 102px;
  min-height: 38px;
  padding: 0 14px;
  white-space: nowrap;
}

#appAccounts .aa-work-card,
#appAccounts .aa-list-card,
#appAccounts .aa-table-card {
  padding: 16px;
  border-radius: 8px;
}

#appAccounts .aa-account-filters {
  grid-template-columns: minmax(260px, 1.55fr) minmax(112px, .58fr) minmax(112px, .58fr) minmax(126px, .66fr) minmax(210px, 1.05fr) 78px;
  gap: 12px;
}

#appAccounts .aa-account-filters label,
#appAccounts .aa-tool-form label,
#appAccounts .aa-validity-line label,
#appAccounts .aa-import-classline label {
  display: grid;
  align-content: end;
  gap: 6px;
  min-width: 0;
  margin: 0;
  color: #5f7085;
  font-size: 12px;
  font-weight: 800;
}

#appAccounts .aa-account-filters input,
#appAccounts .aa-account-filters select,
#appAccounts .aa-tool-form input,
#appAccounts .aa-validity-line input,
#appAccounts .aa-import-classline input,
#appAccounts .aa-import-classline select {
  width: 100%;
  height: var(--aa-control-height);
  min-width: 0;
  box-sizing: border-box;
}

#appAccounts .aa-account-filters > button,
#appAccounts .aa-tool-form > button,
#appAccounts .aa-validity-line > button {
  min-width: 78px;
  height: var(--aa-control-height);
  padding: 0 14px;
  white-space: nowrap;
}

#appAccounts .aa-table-card {
  overflow: visible;
}

#appAccounts .aa-table-scroll {
  border: 1px solid #e3e9f1;
  border-radius: 7px;
  background: rgba(255, 255, 255, .72);
}

#appAccounts .aa-account-table {
  min-width: 1320px;
  margin: 0;
  table-layout: fixed;
}

#appAccounts .aa-account-table th,
#appAccounts .aa-account-table td {
  padding: 11px 12px;
  vertical-align: middle;
}

#appAccounts .aa-account-table th {
  height: 42px;
  color: #66768a;
  font-size: 12px;
  white-space: nowrap;
}

#appAccounts .aa-account-table th:nth-child(1) { width: 44px; }
#appAccounts .aa-account-table th:nth-child(2) { width: 128px; }
#appAccounts .aa-account-table th:nth-child(3) { width: 140px; }
#appAccounts .aa-account-table th:nth-child(4) { width: 100px; }
#appAccounts .aa-account-table th:nth-child(5) { width: 260px; }
#appAccounts .aa-account-table th:nth-child(6) { width: 220px; }
#appAccounts .aa-account-table th:nth-child(7) { width: 120px; }
#appAccounts .aa-account-table th:nth-child(8) { width: 86px; }
#appAccounts .aa-account-table th:nth-child(9) { width: 64px; }

#appAccounts .aa-account-table tbody tr.aa-account-row {
  height: 72px;
}

#appAccounts .aa-account-table tbody tr.aa-account-row:hover {
  background: rgba(238, 246, 255, .66);
}

#appAccounts .aa-group-row td {
  height: 38px;
  padding: 7px 12px;
  border-top: 1px solid #dce7f2;
  border-bottom: 1px solid #dce7f2;
  background: linear-gradient(90deg, #eef6ff 0%, #f8fbff 56%, #fffaf1 100%);
}

#appAccounts .aa-group-row:first-child td { border-top: 0; }

#appAccounts .aa-group-row.is-collapsed td {
  background: linear-gradient(90deg, #e9f3ff 0%, #f5f9fe 56%, #fff8eb 100%);
}

#appAccounts .aa-group-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid #e1e8f0;
  border-radius: 7px;
  background: #f8fafc;
}

#appAccounts .aa-group-toolbar > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#appAccounts .aa-group-toolbar b {
  color: #334c68;
  font-size: 11.5px;
}

#appAccounts .aa-group-toolbar span {
  color: #7a899c;
  font-size: 10.5px;
}

#appAccounts .aa-group-toolbar button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 10.5px;
  white-space: nowrap;
}

#appAccounts .aa-group-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

#appAccounts .aa-group-heading b {
  overflow: hidden;
  color: #263f5d;
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#appAccounts .aa-group-heading small {
  color: #718196;
  font-size: 10.5px;
  white-space: nowrap;
}

#appAccounts .aa-group-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 66px;
  min-height: 28px;
  margin-left: auto;
  padding: 0 9px;
  border: 1px solid #c8d9ea;
  border-radius: 6px;
  background: rgba(255, 255, 255, .9);
  color: #24547f;
  font-size: 10.5px;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
}

#appAccounts .aa-group-toggle:hover {
  border-color: #8fb2d4;
  background: #fff;
}

#appAccounts .aa-group-toggle > span {
  display: inline-flex;
  justify-content: center;
  width: 10px;
  font-size: 12px;
  line-height: 1;
}

#appAccounts .aa-group-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 2px 0 0;
  color: #526980;
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

#appAccounts .aa-group-select input {
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  margin: 0 !important;
  padding: 0 !important;
  appearance: auto !important;
  -webkit-appearance: auto !important;
}

#appAccounts .aa-group-direction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 23px;
  padding: 0 8px;
  border: 1px solid #c9ddef;
  border-radius: 999px;
  background: #fff;
  color: #165b97;
  font-size: 10.5px;
  font-weight: 850;
  white-space: nowrap;
}

#appAccounts .aa-account-phone,
#appAccounts .aa-account-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#appAccounts .aa-class-select {
  height: 40px;
  padding-right: 30px;
}

#appAccounts .aa-check-col {
  padding-right: 6px !important;
  padding-left: 10px !important;
  text-align: center;
}

#appAccounts .aa-check-col input {
  width: 17px !important;
  height: 17px !important;
  min-width: 17px !important;
  margin: 0 !important;
  padding: 0 !important;
  appearance: auto !important;
  -webkit-appearance: auto !important;
}

#appAccounts .aa-class-cell,
#appAccounts .aa-rights-cell {
  min-width: 0;
}

#appAccounts .aa-class-cell {
  display: grid;
  gap: 7px;
  align-content: center;
}

#appAccounts .aa-class-cell b {
  overflow: hidden;
  color: #253a55;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#appAccounts .aa-class-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

#appAccounts .aa-class-meta > span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #edf3f9;
  color: #61748c;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}

#appAccounts .aa-class-meta button {
  min-height: 28px;
  padding: 0 9px;
  border-color: #d7e2ee;
  font-size: 10.5px;
}

#appAccounts .aa-rights-cell {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  white-space: nowrap;
}

#appAccounts .aa-rights-cell button {
  min-width: 68px;
  min-height: 30px;
  padding: 0 9px;
  font-size: 10.5px;
}

#appAccounts .aa-rights-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #edf3fb;
  color: #536f90;
  font-size: 10.5px;
  font-weight: 850;
  white-space: nowrap;
}

#appAccounts .aa-rights-badge.is-all { background: #e9f7ef; color: #187547; }
#appAccounts .aa-rights-badge.is-custom { background: #e9f2ff; color: #195ca8; }
#appAccounts .aa-rights-badge.is-none { background: #fff0f0; color: #ad4141; }
#appAccounts .aa-rights-badge.is-empty { background: #f2f4f7; color: #7f8a98; }

#appAccounts .aa-selection-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  padding: 11px 13px;
  border: 1px solid #c9dcef;
  border-radius: 9px;
  background: linear-gradient(135deg, #edf6ff, #fffaf0);
}

#appAccounts .aa-selection-bar.is-active { display: flex; }
#appAccounts .aa-selection-bar > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#appAccounts .aa-selection-bar b { color: #21466d; font-size: 12.5px; }
#appAccounts .aa-selection-bar span { color: #728298; font-size: 11px; }
#appAccounts .aa-selection-bar button { min-height: 34px; padding: 0 11px; }

#appAccounts .aa-device-bound,
#appAccounts .aa-state-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

#appAccounts .aa-device-cell {
  display: grid;
  justify-items: start;
  gap: 4px;
}

#appAccounts .aa-device-cell small {
  color: #8995a5;
  font-size: 10px;
}

#appAccounts .aa-status-cell { text-align: center; }

#appAccounts .aa-device-bound,
#appAccounts .aa-state-badge.is-active {
  background: #e8f7ee;
  color: #147548;
}

#appAccounts .aa-state-badge.is-warning {
  background: #fff4df;
  color: #99620f;
}

#appAccounts .aa-state-badge.is-disabled {
  background: #fff0f0;
  color: #b23a3a;
}

#appAccounts .aa-account-table small {
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#appAccounts .aa-password,
#appAccounts .aa-action-menu {
  display: inline-block;
  position: relative;
}

#appAccounts .aa-password > summary,
#appAccounts .aa-action-menu > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  margin: 0;
  border: 1px solid #dce4ee;
  border-radius: 6px;
  background: #fff;
  color: #184f86;
  font-size: 12px;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

#appAccounts .aa-password > summary {
  min-width: 54px;
  padding: 0 10px;
}

#appAccounts .aa-action-menu > summary {
  width: 36px;
  min-width: 36px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

#appAccounts .aa-password > summary::-webkit-details-marker,
#appAccounts .aa-action-menu > summary::-webkit-details-marker {
  display: none;
}

#appAccounts .aa-password[open] > summary,
#appAccounts .aa-action-menu[open] > summary {
  border-color: #8fb8df;
  background: #edf6ff;
}

#appAccounts .aa-password-pop,
#appAccounts .aa-action-menu-pop {
  position: fixed;
  z-index: 1400;
  margin: 0;
  border: 1px solid #dbe4ef;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(25, 57, 91, .18);
}

#appAccounts .aa-password-pop {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 220px;
  padding: 10px;
}

#appAccounts .aa-password-pop code,
#appAccounts .aa-password-pop button {
  display: block;
  min-width: 0;
  margin: 0;
}

#appAccounts .aa-password-pop code {
  overflow: hidden;
  color: #233c57;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#appAccounts .aa-password-pop button {
  min-height: 32px;
  padding: 0 9px;
  white-space: nowrap;
}

#appAccounts .aa-action-menu-pop {
  display: grid;
  gap: 2px;
  width: 156px;
  padding: 5px;
}

#appAccounts .aa-action-menu-pop button {
  justify-content: flex-start;
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border-color: transparent;
  border-radius: 5px;
  background: transparent;
  text-align: left;
  white-space: nowrap;
}

#appAccounts .aa-action-menu-pop button:hover {
  background: #eef5fd;
}

#appAccounts .aa-action-menu-pop button.danger:hover {
  background: #fff0f0;
}

#appAccounts .aa-action-cell {
  text-align: center;
}

#appAccounts .aa-pagination {
  min-height: 44px;
  padding: 12px 2px 0;
  color: #6d7c8f;
  font-size: 12px;
}

#appAccounts .aa-pagination button {
  min-height: 34px;
  padding: 0 12px;
}

#appAccounts .aa-import-classline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

#appAccounts .aa-policy-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 12px 0;
}

#appAccounts .aa-policy-guide > div {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid #dfe8f3;
  border-radius: 9px;
  background: rgba(255, 255, 255, .72);
}

#appAccounts .aa-policy-guide b { color: #24405e; font-size: 12px; }
#appAccounts .aa-policy-guide span { color: #76869a; font-size: 11px; line-height: 1.45; }

#appAccounts .aa-import-class-picker {
  grid-template-columns: minmax(125px, .6fr) minmax(190px, 1fr) minmax(260px, 1.3fr) minmax(210px, 1fr) minmax(190px, .9fr);
}

#appAccounts .aa-import-extra-line {
  grid-template-columns: minmax(320px, 1.5fr) minmax(160px, .6fr) minmax(180px, .7fr);
}

#appAccounts .aa-import-grant-action {
  display: grid;
  align-content: end;
  gap: 5px;
}

#appAccounts .aa-import-grant-action button {
  width: 100%;
  height: var(--aa-control-height);
}

#appAccounts .aa-import-grant-action span {
  overflow: hidden;
  color: #6f8095;
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.aa-modal-open { overflow: hidden; }

#appAccounts .aa-modal[hidden] { display: none !important; }

#appAccounts .aa-modal {
  position: fixed;
  z-index: 3200;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

#appAccounts .aa-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(19, 34, 53, .48);
  backdrop-filter: blur(3px);
}

#appAccounts .aa-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  box-sizing: border-box;
  padding: 18px;
  border: 1px solid #dbe5f0;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(20, 45, 75, .26);
}

#appAccounts .aa-grant-dialog { width: min(1080px, calc(100vw - 32px)); }

#appAccounts .aa-modal-head,
#appAccounts .aa-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#appAccounts .aa-modal-head { margin-bottom: 15px; }
#appAccounts .aa-modal-head p,
#appAccounts .aa-modal-head h3 { margin: 0; }
#appAccounts .aa-modal-head h3 { margin-top: 3px; color: #1e3552; }
#appAccounts .aa-modal-head .hint { margin-top: 4px; }
#appAccounts .aa-modal-actions { justify-content: flex-end; margin-top: 16px; }

#appAccounts .aa-class-picker-grid {
  display: grid;
  grid-template-columns: minmax(150px, .65fr) minmax(260px, 1.35fr);
  gap: 12px;
}

#appAccounts .aa-class-picker-grid label {
  display: grid;
  gap: 6px;
  color: #5f7085;
  font-size: 12px;
  font-weight: 800;
}

#appAccounts .aa-class-picker-grid input,
#appAccounts .aa-class-picker-grid select {
  width: 100%;
  height: 42px;
  box-sizing: border-box;
}

#appAccounts .aa-class-picker-main { grid-column: 1 / -1; }
#appAccounts .aa-grant-dialog .cmg-editor { margin: 0; border: 0; padding: 0; box-shadow: none; }
#appAccounts .aa-grant-dialog .cmg-editor-head { display: none; }

#appAccounts .aa-tools-grid {
  grid-template-columns: minmax(320px, .75fr) minmax(620px, 1.45fr);
  gap: 14px;
}

#appAccounts .aa-tool-form,
#appAccounts .aa-validity-line {
  display: grid;
  align-items: end;
  gap: 12px;
  margin-top: 12px;
}

#appAccounts .aa-tool-form {
  grid-template-columns: minmax(220px, 1fr) auto;
}

#appAccounts .aa-validity-line {
  grid-template-columns: minmax(180px, .9fr) minmax(260px, 1.25fr) minmax(170px, .75fr) auto;
}

#appAccounts .aa-system-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

#appAccounts .aa-system-grid .inline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#appAccounts .aa-system-grid .inline label,
#appAccounts .aa-system-grid > .aa-work-card > label:not(.aa-check-line) {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #5f7085;
  font-size: 12px;
  font-weight: 800;
}

#appAccounts .aa-system-grid input:not([type="checkbox"]),
#appAccounts .aa-system-grid select {
  width: 100%;
  min-width: 0;
  height: var(--aa-control-height);
  box-sizing: border-box;
}

#appAccounts .aa-system-grid textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Course library: titles keep their width; controls and counts never split mid-label. */
#courseLibrary .course-lib-layout {
  grid-template-columns: minmax(400px, 430px) minmax(0, 1fr) !important;
  gap: 16px !important;
}

#courseLibrary #courseLibList {
  display: grid;
  align-content: start;
  gap: 10px;
  padding-right: 6px;
}

#courseLibrary .course-lib-row {
  display: block !important;
  min-width: 0;
  margin: 0 !important;
  padding: 13px !important;
}

#courseLibrary .course-lib-row .product-row-main {
  display: block;
  width: 100%;
  min-width: 0;
}

#courseLibrary .course-lib-row .product-row-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  min-width: 0;
  line-height: 1.45;
}

#courseLibrary .course-lib-course-title {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  color: #1f3045;
  font-weight: 900;
  overflow-wrap: break-word;
  word-break: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#courseLibrary .course-lib-row .product-row-sub {
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#courseLibrary .course-lib-acts {
  display: grid;
  grid-template-columns: auto auto minmax(92px, 1fr) auto;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 12px;
}

#courseLibrary .course-lib-acts .cl-mini,
#courseLibrary .course-direction-select {
  min-width: 0 !important;
  height: 34px;
  margin: 0;
  white-space: nowrap;
}

#courseLibrary .course-lib-acts .cl-mini {
  padding: 0 10px;
}

#courseLibrary .course-direction-select {
  width: 100%;
}

#courseLibrary .course-lib-layout > .form-card {
  overflow: hidden;
}

#courseLibrary .course-lib-layout > .form-card > .form-title {
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

#courseLibrary .course-lib-layout > .form-card > .form-title > div {
  flex: 1 1 360px;
  min-width: 0;
}

#courseLibrary .course-lib-layout > .form-card > .form-title h3 {
  overflow-wrap: break-word;
  word-break: normal;
}

#appAccounts .aa-tools-grid > .aa-work-card,
#appAccounts .aa-system-grid > .aa-work-card {
  min-width: 0;
}

#courseLibArrangePanel .cl-category-drag-list {
  align-items: center;
}

#courseLibArrangePanel .cl-category-drag-item {
  flex: 0 0 auto;
  max-width: 100%;
  white-space: nowrap;
}

#courseLibArrangePanel .cl-category-drag-item > span:not(.cl-drag-handle) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

#courseLibArrangePanel .cl-category-drag-item small {
  flex: none;
  white-space: nowrap;
}

#courseLibArrangePanel .cl-arrange-category-head > div {
  flex: 1 1 auto;
  flex-wrap: nowrap;
}

#courseLibArrangePanel .cl-arrange-category-head input {
  flex: 1 1 220px;
  width: min(320px, 100%);
  min-width: 0;
}

#courseLibArrangePanel .cl-arrange-category-head span {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: 24px;
  padding: 0 7px;
  border-radius: 5px;
  background: #e8eff8;
  white-space: nowrap;
}

#courseLibArrangePanel .cl-arrange-category-head small {
  flex: 0 1 auto;
  text-align: right;
}

@media (max-width: 1500px) {
  #courseLibrary .course-lib-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #courseLibrary #courseLibList {
    grid-template-columns: repeat(2, minmax(300px, 1fr));
    max-height: 390px;
  }

  #appAccounts .aa-account-filters {
    grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(120px, .68fr)) minmax(190px, 1fr) 78px;
  }
}

@media (max-width: 1280px) {
  #appAccounts .aa-account-filters {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  #appAccounts .aa-search-field {
    grid-column: 1 / span 2;
  }

  #appAccounts .aa-account-filters > button {
    grid-column: 3;
  }

  #appAccounts .aa-tools-grid,
  #appAccounts .aa-system-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #appAccounts .aa-system-grid .aa-danger-card {
    grid-column: auto;
  }

  #appAccounts .aa-import-class-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #appAccounts .aa-import-grant-action {
    grid-column: 1 / -1;
  }
}

@media (max-width: 920px) {
  #courseLibrary #courseLibList {
    grid-template-columns: minmax(0, 1fr);
  }

  #courseLibArrangePanel .cl-arrange-category-head {
    align-items: flex-start;
    flex-direction: column;
  }

  #courseLibArrangePanel .cl-arrange-category-head small {
    text-align: left;
  }

  #appAccounts .aa-account-filters,
  #appAccounts .aa-import-classline,
  #appAccounts .aa-validity-line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #appAccounts .aa-policy-guide { grid-template-columns: minmax(0, 1fr); }
  #appAccounts .aa-selection-bar { align-items: flex-start; flex-direction: column; }

  #appAccounts .aa-search-field,
  #appAccounts .aa-account-filters > button {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  #appAccounts .aa-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  #appAccounts .aa-tab {
    min-width: 0;
  }

  #appAccounts .aa-account-filters,
  #appAccounts .aa-import-classline,
  #appAccounts .aa-tool-form,
  #appAccounts .aa-validity-line,
  #appAccounts .aa-system-grid .inline {
    grid-template-columns: minmax(0, 1fr);
  }

  #appAccounts .aa-import-grant-action,
  #appAccounts .aa-class-picker-main { grid-column: auto; }

  #appAccounts .aa-class-picker-grid { grid-template-columns: minmax(0, 1fr); }

  #appAccounts .aa-modal { padding: 10px; }
  #appAccounts .aa-modal-dialog { width: calc(100vw - 20px); max-height: calc(100vh - 20px); padding: 14px; }

  #appAccounts .aa-account-filters > button,
  #appAccounts .aa-tool-form > button,
  #appAccounts .aa-validity-line > button {
    width: 100%;
  }

  #appAccounts .aa-group-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  #appAccounts .aa-group-toolbar > div:last-child {
    width: 100%;
  }

  #appAccounts .aa-group-toolbar > div:last-child button {
    flex: 1;
  }

  #courseLibrary .course-lib-acts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #courseLibrary .course-direction-select {
    grid-column: 1 / -1;
  }
}

/* 资料导入：方向分组、搜索、多班级勾选。 */
#materials .material-import-card {
  display: grid;
  gap: 14px;
}

#materials .material-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

#materials .material-picker-head .hint {
  margin: 6px 0 0;
}

#materials .material-selected-count {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(7, 95, 174, 0.10);
  color: var(--deep);
  font-size: 13px;
  font-weight: 900;
}

#materials .material-class-tools {
  display: grid;
  grid-template-columns: minmax(170px, 0.7fr) minmax(280px, 1.6fr) auto;
  align-items: end;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.82);
}

#materials .material-class-tools label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

#materials .material-class-tools input,
#materials .material-class-tools select {
  width: 100%;
  min-width: 0;
}

#materials .material-class-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#materials .material-class-actions button,
#materials .material-class-group-head button {
  height: 38px;
  margin: 0;
  white-space: nowrap;
}

#materials .material-class-options {
  display: grid;
  gap: 12px;
  max-height: 440px;
  overflow: auto;
  padding: 2px 4px 2px 0;
}

#materials .material-class-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
}

#materials .material-class-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(7, 95, 174, 0.07), rgba(198, 154, 66, 0.07));
}

#materials .material-class-group-head > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

#materials .material-class-group-head span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #fff;
  color: var(--deep);
  font-weight: 900;
}

#materials .material-class-group-head b {
  color: var(--muted);
  font-size: 12px;
}

#materials .material-class-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
}

#materials .material-class-option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

#materials .material-class-option:hover {
  border-color: rgba(7, 95, 174, 0.28);
}

#materials .material-class-option.is-selected {
  border-color: rgba(7, 95, 174, 0.42);
  background: rgba(7, 95, 174, 0.06);
  box-shadow: 0 8px 20px rgba(7, 54, 111, 0.08);
}

#materials .material-class-option input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--blue);
}

#materials .material-class-option span,
#materials .material-class-option b,
#materials .material-class-option small {
  display: block;
  min-width: 0;
}

#materials .material-class-option b {
  overflow: hidden;
  color: #20334d;
  font-size: 13px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#materials .material-class-option small {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#materials .material-class-empty {
  padding: 28px;
  border: 1px dashed rgba(7, 95, 174, 0.24);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
}

#materials .material-selection-summary {
  margin: -2px 0 0;
  line-height: 1.65;
}

#materials .material-selection-summary span {
  color: #304866;
}

@media (max-width: 1180px) {
  #materials .material-class-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  #materials .material-picker-head,
  #materials .material-class-group-head {
    align-items: stretch;
    flex-direction: column;
  }

  #materials .material-class-tools,
  #materials .material-class-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #materials .material-class-actions {
    flex-wrap: wrap;
  }
}

/* Dev30: lesson categories use a complete native picker, with an explicit custom-name path. */
#courseLibArrangePanel .cl-arrange-group-control {
  display: grid;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

#courseLibArrangePanel select.cl-arrange-group,
#courseLibArrangePanel .cl-arrange-group-custom {
  width: 100%;
  min-width: 0;
  height: 38px;
  margin: 0;
  padding: 0 34px 0 10px;
  border: 1px solid #cfdae8;
  border-radius: 6px;
  background-color: #fff;
  color: #24425f;
  font: inherit;
  box-sizing: border-box;
}

#courseLibArrangePanel select.cl-arrange-group {
  cursor: pointer;
}

#courseLibArrangePanel .cl-arrange-group-custom {
  padding-right: 10px;
  border-color: #78a9df;
  background: #f8fbff;
  box-shadow: 0 0 0 3px rgba(45, 126, 210, .09);
}

#courseLibArrangePanel .cl-arrange-group-custom[hidden] {
  display: none !important;
}

#courseLibArrangePanel .cl-arrange-group-control.is-custom select.cl-arrange-group {
  border-color: #9bbddd;
  background-color: #f5f9fe;
}

@media (max-width: 1180px) {
  #courseLibArrangePanel .cl-arrange-group-control {
    grid-column: 3;
  }
}

/* Dev29: App account system controls use a single, scoped layout contract. */
#appAccounts .aa-system-panel {
  --aa-surface: #ffffff;
  --aa-surface-soft: #f7faff;
  --aa-border: #dfe8f3;
  --aa-border-strong: #c8d8ea;
  --aa-text: #14253d;
  --aa-muted: #6c7d91;
  --aa-primary: #0b67b2;
  --aa-primary-soft: #eaf4ff;
  --aa-success: #16825d;
  --aa-danger: #c23b47;
}

#appAccounts .aa-system-panel .aa-system-grid {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 16px !important;
  align-items: start !important;
}

#appAccounts .aa-system-panel .aa-system-grid > .aa-system-card {
  min-width: 0;
  margin: 0 !important;
  padding: 22px !important;
  border: 1px solid var(--aa-border) !important;
  border-radius: 16px !important;
  background: var(--aa-surface) !important;
  box-shadow: 0 12px 32px rgba(30, 69, 111, .07) !important;
}

#appAccounts .aa-system-panel .aa-system-grid > .aa-release-card {
  grid-column: 1 / -1 !important;
  border-color: #cfe0f3 !important;
  background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%) !important;
}

#appAccounts .aa-system-panel .aa-system-grid > .aa-module-card {
  grid-column: span 7 !important;
  grid-row: span 2;
}

#appAccounts .aa-system-panel .aa-system-grid > .aa-maintenance-card,
#appAccounts .aa-system-panel .aa-system-grid > .aa-relink-card {
  grid-column: span 5 !important;
}

#appAccounts .aa-system-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

#appAccounts .aa-system-card-head h3 {
  margin: 2px 0 5px;
  color: var(--aa-text);
  font-size: 18px;
  line-height: 1.35;
}

#appAccounts .aa-system-card-head .eyebrow {
  margin: 0;
  color: #9b6a17;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

#appAccounts .aa-system-card-head .hint,
#appAccounts .aa-setting-row small,
#appAccounts .aa-maintenance-actions small,
#appAccounts .aa-option-copy small {
  color: var(--aa-muted);
}

#appAccounts .aa-switch-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  margin: 0;
  cursor: pointer;
}

#appAccounts .aa-switch-row > input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  opacity: 0;
}

#appAccounts .aa-switch-control {
  position: relative;
  flex: 0 0 48px;
  width: 48px;
  height: 28px;
  border: 1px solid #c7d2df;
  border-radius: 999px;
  background: #dce4ed;
  box-shadow: inset 0 1px 2px rgba(19, 37, 61, .12);
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

#appAccounts .aa-switch-control::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(31, 54, 82, .26);
  content: "";
  transition: transform .18s ease;
}

#appAccounts .aa-switch-row > input:checked + .aa-switch-control {
  border-color: var(--aa-primary);
  background: var(--aa-primary);
}

#appAccounts .aa-switch-row > input:checked + .aa-switch-control::after {
  transform: translateX(20px);
}

#appAccounts .aa-switch-row > input:focus-visible + .aa-switch-control {
  outline: 3px solid rgba(25, 119, 196, .24);
  outline-offset: 3px;
}

#appAccounts .aa-switch-row-danger > input:checked + .aa-switch-control {
  border-color: var(--aa-danger);
  background: var(--aa-danger);
}

#appAccounts .aa-switch-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

#appAccounts .aa-switch-copy strong {
  color: var(--aa-text);
  font-size: 14px;
}

#appAccounts .aa-switch-copy small {
  color: var(--aa-muted);
  font-size: 12px;
  line-height: 1.5;
}

#appAccounts .aa-service-switch {
  flex: 0 0 270px;
  padding: 12px 14px;
  border: 1px solid #f1c9cd;
  border-radius: 12px;
  background: #fff8f8;
}

#appAccounts .aa-version-gates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 16px;
}

#appAccounts .aa-version-gate {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--aa-border);
  border-radius: 13px;
  background: var(--aa-surface-soft);
}

#appAccounts .aa-subsection-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--aa-text);
}

#appAccounts .aa-subsection-title > span {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--aa-primary-soft);
  color: var(--aa-primary);
  font-size: 11px;
  font-weight: 800;
}

#appAccounts .aa-system-panel .inline {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

#appAccounts .aa-system-panel label,
#appAccounts .aa-system-panel .aa-field {
  min-width: 0;
}

#appAccounts .aa-system-panel .inline label,
#appAccounts .aa-system-panel .aa-field,
#appAccounts .aa-platform-link-grid label {
  display: grid !important;
  gap: 7px !important;
  margin: 0 !important;
  color: #53667c !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

#appAccounts .aa-system-panel input:not([type="checkbox"]):not([type="radio"]),
#appAccounts .aa-system-panel select,
#appAccounts .aa-system-panel textarea {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  border: 1px solid #d6e0eb !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  color: var(--aa-text) !important;
  box-shadow: none !important;
}

#appAccounts .aa-system-panel input:not([type="checkbox"]):not([type="radio"]),
#appAccounts .aa-system-panel select {
  height: 44px !important;
  padding: 0 13px !important;
}

#appAccounts .aa-system-panel textarea {
  min-height: 78px;
  padding: 11px 13px !important;
  resize: vertical;
}

#appAccounts .aa-system-panel input:focus,
#appAccounts .aa-system-panel select:focus,
#appAccounts .aa-system-panel textarea:focus {
  border-color: #6da7d7 !important;
  outline: 3px solid rgba(30, 121, 194, .12) !important;
}

#appAccounts .aa-release-fields {
  display: grid;
  gap: 14px;
}

#appAccounts .aa-platform-links {
  margin: 16px 0 0;
  border: 1px solid var(--aa-border);
  border-radius: 12px;
  background: #ffffff;
}

#appAccounts .aa-platform-links summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  color: var(--aa-text);
  font-size: 13px;
  font-weight: 850;
  list-style-position: inside;
}

#appAccounts .aa-platform-links summary > span {
  color: var(--aa-muted);
  font-size: 11px;
  font-weight: 700;
}

#appAccounts .aa-platform-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 15px 15px;
}

#appAccounts .aa-display-mode-block {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--aa-border);
  border-radius: 13px;
  background: #ffffff;
}

#appAccounts .aa-block-heading {
  margin-bottom: 12px;
}

#appAccounts .aa-block-heading strong {
  color: var(--aa-text);
  font-size: 14px;
}

#appAccounts .aa-block-heading .hint {
  margin: 4px 0 0;
}

#appAccounts .aa-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#appAccounts .aa-option-card {
  position: relative;
  display: grid !important;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 10px !important;
  min-height: 66px;
  padding: 12px 14px;
  border: 1px solid var(--aa-border) !important;
  border-radius: 11px;
  background: #f9fbfd;
  cursor: pointer;
}

#appAccounts .aa-option-card:has(input:checked) {
  border-color: #66a7d9 !important;
  background: var(--aa-primary-soft);
  box-shadow: 0 0 0 2px rgba(32, 119, 188, .08);
}

#appAccounts .aa-option-card > input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  opacity: 0;
}

#appAccounts .aa-option-indicator {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 2px solid #aab8c7;
  border-radius: 50%;
  background: #ffffff;
}

#appAccounts .aa-option-indicator::after {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  content: "";
}

#appAccounts .aa-option-card > input:checked + .aa-option-indicator {
  border-color: var(--aa-primary);
  background: var(--aa-primary);
}

#appAccounts .aa-option-card > input:focus-visible + .aa-option-indicator {
  outline: 3px solid rgba(25, 119, 196, .24);
  outline-offset: 3px;
}

#appAccounts .aa-option-copy {
  display: grid;
  gap: 3px;
}

#appAccounts .aa-option-copy strong {
  color: var(--aa-text);
  font-size: 13px;
}

#appAccounts .aa-option-copy small {
  font-size: 11px;
  line-height: 1.45;
}

#appAccounts .aa-setting-list {
  display: grid;
  gap: 10px;
}

#appAccounts .aa-setting-row {
  min-height: 72px;
  padding: 13px 14px;
  border: 1px solid var(--aa-border);
  border-radius: 12px;
  background: #fbfcfe;
}

#appAccounts .aa-setting-row:hover {
  border-color: var(--aa-border-strong);
  background: #f7faff;
}

#appAccounts .aa-note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

#appAccounts .aa-panel-actions {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  margin-top: 18px !important;
  padding-top: 16px;
  border-top: 1px solid #edf1f5;
}

#appAccounts .aa-panel-actions .admin-status {
  min-width: 0;
  margin: 0;
  line-height: 1.55;
}

#appAccounts .aa-maintenance-actions {
  display: grid;
  gap: 12px;
}

#appAccounts .aa-maintenance-actions > div {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--aa-border);
  border-radius: 12px;
  background: #fafcff;
}

#appAccounts .aa-maintenance-actions strong {
  color: var(--aa-text);
  font-size: 13px;
}

#appAccounts .aa-maintenance-actions small {
  font-size: 11px;
  line-height: 1.5;
}

#appAccounts .aa-maintenance-actions button {
  width: 100%;
  margin-top: 4px;
}

#appAccounts .aa-maintenance-actions .aa-danger-action {
  border-color: #f0d4d6;
  background: #fff9f9;
}

#appAccounts .aa-system-panel .aa-relink-line {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  align-items: end !important;
  gap: 12px !important;
  margin-top: 0 !important;
}

#appAccounts .aa-system-panel .aa-relink-line > button {
  grid-column: 1 / -1;
  width: 100% !important;
  min-height: 42px;
}

@media (max-width: 1280px) {
  #appAccounts .aa-system-panel .aa-system-grid > .aa-module-card,
  #appAccounts .aa-system-panel .aa-system-grid > .aa-maintenance-card,
  #appAccounts .aa-system-panel .aa-system-grid > .aa-relink-card {
    grid-column: 1 / -1 !important;
    grid-row: auto;
  }

  #appAccounts .aa-maintenance-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  #appAccounts .aa-tabs {
    display: flex !important;
    width: 100% !important;
    overflow-x: auto;
  }

  #appAccounts .aa-tab {
    flex: 0 0 auto;
    min-width: 118px !important;
  }

  #appAccounts .aa-system-panel .aa-system-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #appAccounts .aa-system-panel .aa-system-grid > .aa-system-card {
    grid-column: 1 !important;
    padding: 17px !important;
    border-radius: 13px !important;
  }

  #appAccounts .aa-system-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  #appAccounts .aa-service-switch {
    flex-basis: auto;
    width: 100%;
    box-sizing: border-box;
  }

  #appAccounts .aa-version-gates,
  #appAccounts .aa-system-panel .inline,
  #appAccounts .aa-platform-link-grid,
  #appAccounts .aa-option-grid,
  #appAccounts .aa-note-grid,
  #appAccounts .aa-maintenance-actions,
  #appAccounts .aa-system-panel .aa-relink-line {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #appAccounts .aa-setting-row {
    min-height: 68px;
  }

  #appAccounts .aa-panel-actions {
    align-items: stretch !important;
    flex-direction: column;
  }

  #appAccounts .aa-panel-actions > button {
    width: 100%;
  }
}

/* Dev28: denser operations workspace without changing existing actions. */
#appAccounts .aa-tabs {
  align-items: stretch;
}

#appAccounts .aa-tabs > .aa-tab,
body.can-manage-ops-admins #appAccounts .aa-tabs > .aa-tab.admin-only {
  display: flex !important;
  align-items: center;
  justify-content: center;
  height: 38px;
  min-height: 38px;
  margin: 0;
  line-height: 1.2;
}

#appAccounts .aa-version-gates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0;
}

#appAccounts .aa-version-gate {
  min-width: 0;
  padding: 12px;
  border: 1px solid #dfe8f2;
  border-radius: 10px;
  background: #f8fbfe;
}

#appAccounts .aa-version-gate > strong {
  display: block;
  margin-bottom: 9px;
  color: #173b63;
  font-size: 13px;
}

#appAccounts .aa-version-gate .hint {
  margin: 8px 0 0;
  line-height: 1.55;
}

.pm-account-row td {
  background: #f7fbff;
  border-top: 1px solid #dce8f4;
}

.pm-account-row:hover td {
  background: #eef6ff;
}

.pm-account-row td:first-child {
  position: relative;
  padding-left: 70px;
}

.pm-group-toggle {
  position: absolute;
  top: 50%;
  left: 11px;
  width: 48px;
  min-width: 48px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  transform: translateY(-50%);
  border: 1px solid #c7d9ec;
  border-radius: 6px;
  background: #fff;
  box-shadow: none;
  color: #245581;
  font-size: 11px;
  font-weight: 800;
}

.pm-group-toggle:hover {
  border-color: #8fb7dc;
  background: #eaf4ff;
}

.pm-session-detail td {
  background: #fff;
  color: #42566d;
}

.pm-session-detail td:first-child {
  padding-left: 20px;
}

.pm-session-indent {
  display: inline-flex;
  margin-right: 8px;
  padding: 2px 6px;
  border-radius: 5px;
  background: #eef2f6;
  color: #738399;
  font-size: 10px;
  font-weight: 800;
}

.pm-session-detail[hidden] {
  display: none !important;
}

#customerService .cs-layout {
  grid-template-columns: minmax(340px, .9fr) minmax(520px, 1.45fr) minmax(340px, .9fr);
  gap: 18px;
}

#customerService .cs-list-pane,
#customerService .cs-chat-pane,
#customerService .cs-side-pane > * {
  border: 1px solid #dfe7f0;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(22, 55, 92, .07);
}

#customerService .cs-list-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(247, 251, 255, .98), rgba(255, 255, 255, .98));
}

.cs-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.cs-list-heading b,
.cs-list-heading span {
  display: block;
}

.cs-list-heading b {
  color: #153a63;
  font-size: 15px;
}

.cs-list-heading span {
  margin-top: 2px;
  color: #8391a3;
  font-size: 11px;
}

#customerService .cs-filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid #e2eaf3;
  border-radius: 12px;
  background: #fff;
}

#customerService .cs-filter-bar > label {
  min-width: 0;
  margin: 0;
}

#customerService .cs-filter-bar .inline-check {
  display: flex;
  align-items: center;
  align-self: center;
  min-height: 38px;
  padding: 0 4px;
  white-space: nowrap;
}

#customerService .cs-filter-bar button {
  height: 38px;
  min-height: 38px;
  padding: 0 13px;
}

.cs-conversation-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 3px;
}

.cs-conversation-card {
  display: block;
  width: 100%;
  min-height: 76px;
  padding: 12px 13px;
  border: 1px solid #e4ebf3;
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
  color: #1f2d3d;
  text-align: left;
}

.cs-conversation-card:hover {
  border-color: #b9d2ea;
  background: #f7fbff;
}

.cs-conversation-card.is-active {
  border-color: #7daed9;
  background: linear-gradient(135deg, #edf6ff, #f8fbff);
  box-shadow: inset 3px 0 0 #1768ad;
}

.cs-conversation-topline,
.cs-conversation-bottomline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.cs-conversation-topline strong {
  overflow: hidden;
  color: #173b63;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cs-conversation-topline time {
  flex: 0 0 auto;
  color: #8a98a9;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.cs-conversation-bottomline {
  margin-top: 8px;
}

.cs-conversation-preview {
  min-width: 0;
  overflow: hidden;
  color: #69798b;
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cs-unread-badge,
.cs-read-state {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 800;
}

.cs-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #1768ad;
  color: #fff;
}

.cs-read-state {
  color: #a0aab7;
}

.cs-conversation-empty {
  padding: 36px 16px;
  color: #8b98a8;
  text-align: center;
}

#customerService .cs-chat-pane {
  overflow: hidden;
}

#customerService .cs-chat-head {
  min-height: 64px;
  padding: 13px 16px;
  background: linear-gradient(180deg, #fff, #f9fbfe);
}

#customerService .cs-chat-body {
  background: linear-gradient(180deg, #f5f8fc, #f9fbfd);
}

#customerService .cs-student,
#customerService .cs-orders {
  border-radius: 16px;
}

.fin-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e7edf4;
  border-radius: 10px;
  background: #fff;
}

.fin-table-wrap .table {
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  table-layout: auto;
}

.fin-order-table {
  min-width: 1040px;
}

.fin-refund-table {
  min-width: 860px;
}

.fin-table-wrap th,
.fin-table-wrap td {
  padding: 11px 13px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.fin-table-wrap th {
  background: #f5f8fc;
  color: #65758a;
  font-size: 12px;
  letter-spacing: .02em;
}

.fin-table-wrap td {
  border-top: 1px solid #edf1f5;
  color: #33465b;
  font-size: 13px;
}

.fin-table-wrap td:nth-child(3),
.fin-refund-table td:nth-child(5) {
  min-width: 180px;
  white-space: normal;
}

.fin-table-wrap td[colspan] {
  padding: 28px 16px;
  text-align: center;
}

@media (max-width: 1400px) {
  #customerService .cs-layout {
    grid-template-columns: minmax(320px, .9fr) minmax(460px, 1.4fr);
  }

  #customerService .cs-side-pane {
    display: none;
  }
}

@media (max-width: 860px) {
  #appAccounts .aa-version-gates {
    grid-template-columns: minmax(0, 1fr);
  }

  #customerService .cs-layout {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
  }

  #customerService .cs-list-pane {
    min-height: 420px;
  }

  #customerService .cs-filter-bar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  #customerService .cs-filter-bar .inline-check {
    grid-column: 1 / -1;
  }
}

/* Dev27: App system controls and playback monitoring stay aligned at every width. */
#appAccounts .aa-tabs {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(100%, 620px) !important;
  gap: 4px !important;
}

#appAccounts .aa-tab {
  width: 100%;
  min-width: 0 !important;
  padding-inline: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}

#appAccounts .aa-system-grid {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 14px !important;
  align-items: start;
}

#appAccounts .aa-system-grid > .aa-work-card {
  grid-column: span 6;
  min-width: 0;
  margin: 0;
}

#appAccounts .aa-system-grid > .aa-danger-card {
  grid-column: 1 / -1;
}

#appAccounts .aa-system-grid .inline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#appAccounts .aa-relink-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

#appAccounts .aa-relink-line select,
#appAccounts .aa-relink-line button {
  width: 100%;
  min-width: 0;
}

.playback-monitor {
  min-width: 0;
  margin-top: 16px;
  padding: 20px;
  overflow: hidden;
}

.playback-monitor-head,
.playback-monitor-head-actions,
.pm-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.playback-monitor-head h2,
.pm-section-title h3 {
  margin: 0;
}

.playback-monitor-head-actions {
  justify-content: flex-end;
}

.playback-monitor-intro,
.playback-compat-note {
  margin: 8px 0 0;
}

.playback-compat-note {
  color: #697a8d;
  font-size: 12px;
}

.pm-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) minmax(130px, .7fr) minmax(130px, .7fr) auto minmax(270px, 1fr);
  align-items: end;
  gap: 10px;
  margin-top: 16px;
}

.pm-toolbar > label {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
  color: #5f7085;
  font-size: 12px;
  font-weight: 800;
}

.pm-toolbar input,
.pm-toolbar select,
.pm-toolbar button {
  width: 100%;
  min-width: 0;
  height: 42px;
  box-sizing: border-box;
}

.pm-query {
  min-width: 72px !important;
}

.pm-freeze-control {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto;
  align-items: end;
  gap: 8px;
  min-width: 0;
}

.pm-freeze-control button {
  width: auto;
  white-space: nowrap;
}

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

.pm-metrics > div {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #e0e8f1;
  border-radius: 7px;
  background: rgba(255, 255, 255, .78);
}

.pm-metrics span,
.pm-metrics strong {
  display: block;
}

.pm-metrics span {
  color: #748296;
  font-size: 12px;
}

.pm-metrics strong {
  margin-top: 3px;
  color: #173b63;
  font-size: 20px;
}

.pm-cdn-section {
  border-color: #cfe0f1;
  background:
    radial-gradient(circle at 94% 4%, rgba(39, 122, 189, .12), transparent 30%),
    linear-gradient(135deg, rgba(247, 251, 255, .96), rgba(255, 252, 246, .92));
}

.pm-cdn-title > div:first-child {
  min-width: 0;
}

.pm-cdn-title > div:first-child span {
  display: block;
  margin-top: 4px;
}

.pm-cdn-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: min(100%, 440px);
}

.pm-cdn-actions button {
  flex: 0 0 auto;
  min-height: 36px;
  white-space: nowrap;
}

.pm-cdn-status {
  min-width: 0;
  color: #567089 !important;
  text-align: right;
  overflow-wrap: anywhere;
}

.pm-cdn-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 4px 0 12px;
  padding: 10px 12px;
  border: 1px solid #d9e7f4;
  border-radius: 7px;
  color: #5d7084;
  background: rgba(235, 245, 255, .72);
  font-size: 12px;
  line-height: 1.55;
}

.pm-cdn-note strong {
  flex: 0 0 auto;
  color: #1f5f94;
}

.pm-cdn-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 12px;
}

.pm-cdn-metrics > div {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #dce7f1;
  border-radius: 7px;
  background: rgba(255, 255, 255, .84);
}

.pm-cdn-metrics span,
.pm-cdn-metrics strong {
  display: block;
}

.pm-cdn-metrics span {
  color: #718296;
  font-size: 11px;
}

.pm-cdn-metrics strong {
  margin-top: 3px;
  color: #124b79;
  font-size: 18px;
}

.pm-cdn-table {
  min-width: 1480px;
}

.pm-cdn-table tr.is-risk.is-high td {
  background: #fff2f0;
}

.pm-cdn-table tr.is-risk.is-medium td {
  background: #fffaf0;
}

.pm-cdn-risk {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: 0 0 5px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef4f0;
  color: #387252;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.pm-cdn-risk.is-high {
  background: #ffe4e0;
  color: #b42318;
}

.pm-cdn-risk.is-medium {
  background: #fff0ce;
  color: #936111;
}

.pm-cdn-table td:last-child .pm-row-action {
  display: block;
  margin-top: 6px;
}

.pm-cdn-error {
  padding: 26px !important;
  text-align: center !important;
}

.pm-cdn-error strong,
.pm-cdn-error span,
.pm-cdn-error small {
  display: block;
}

.pm-cdn-error strong {
  color: #8d342c;
}

.pm-cdn-error span,
.pm-cdn-error small {
  margin-top: 5px;
  color: #7a6a69;
  font-size: 12px;
}

.pm-cdn-warnings {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 7px;
  color: #7b5a1d;
  background: #fff5dc;
  font-size: 12px;
}

.pm-cdn-warnings[hidden] {
  display: none;
}

.pm-section {
  min-width: 0;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #e0e8f1;
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
}

.pm-section-title {
  margin-bottom: 10px;
}

.pm-section-title span {
  color: #748296;
  font-size: 12px;
}

.pm-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e4eaf1;
  border-radius: 7px;
  background: #fff;
}

.pm-table {
  width: 100%;
  min-width: 1380px;
  margin: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.pm-anomaly-table {
  min-width: 1120px;
}

.pm-table th,
.pm-table td {
  padding: 10px 11px;
  border-bottom: 1px solid #edf1f5;
  vertical-align: middle;
  text-align: left;
  overflow-wrap: anywhere;
}

.pm-table th {
  color: #65758a;
  background: #f6f8fb;
  font-size: 12px;
  white-space: nowrap;
}

.pm-table tbody tr:last-child td {
  border-bottom: 0;
}

.pm-table tr.is-risk td {
  background: #fff7f5;
}

.pm-table small {
  display: block;
  margin-top: 3px;
  color: #8190a3;
  font-size: 11px;
}

.pm-phone {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pm-state,
.pm-severity {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  margin-top: 4px;
  padding: 0 7px;
  border-radius: 5px;
  background: #eef2f6;
  color: #65758a;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.pm-state.is-live {
  background: #e4f7ec;
  color: #137a49;
}

.pm-severity.is-high {
  background: #ffe8e8;
  color: #b42318;
}

.pm-severity.is-medium {
  background: #fff1dc;
  color: #98620d;
}

.pm-risk-copy {
  color: #b42318 !important;
}

.pm-row-action {
  min-width: 58px;
  min-height: 32px;
  padding: 0 10px;
}

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

.pm-compact-list {
  display: grid;
  gap: 7px;
}

.pm-compact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #e6ebf1;
  border-radius: 7px;
  background: #fff;
}

.pm-compact-row > div {
  flex: 1 1 auto;
  min-width: 0;
}

.pm-compact-row strong,
.pm-compact-row span,
.pm-compact-row small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.pm-compact-row span,
.pm-compact-row small,
.pm-empty {
  color: #748296;
  font-size: 12px;
}

.pm-compact-row button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 11px;
}

@media (max-width: 1500px) {
  #appAccounts .aa-system-grid > .aa-work-card,
  #appAccounts .aa-system-grid > .aa-danger-card {
    grid-column: 1 / -1;
  }

  .pm-toolbar {
    grid-template-columns: minmax(260px, 1fr) repeat(2, minmax(140px, .5fr)) auto;
  }

  .pm-freeze-control {
    grid-column: 1 / -1;
    width: min(100%, 430px);
  }

  .pm-cdn-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  #appAccounts .aa-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #appAccounts .aa-system-grid .inline,
  #appAccounts .aa-relink-line,
  .pm-toolbar,
  .pm-metrics,
  .pm-cdn-metrics,
  .pm-detail-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #appAccounts .aa-relink-line > span {
    display: none;
  }

  .pm-freeze-control {
    grid-column: auto;
    width: 100%;
  }

  .pm-cdn-title,
  .pm-cdn-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .pm-cdn-actions {
    width: 100%;
    min-width: 0;
  }

  .pm-cdn-status {
    text-align: left;
  }
}

@media (max-width: 600px) {
  .playback-monitor {
    padding: 14px;
  }

  .playback-monitor-head,
  .pm-section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .pm-freeze-control {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Dev30: account-level playback risk workspace from the approved Figma redesign. */
#security.active {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#security [hidden] {
  display: none !important;
}

#security .playback-monitor {
  order: 0;
  margin-top: 0;
  padding: 22px;
  border-color: #dfe8f3;
  border-radius: 16px;
  background: #fff;
}

#security .pm-settings-shell {
  order: 1;
  display: grid;
  gap: 16px;
}

.playback-monitor button,
.pm-settings-shell button,
.pm-row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 38px;
  min-height: 38px;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
}

.playback-monitor :is(strong, b, time, .pm-tab-count, .pm-risk-score, .pm-phone),
.pm-settings-shell :is(strong, b, input[type="number"]) {
  font-variant-numeric: tabular-nums;
}

.playback-monitor-head {
  min-height: 48px;
}

.playback-monitor-head-actions > * {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
}

.playback-monitor-head-actions button,
.pm-cdn-actions button {
  min-width: 82px;
}

.pm-evidence-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #d8e9f8;
  border-radius: 12px;
  color: #5d7084;
  background: #f8fbff;
  font-size: 12px;
  line-height: 1.6;
}

.pm-evidence-note-copy {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.pm-evidence-note-copy strong {
  flex: 0 0 auto;
  color: #07366f;
}

.pm-evidence-sync {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.pm-evidence-sync > * {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
}

.pm-evidence-sync button {
  min-width: 82px;
}

.pm-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 8px;
  overflow-x: auto;
  border: 1px solid #dfe8f3;
  border-radius: 12px;
  background: #fff;
}

.pm-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: max-content;
  min-height: 38px;
  padding: 0 13px;
  border: 0;
  border-radius: 9px;
  color: #667085;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  box-shadow: none;
}

.pm-tab:hover {
  color: #07366f;
  background: #f2f7fc;
}

.pm-tab.is-active {
  color: #fff;
  background: #07366f;
}

.pm-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  color: #075fae;
  background: #eaf4ff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  flex: 0 0 auto;
}

.pm-tab.is-active .pm-tab-count {
  color: #07366f;
  background: #fff;
}

#security .pm-toolbar {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #e4ebf3;
  border-radius: 12px;
  background: #f7faff;
}

#security .pm-toolbar input,
#security .pm-toolbar select,
#security .pm-toolbar button {
  height: 40px;
  min-height: 40px;
}

#security .pm-toolbar input,
#security .pm-toolbar select {
  margin: 0;
}

#security .pm-query {
  padding-inline: 18px;
}

#security .pm-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

#security .pm-metrics > div {
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 16px;
  border-radius: 13px;
  background: #fff;
}

#security .pm-metrics > div.is-danger {
  border-color: #f3d7da;
  background: #fff1f2;
}

#security .pm-metrics > div.is-warning {
  border-color: #f1e2bd;
  background: #fff7e6;
}

#security .pm-metrics > div.is-success {
  border-color: #d2eadf;
  background: #eaf8f2;
}

#security .pm-metrics > div.is-danger strong { color: #c23b47; }
#security .pm-metrics > div.is-warning strong { color: #b26a00; }
#security .pm-metrics > div.is-success strong { color: #16825d; }

#security .pm-metrics strong {
  display: flex;
  align-items: center;
  min-height: 31px;
  margin-top: 4px;
  font-size: 26px;
  line-height: 1;
}

#security .pm-metrics small {
  display: block;
  min-height: 16px;
  margin-top: 6px;
  color: #748296;
  font-size: 11px;
  line-height: 1.35;
}

.pm-risk-panel {
  margin-top: 14px;
}

.pm-risk-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 480px);
  align-items: stretch;
  gap: 14px;
}

.pm-risk-list-card {
  min-width: 0;
  margin-top: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
}

.pm-risk-list-card > .pm-section-title {
  min-height: 66px;
  margin: 0;
  padding: 12px 14px;
}

.pm-risk-list-card .pm-section-title > div {
  min-width: 0;
}

.pm-risk-list-card .pm-section-title > div span {
  display: block;
  margin-top: 3px;
}

.pm-summary-chip {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #936111 !important;
  background: #fff5dc;
  white-space: nowrap;
}

.pm-summary-chip b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  margin-right: 3px;
  line-height: 1;
}

.pm-risk-list-card .pm-table-wrap {
  border: 0;
  border-top: 1px solid #e4eaf1;
  border-radius: 0;
}

.pm-risk-table {
  min-width: 820px;
  table-layout: fixed;
}

.pm-risk-table th:nth-child(1) { width: 16%; }
.pm-risk-table th:nth-child(2) { width: 11%; }
.pm-risk-table th:nth-child(3) { width: 28%; }
.pm-risk-table th:nth-child(4) { width: 18%; }
.pm-risk-table th:nth-child(5) { width: 15%; }
.pm-risk-table th:nth-child(6) { width: 12%; text-align: center; }

.pm-risk-table td:last-child {
  text-align: center;
}

.pm-risk-table td:last-child .pm-row-action,
.pm-anomaly-table td:last-child .pm-row-action,
.pm-cdn-table td:last-child .pm-row-action {
  display: inline-flex;
  width: 76px;
  height: 32px;
  min-height: 32px;
  margin: 0 auto;
  padding: 0 10px;
}

.pm-cdn-table td:last-child .pm-row-action {
  margin-top: 6px;
}

.pm-anomaly-table th:last-child,
.pm-anomaly-table td:last-child,
.pm-cdn-table th:last-child,
.pm-cdn-table td:last-child {
  text-align: center;
}

.pm-risk-row.is-selected td {
  background: #f3f8fe;
}

.pm-risk-row.is-selected td:first-child {
  box-shadow: inset 3px 0 #75b2e6;
}

.pm-risk-level,
.pm-evidence-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  vertical-align: middle;
}

.pm-risk-level.is-high {
  color: #c23b47;
  background: #fff1f2;
}

.pm-risk-level.is-medium {
  color: #a05f00;
  background: #fff4da;
}

.pm-risk-level.is-low {
  color: #075fae;
  background: #eaf4ff;
}

.pm-risk-score {
  display: block;
  margin-top: 5px;
  color: #c23b47;
  font-size: 11px;
}

.pm-evidence-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.pm-evidence-badge.is-confirmed {
  color: #c23b47;
  background: #fff1f2;
}

.pm-evidence-badge.is-warning {
  color: #a05f00;
  background: #fff4da;
}

.pm-evidence-badge.is-reported {
  color: #6e55c9;
  background: #f2eeff;
}

.pm-evidence-badge.is-neutral {
  color: #075fae;
  background: #eaf4ff;
}

.pm-evidence-drawer {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dfe8f3;
  border-radius: 12px;
  background: #fff;
}

.pm-evidence-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  color: #fff;
  background: #07366f;
}

.pm-evidence-head h3 {
  margin: 0;
  font-size: 17px;
}

.pm-evidence-head span {
  display: block;
  margin-top: 4px;
  color: #cfe3f6;
  font-size: 11px;
}

.pm-evidence-head > strong {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: #c23b47;
  background: #fff;
  line-height: 1;
}

.pm-evidence-head > strong small {
  display: block;
  margin-top: 4px;
  color: #7b8798;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.pm-evidence-body {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.pm-evidence-verdict,
.pm-evidence-section {
  padding: 9px 10px;
  border: 1px solid #dfe8f3;
  border-radius: 10px;
  background: #f7faff;
}

.pm-evidence-verdict.is-high {
  border-color: #f1d0d4;
  color: #c23b47;
  background: #fff1f2;
}

.pm-evidence-verdict.is-medium {
  border-color: #f0dfb6;
  color: #a05f00;
  background: #fff7e6;
}

.pm-evidence-verdict p,
.pm-evidence-section p {
  margin: 5px 0 0;
  color: #667085;
  font-size: 11px;
  line-height: 1.55;
}

.pm-evidence-section > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pm-evidence-section > .pm-evidence-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 9px;
}

.pm-evidence-metric-grid > div {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #e3eaf2;
  border-radius: 8px;
  background: #fff;
}

.pm-evidence-metric-grid span,
.pm-evidence-metric-grid strong,
.pm-evidence-metric-grid small {
  display: block;
}

.pm-evidence-metric-grid span {
  color: #8190a3;
  font-size: 10px;
}

.pm-evidence-metric-grid strong {
  margin-top: 3px;
  color: #173b63;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.pm-evidence-metric-grid small {
  margin-top: 3px;
  color: #8a96a7;
  font-size: 9px;
  line-height: 1.35;
}

.pm-evidence-observations {
  padding: 9px 10px;
  border: 1px solid #d9e7f4;
  border-radius: 10px;
  color: #52677d;
  background: #f6faff;
  font-size: 11px;
}

.pm-evidence-observations ul {
  margin: 6px 0 0;
  padding-left: 17px;
}

.pm-evidence-observations li + li {
  margin-top: 3px;
}

.pm-session-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 12px;
}

.pm-session-metrics > div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #e0e8f1;
  border-radius: 10px;
  background: #f8fbff;
}

.pm-session-metrics span,
.pm-session-metrics strong {
  display: block;
}

.pm-session-metrics span {
  color: #748296;
  font-size: 11px;
}

.pm-session-metrics strong {
  margin-top: 4px;
  color: #173b63;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.pm-anomaly-table {
  min-width: 1720px;
}

.pm-anomaly-table tr.is-review td {
  background: #fffaf0;
}

.pm-anomaly-table th:nth-child(1) { width: 12%; }
.pm-anomaly-table th:nth-child(2) { width: 9%; }
.pm-anomaly-table th:nth-child(3) { width: 11%; }
.pm-anomaly-table th:nth-child(4) { width: 10%; }
.pm-anomaly-table th:nth-child(5) { width: 12%; }
.pm-anomaly-table th:nth-child(6) { width: 12%; }
.pm-anomaly-table th:nth-child(7) { width: 13%; }
.pm-anomaly-table th:nth-child(8) { width: 9%; }
.pm-anomaly-table th:nth-child(9) { width: 7%; }
.pm-anomaly-table th:nth-child(10) { width: 5%; }

#security .pm-cdn-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#security :is(.pm-metrics, .pm-cdn-metrics, .pm-session-metrics) strong,
#security :is(.pm-risk-score, .pm-phone, .pm-table td) {
  font-variant-numeric: tabular-nums;
}

.pm-evidence-timeline h4 {
  margin: 0 0 8px;
}

.pm-evidence-timeline > div {
  display: grid;
  grid-template-columns: 76px 52px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 4px 0;
  color: #667085;
  font-size: 11px;
}

.pm-evidence-timeline time {
  color: #075fae;
  font-weight: 800;
}

.pm-evidence-timeline > div > strong {
  color: #14253d;
}

.pm-evidence-note-field {
  display: grid;
  gap: 5px;
  margin: 0;
  color: #667085;
  font-size: 11px;
  font-weight: 800;
}

.pm-evidence-note-field textarea {
  width: 100%;
  min-height: 58px;
  resize: vertical;
  box-sizing: border-box;
}

.pm-evidence-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.pm-evidence-actions button {
  min-width: 88px;
}

#security .pm-section-title > span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  line-height: 1.2;
}

#security .pm-section-title > span > b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  line-height: 1;
}

#security .pm-detail-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

#security .pm-detail-grid .pm-section {
  margin-top: 0;
}

.pm-severity.is-ok {
  color: #16825d;
  background: #eaf8f2;
}

@media (max-width: 1380px) {
  #security .pm-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pm-risk-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .pm-evidence-drawer {
    width: 100%;
  }

  #security .pm-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pm-session-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  #security .pm-tabs {
    align-items: stretch;
  }

  #security .pm-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  #security .pm-cdn-metrics,
  .pm-session-metrics,
  .pm-evidence-section > .pm-evidence-metric-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pm-evidence-note,
  .pm-evidence-note-copy,
  .pm-evidence-section > .pm-evidence-section-head,
  .pm-evidence-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .pm-evidence-sync {
    width: 100%;
    justify-content: space-between;
  }

  .pm-evidence-actions button {
    width: 100%;
  }
}

/* AI择校运营 */
#aiSchool .ai-session-row { cursor: pointer; }
#aiSchool .ai-session-row:hover { background: rgba(0,0,0,0.04); }
#aiSchool .ai-session-detail { margin-top: 12px; display: block; }
#aiSchool .ai-session-head { font-weight: 600; margin-bottom: 8px; }
#aiSchool .ai-turn { display: flex; gap: 8px; padding: 6px 0; border-top: 1px solid rgba(0,0,0,0.06); }
#aiSchool .ai-turn b { flex: 0 0 32px; color: #888; font-weight: 600; }
#aiSchool .ai-turn.user b { color: #2b6cb0; }
#aiSchool .ai-turn span { white-space: pre-wrap; }

/* AI择校 展示配置表单 */
.ai-config-panel { margin-bottom: 16px; }
.ai-config-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.ai-config-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #444; }
.ai-config-form input, .ai-config-form textarea { width: 100%; box-sizing: border-box; }
.ai-config-form .ai-config-wide { grid-column: 1 / -1; }
.ai-config-form .check-row { flex-direction: row; flex-wrap: wrap; gap: 16px; align-items: center; }
.ai-config-form .check-group { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 6px 0; border-top: 1px solid #eee; }
.ai-config-form .ai-config-grouptitle { width: 100%; font-weight: 600; color: #333; font-size: 13px; }
.nav .nav-group-title { padding: 14px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: #9aa6b4; text-transform: uppercase; }
.nav .nav-group-title:first-child { padding-top: 2px; }
.logo-upload { display: flex; gap: 14px; align-items: center; margin: 8px 0 14px; padding: 12px; border: 1px dashed #d6e1ee; border-radius: 10px; background: #fafcff; }
.logo-upload-preview { width: 64px; height: 64px; border-radius: 50%; background: #eef4fb; display: flex; align-items: center; justify-content: center; overflow: hidden; flex: 0 0 64px; }
.logo-upload-preview img { width: 100%; height: 100%; object-fit: cover; display: none; }
.logo-upload-preview .muted { font-size: 10px; text-align: center; padding: 0 4px; line-height: 1.3; }
.logo-upload-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.logo-pick { cursor: pointer; display: inline-block; }
.logo-upload-actions .ok { color: #1a7f37; font-size: 12px; }
.logo-upload-actions .bad { color: #c0392b; font-size: 12px; }
.chart-manager { margin-top: 12px; padding: 12px; border: 1px dashed #d6e1ee; border-radius: 10px; background: #fafcff; }
.chart-admin-list { margin: 8px 0; }
.chart-admin-item { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; border-bottom: 1px solid #eef2f7; font-size: 13px; }
.chart-add-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.chart-add-row textarea { flex: 1 1 100%; box-sizing: border-box; }
/* 图表管理预览 */
.chart-admin-item { padding: 8px; border: 1px solid #eef2f7; border-radius: 8px; margin-bottom: 8px; }
.chart-admin-meta { display: flex; align-items: center; gap: 10px; }
.chart-admin-meta b { font-size: 13px; }
.chart-admin-meta button { margin-left: auto; }
.chart-admin-pv { margin-top: 8px; }
.chart-admin-pv img { max-width: 220px; max-height: 140px; border-radius: 6px; border: 1px solid #eef2f7; }
.chart-pv-bars { display: flex; flex-direction: column; gap: 4px; }
.chart-pv-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.chart-pv-row span { flex: 0 0 90px; color: #555; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart-pv-row i { height: 12px; background: linear-gradient(90deg,#0a5ca5,#07366f); border-radius: 999px; min-width: 2px; }
.chart-pv-row b { color: #07366f; }
.logo-pick { cursor: pointer; }
/* 学生端效果预览 */
.school-preview { margin: 0 0 16px; }
.sp-kicker { font-size: 11px; letter-spacing: 0.06em; color: #9aa6b4; text-transform: uppercase; margin-bottom: 6px; }
.sp-card { background: #f4f8fd; border: 1px solid rgba(7,54,111,0.10); border-radius: 14px; padding: 14px; max-width: 380px; }
.sp-header { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg,#0a5ca5,#07366f); color: #fff; border-radius: 12px; padding: 12px; }
.sp-logo { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; overflow: hidden; flex: 0 0 44px; }
.sp-logo img { width: 100%; height: 100%; object-fit: cover; }
.sp-head-main { flex: 1 1 auto; min-width: 0; }
.sp-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.sp-tags span { font-size: 10px; background: rgba(255,255,255,0.18); padding: 1px 8px; border-radius: 999px; }
.sp-name { font-size: 18px; font-weight: 800; }
.sp-score { text-align: right; font-size: 24px; font-weight: 800; }
.sp-score small { display: block; font-size: 10px; font-weight: 500; opacity: 0.85; }
.sp-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.sp-chips b { font-size: 11px; color: #71849b; flex: 0 0 28px; }
.sp-chips span { font-size: 12px; background: rgba(7,54,111,0.07); color: #07366f; padding: 3px 10px; border-radius: 999px; }
.sp-metrics { display: flex; gap: 8px; margin-top: 12px; }
.sp-metrics div { flex: 1 1 0; background: #fff; border: 1px solid rgba(7,54,111,0.08); border-radius: 10px; padding: 8px; text-align: center; }
.sp-metrics b { display: block; font-size: 18px; color: #07366f; }
.sp-metrics span { font-size: 11px; color: #8a98a8; }
.sp-charts { margin-top: 12px; }
.sp-charts > b { font-size: 11px; color: #71849b; }
.sp-chart { background: #fff; border: 1px solid rgba(7,54,111,0.08); border-radius: 10px; padding: 8px; margin-top: 6px; font-size: 12px; }
.sp-chart > span { font-weight: 700; color: #07366f; display: block; margin-bottom: 4px; }
.sp-chart img { max-width: 100%; border-radius: 6px; }
/* 顶栏按钮不再挤成一团：自动换行 */
.topbar { align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.top-actions { flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.top-actions button, .top-actions .admin-badge { white-space: nowrap; }

/* ===== 在线客服 ===== */
.cs-layout { display: grid; grid-template-columns: minmax(260px, 0.85fr) minmax(380px, 1.5fr) minmax(300px, 0.95fr); gap: 16px; align-items: stretch; height: calc(100vh - 240px); min-height: 520px; }
@media (max-width: 1100px) { .cs-layout { grid-template-columns: minmax(240px, 1fr) minmax(320px, 1.4fr); } .cs-side-pane { display: none; } }
@media (max-width: 760px) { .cs-layout { grid-template-columns: 1fr; height: auto; } }
.cs-list-pane { overflow-y: auto; }
.cs-list-pane .table { margin-top: 8px; }
.cs-side-pane { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.cs-student { background: #fff; border: 1px solid #e6e9ef; border-radius: 14px; padding: 16px; }
.cs-stu-hd { display: flex; align-items: center; gap: 12px; }
.cs-stu-av { width: 46px; height: 46px; border-radius: 50%; background: #eef4fb; color: #075fae; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: 0 0 46px; }
.cs-stu-nm { font-size: 15px; font-weight: 700; color: #16130e; }
.cs-stu-sub { font-size: 12px; color: #8a93a3; margin-top: 2px; }
.cs-stu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.cs-stu-cell { background: #f7f9fc; border-radius: 10px; padding: 10px; text-align: center; }
.cs-stu-cell b { display: block; font-size: 16px; color: #0f2747; }
.cs-stu-cell span { font-size: 11px; color: #8a93a3; }
.cs-last { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #5b6472; }
tr.cs-row-active td { background: #eef4ff; }
.cs-chat-pane { border: 1px solid #e6e9ef; border-radius: 14px; background: #fff; display: flex; flex-direction: column; min-height: 360px; height: 100%; }
.cs-orders { background: #fff; border: 1px solid #e6e9ef; border-radius: 14px; }
.cs-chat-head { padding: 12px 16px; border-bottom: 1px solid #eef0f4; font-weight: 600; color: #1f2733; }
.cs-chat-body { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; background: #f7f9fc; }
.cs-msg { display: flex; flex-direction: column; max-width: 78%; }
.cs-msg-user { align-self: flex-start; align-items: flex-start; }
.cs-msg-agent { align-self: flex-end; align-items: flex-end; }
.cs-bubble { padding: 9px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.cs-msg-user .cs-bubble { background: #fff; border: 1px solid #e6e9ef; border-bottom-left-radius: 4px; color: #1f2733; }
.cs-msg-agent .cs-bubble { background: #2f6bff; color: #fff; border-bottom-right-radius: 4px; }
.cs-meta { font-size: 11px; color: #9aa3b2; margin-top: 3px; }
.cs-reply { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #eef0f4; align-items: flex-end; }
.cs-reply textarea { flex: 1; resize: vertical; min-height: 40px; border: 1px solid #d8dde6; border-radius: 10px; padding: 8px 10px; font: inherit; }
.cs-reply textarea:disabled { background: #f3f4f7; }
.cs-reply button { white-space: nowrap; }

/* ===== 客服面板内的订单 / 退款 ===== */
.cs-orders { border-bottom: 1px solid #eef0f4; max-height: 200px; overflow-y: auto; background: #fbfcfe; }
.cs-orders:empty { display: none; }
.cs-orders-title { font-size: 12px; color: #8a93a3; padding: 8px 14px 4px; font-weight: 600; }
.cs-orders-loading, .cs-orders-empty { padding: 10px 14px; font-size: 12px; color: #9aa3b2; }
.cs-order { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px; border-top: 1px solid #f0f2f6; }
.cs-order:first-of-type { border-top: none; }
.cs-order-main { min-width: 0; flex: 1; }
.cs-order-title { font-size: 13px; color: #1f2733; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-order-sub { font-size: 12px; color: #5b6472; margin-top: 2px; }
.cs-order-no { font-size: 11px; color: #aab2c0; margin-top: 2px; }
.cs-order-track { font-size: 11px; color: #2f6bff; margin-top: 2px; }
.cs-order-actions { flex: 0 0 auto; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.cs-mini { padding: 3px 10px !important; font-size: 12px !important; }
.cs-order-done { font-size: 12px; color: #1aa463; font-weight: 600; }

/* 客服订单·课程解锁状态 */
.cs-order-access { margin-top: 3px; font-size: 11px; }
.cs-order-ok { color: #1aa463; font-weight: 600; }
.cs-order-warn { color: #d9822b; font-weight: 600; }

/* ===== 财务账单 ===== */
.fin-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 14px 0; }
.fin-card { background: #fff; border: 1px solid #e6e9ef; border-radius: 14px; padding: 14px 16px; }
.fin-card-num { font-size: 22px; font-weight: 700; color: #1f2733; }
.fin-card-label { font-size: 12px; color: #8a93a3; margin-top: 4px; }
.fin-card.ok .fin-card-num { color: #1aa463; }
.fin-card.warn .fin-card-num { color: #d9822b; }
.fin-card.big { background: linear-gradient(135deg, #2f6bff, #5a86ff); }
.fin-card.big .fin-card-num, .fin-card.big .fin-card-label { color: #fff; }
.fin-block { background: #fff; border: 1px solid #e6e9ef; border-radius: 14px; padding: 14px 16px; margin: 14px 0; }
.fin-block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.fin-block-head h3 { margin: 0; font-size: 15px; color: #1f2733; }
.fin-kw { border: 1px solid #d8dde6; border-radius: 8px; padding: 5px 10px; font: inherit; }
.fin-series { display: flex; align-items: flex-end; gap: 4px; height: 140px; overflow-x: auto; padding-top: 8px; }
.fin-bar-col { flex: 0 0 auto; width: 22px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.fin-bar { width: 14px; min-height: 2px; background: linear-gradient(180deg, #5a86ff, #2f6bff); border-radius: 4px 4px 0 0; transition: opacity .2s; }
.fin-bar-col:hover .fin-bar { opacity: .75; }
.fin-bar-x { font-size: 9px; color: #aab2c0; margin-top: 4px; transform: rotate(-45deg); white-space: nowrap; }
.fin-neg { color: #d9534f; }

/* ===== 院校服务数据 / 班级 / 负责人账号（新增模块） ===== */
.seg { display: inline-flex; gap: 6px; flex-wrap: wrap; background: #eef2f7; padding: 4px; border-radius: 12px; }
.seg-btn { border: 0; background: transparent; padding: 7px 16px; border-radius: 9px; font-size: 13px; color: #5a6677; cursor: pointer; transition: all .15s; }
.seg-btn:hover { color: #075fae; }
.seg-btn.active { background: #fff; color: #075fae; font-weight: 600; box-shadow: 0 2px 6px rgba(7,95,174,.12); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table thead th { color: #6b7686; font-weight: 600; background: #f7f9fc; white-space: nowrap; }
.data-table code { background: #f1f4f8; padding: 1px 6px; border-radius: 5px; font-size: 12px; }
.data-table tr:hover td { background: #fafbfd; }
.data-table .ghost { padding: 4px 10px; font-size: 12px; }

/* ===== v3 院校编辑器：学院→专业→逐年分数 ===== */
.college-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 12px; background: #fbfcfe; }
.college-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.college-head .col-name { flex: 1; font-weight: 600; }
.college-card .sub-title { font-size: 12px; color: #6b7686; margin: 10px 0 4px; font-weight: 600; }
.college-card .data-table input { width: 100%; box-sizing: border-box; padding: 4px 6px; font-size: 12px; border: 1px solid var(--line); border-radius: 6px; }
.college-card .data-table td { padding: 3px 4px; }

/* ===== 修复：左侧导航内容多时可滚动（底部模块点不到/滚不动）===== */
.nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding-right: 4px; scrollbar-width: thin; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: rgba(8, 52, 98, 0.2); border-radius: 3px; }
.nav::-webkit-scrollbar-track { background: transparent; }

/* ===== 择校库卡片预览（与小程序一致）===== */
.lib-pv-card { border:1px solid var(--line); border-radius:16px; padding:14px; background:#fff; box-shadow:0 6px 18px rgba(8,52,98,.05); max-width:380px; }
.lib-pv-top { display:flex; gap:12px; align-items:flex-start; }
.lib-pv-logo { width:54px; height:54px; border-radius:12px; background:#eef4fb; display:flex; align-items:center; justify-content:center; font-weight:800; color:#075fae; overflow:hidden; flex:0 0 54px; }
.lib-pv-logo img { width:100%; height:100%; object-fit:cover; }
.lib-pv-main { flex:1; min-width:0; }
.lib-pv-name { font-size:17px; font-weight:800; color:#0f2747; display:flex; align-items:center; gap:6px; }
.lib-pv-fav { color:#c9a23e; font-size:16px; }
.lib-pv-tags { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
.lib-pv-tag { font-size:11px; padding:2px 8px; border-radius:20px; background:#eef2f7; color:#5a6677; }
.lib-pv-tag.region { background:#eaf3ff; color:#1666c9; }
.lib-pv-tag.star { background:#fff3df; color:#b8791b; }
.lib-pv-stats { display:flex; gap:10px; margin-top:12px; }
.lib-pv-stats > div { flex:1; background:#f7f9fc; border-radius:10px; padding:8px; text-align:center; }
.lib-pv-stats b { display:block; font-size:18px; color:#0f2747; }
.lib-pv-stats b.hot { color:#e8542f; }
.lib-pv-stats span { font-size:11px; color:#8a94a3; }
.lib-pv-btns { display:flex; gap:8px; margin-top:12px; }
.lib-pv-btn { flex:1; text-align:center; padding:8px; border-radius:10px; font-size:13px; border:1px solid var(--line); color:#5a6677; }
.lib-pv-btn.on { background:linear-gradient(135deg,#0a6fd0,#0e63b6); color:#fff; border-color:transparent; }
.sp-mini-tables { display:flex; flex-direction:column; gap:10px; margin-top:8px; }
.sp-mini-h { font-size:12px; font-weight:600; color:#5a6677; margin-bottom:4px; }

/* ===== v3 编辑器：放开列宽 + 横向滚动 + 数字框去箭头（修"看不全/格子太小"）===== */
.college-card .col-code { max-width: 110px; }
.cols-scroll { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
.college-card .data-table.scores { min-width: 580px; }
.college-card .data-table.majors { min-width: 720px; }
.college-card .data-table th, .college-card .data-table td { white-space: nowrap; }
.college-card .data-table input { width: 100%; box-sizing: border-box; padding: 6px 8px; font-size: 13px; border: 1px solid var(--line); border-radius: 6px; }
.college-card input.c-year { min-width: 66px; text-align: center; }
.college-card input.c-num { min-width: 62px; text-align: center; }
.college-card input.c-mini { min-width: 50px; }
.college-card input.c-wide { min-width: 130px; }
.college-card input.c-major { min-width: 160px; }
.college-card .cell-x { padding: 4px 9px; }
.college-card input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.college-card input[type=number]::-webkit-outer-spin-button,
.college-card input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ===== 顶栏按钮对齐（修歪歪扭扭）===== */
.top-actions { align-items: center; row-gap: 8px; }
.top-actions button, .top-actions .admin-badge {
  height: 38px; min-height: 38px; box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}
/* v3 编辑器列再放宽：长专业名（如 集成电路科学与工程）完整显示 */
.college-card input.c-wide { min-width: 168px; }
.college-card input.c-major { min-width: 184px; }
.college-card input.c-year { min-width: 74px; }
.college-card .data-table.scores { min-width: 660px; }
.college-card .data-table.majors { min-width: 760px; }

/* ===== 展示配置 ===== */
.dc-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.dc-row span { flex: 1; }
.dc-ord { font-size: 12px; color: #075fae; font-style: normal; background: #eaf3ff; padding: 1px 8px; border-radius: 10px; }

/* ===== 修复：展示配置勾选行布局（标签竖排/错位）===== */
.dc-row { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px; padding: 11px 8px; border-bottom: 1px solid var(--line); font-size: 14px; cursor: pointer; }
.dc-row > input[type="checkbox"] { flex: 0 0 18px; width: 18px; height: 18px; margin: 0; }
.dc-row > span { flex: 1 1 auto; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-row .dc-ord { flex: 0 0 auto; font-size: 12px; color: #075fae; font-style: normal; background: #eaf3ff; padding: 2px 10px; border-radius: 10px; white-space: nowrap; }

/* ===== 在线客服 未读红点 ===== */
.nav-dot { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #e8542f; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }

/* ===== 在线客服 聊天工具 + 卡片消息 ===== */
.cs-chat-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.cs-tools { display: inline-flex; gap: 6px; }
.cs-tools .ghost { padding: 5px 12px; font-size: 12px; }
.cs-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: #16130e; display: inline-block; }
.cs-card-offer { background: linear-gradient(135deg,#fff7e8,#ffeccc); border-color: #f0d9a8; }
.cs-card-offer b { font-size: 18px; color: #c0492b; }
.cs-sys-note { font-size: 12px; color: #9a8f60; background: #fbf6e6; border-radius: 8px; padding: 8px 12px; }

/* 客服 改价内联表单 */
.cs-offer-form { background: #fff7e8; border: 1px solid #f0d9a8; border-radius: 10px; padding: 10px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 8px; }
.cs-offer-row { display: flex; gap: 8px; }
.cs-offer-form select, .cs-offer-form input { flex: 1; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; }
.cs-offer-form .primary, .cs-offer-form .ghost { padding: 7px 14px; font-size: 13px; }

/* 侧栏 课程快捷发送 */
.cs-stu-prod-t { font-size: 12px; color: #8a93a3; font-weight: 600; margin: 16px 0 8px; }
.cs-stu-prod { display: flex; flex-direction: column; gap: 6px; }
.cs-prod-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #f7f9fc; border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.cs-prod-row:hover { background: #eef4ff; }
.cs-prod-nm { font-size: 13px; color: #16130e; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-prod-send { font-size: 12px; color: #075fae; flex: 0 0 auto; }
.cs-mini-danger { color: #c0392b !important; border-color: rgba(192,57,43,.3) !important; }

/* 履约：删除/清理 */
.fulfillment-all-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.fulfillment-all-head .ghost.danger {
  white-space: nowrap;
  padding: 6px 12px;
  font-size: 12px;
  align-self: center;
}
button.link-danger {
  background: none;
  border: none;
  box-shadow: none;
  color: #b91c1c;
  padding: 4px 6px;
  font-size: 12px;
  cursor: pointer;
}
button.link-danger:hover { text-decoration: underline; }

/* 课程商品「高级技术设置」折叠 */
.adv-fold { margin: 8px 0; border: 1px dashed var(--line, #dcdcdc); border-radius: 10px; padding: 4px 12px; background: #fafbfc; }
.adv-fold > summary { cursor: pointer; padding: 8px 0; font-size: 13px; color: #6b7280; font-weight: 600; list-style: revert; }
.adv-fold[open] > summary { margin-bottom: 6px; }

/* 核对台内嵌·展示配置 */
.review-dc { margin: 4px 0 12px; }
.rdc-fold { border: 1px dashed var(--line, #d8d8d8); border-radius: 10px; padding: 6px 12px; background: #fafbfd; }
.rdc-fold > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: #3a5a8c; padding: 6px 0; }
.rdc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }
@media (max-width: 900px) { .rdc-grid { grid-template-columns: 1fr; } }
.rdc-title { font-size: 12px; color: #6b7280; margin-bottom: 6px; }
.rdc-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.rdc-move { display: inline-flex; flex-direction: column; }
.rdc-move button { width: 22px; height: 16px; line-height: 14px; padding: 0; font-size: 10px; border: 1px solid var(--line, #ddd); background: #fff; border-radius: 4px; cursor: pointer; color: #555; }
.rdc-move button:hover { background: #eef4ff; }
.rdc-row label, .rdc-drow { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #333; cursor: pointer; }
.rdc-drow { padding: 4px 0; }

/* 核对台·展示配置 紧凑胶囊版（覆盖表单全局样式）*/
details.rdc2 { border: 1px dashed #d8dce6; border-radius: 10px; padding: 4px 12px; background: #fafbfd; margin: 4px 0 12px; }
details.rdc2 > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: #3a5a8c; padding: 7px 0; list-style: revert; }
.rdc2-sec { margin: 8px 0 12px; }
.rdc2-label { font-size: 12px; color: #6b7280; margin-bottom: 6px; }
#reviewDisplayConfig .rdc2-chips { display: flex; flex-wrap: wrap; gap: 8px; }
#reviewDisplayConfig .rdc2-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; padding: 5px 12px; border: 1px solid #d9dde6; border-radius: 999px; background: #fff; color: #44506a; cursor: pointer; line-height: 1.2; width: auto; }
#reviewDisplayConfig .rdc2-chip.on { background: #0b56a8; border-color: #0b56a8; color: #fff; }
#reviewDisplayConfig .rdc2-chip b { font-weight: 800; background: rgba(255,255,255,.25); border-radius: 50%; width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }

/* 核对台：预览卡 + 展示配置 左右并排 */
.review-top { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 10px; }
.review-top > #schoolPreview { flex: 1 1 320px; min-width: 300px; }
.review-top > .review-dc { flex: 1 1 300px; min-width: 280px; margin: 0; }
.rdc2 { border: 1px solid #e4e8f0; border-radius: 12px; padding: 12px 14px; background: #fafbfd; }
.rdc2-head { font-size: 13px; font-weight: 600; color: #3a5a8c; margin-bottom: 10px; }

/* 展示配置胶囊 · 强制覆盖后台全局按钮样式，选中=蓝底白字 */
#reviewDisplayConfig .rdc2-chips { display: flex; flex-wrap: wrap; gap: 9px; }
#reviewDisplayConfig .rdc2-chip { display: inline-flex !important; align-items: center; gap: 6px; font-size: 13px !important; padding: 6px 14px !important; border-radius: 999px !important; border: 1.5px solid #cfd6e4 !important; background: #fff !important; color: #46506a !important; cursor: pointer; line-height: 1.2 !important; width: auto !important; min-width: 0 !important; box-shadow: none !important; font-weight: 500 !important; transition: all .12s; }
#reviewDisplayConfig .rdc2-chip:hover { border-color: #9bb4dd !important; background: #f4f8ff !important; }
#reviewDisplayConfig .rdc2-chip.on { background: #0b56a8 !important; border-color: #0b56a8 !important; color: #fff !important; font-weight: 700 !important; }
#reviewDisplayConfig .rdc2-chip .ord { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: #fff; color: #0b56a8; font-size: 11px; font-weight: 800; }

/* ===== 展示配置 · 精致版 v2（覆盖前面所有 rdc2 样式）===== */
.review-top { align-items: flex-start !important; }
.review-top > #schoolPreview { flex: 0 1 380px !important; min-width: 300px; }
.review-top > .review-dc { flex: 1 1 320px !important; min-width: 300px; }
#reviewDisplayConfig .rdc2 { border: 1px solid #eceff5 !important; border-radius: 16px !important; padding: 18px 20px !important; background: linear-gradient(180deg,#ffffff,#fbfcfe) !important; box-shadow: 0 2px 12px rgba(20,40,90,.05) !important; }
#reviewDisplayConfig .rdc2-head { font-size: 14px !important; font-weight: 700 !important; color: #1f2a44 !important; margin-bottom: 14px !important; display: flex; align-items: center; gap: 8px; }
#reviewDisplayConfig .rdc2-head::before { content: ''; width: 4px; height: 16px; border-radius: 3px; background: #1858c8; display: inline-block; }
#reviewDisplayConfig .rdc2-sec { margin: 14px 0; }
#reviewDisplayConfig .rdc2-label { font-size: 12.5px !important; color: #6b7488 !important; font-weight: 600 !important; margin-bottom: 9px !important; }
#reviewDisplayConfig .rdc2-chips { display: flex !important; flex-wrap: wrap; gap: 9px; }
#reviewDisplayConfig .rdc2-chip { display: inline-flex !important; align-items: center; gap: 7px; font-size: 13px !important; padding: 7px 15px !important; border-radius: 11px !important; border: 1px solid #e4e8f1 !important; background: #fff !important; color: #46506a !important; cursor: pointer; line-height: 1.15 !important; width: auto !important; min-width: 0 !important; box-shadow: 0 1px 2px rgba(20,40,90,.04) !important; font-weight: 500 !important; transition: all .15s ease !important; }
#reviewDisplayConfig .rdc2-chip:hover { border-color: #bcd0f2 !important; background: #f6f9ff !important; transform: translateY(-1px); box-shadow: 0 3px 8px rgba(24,88,200,.10) !important; }
#reviewDisplayConfig .rdc2-chip.on { background: linear-gradient(135deg,#1d63d6,#1450b8) !important; border-color: #1450b8 !important; color: #fff !important; font-weight: 600 !important; box-shadow: 0 3px 10px rgba(24,88,200,.26) !important; }
#reviewDisplayConfig .rdc2-chip .ord { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: #fff; color: #1450b8; font-size: 11px; font-weight: 800; }
#reviewDisplayConfig .rdc2-chip.nodata { border-style: dashed !important; }
#reviewDisplayConfig .rdc2-chip.on.nodata { background: linear-gradient(135deg,#8194b6,#6d81a8) !important; border-color: #6d81a8 !important; box-shadow: none !important; }
#reviewDisplayConfig .rdc2-nd { font-size: 10px; background: rgba(255,255,255,.22); padding: 1px 6px; border-radius: 6px; color: #fff; margin-left: 1px; }
#reviewDisplayConfig #rdcSave { margin-top: 16px !important; padding: 9px 22px !important; border-radius: 10px !important; font-weight: 600 !important; box-shadow: 0 3px 10px rgba(24,88,200,.22) !important; }

/* ===== 2026-07-03 择校数据页溢出修复 ===== */
/* 右列不再写死 620px 最小宽，窗口窄时不会把内容顶出屏幕 */
.school-data-workbench { grid-template-columns: minmax(340px, 0.58fr) minmax(0, 1fr) !important; }
.school-program-editor { min-width: 0 !important; }
/* 预览卡与"学生端展示配置"改上下堆叠，配置面板永远占满可用宽度、chips 自动换行 */
.review-top { display: block !important; }
.review-top > #schoolPreview { max-width: 460px; }
.review-top > .review-dc { margin: 12px 0 0 !important; max-width: 100%; min-width: 0 !important; }
#reviewDisplayConfig .rdc2 { max-width: 100%; box-sizing: border-box; overflow: hidden; }

/* ===== 班型 SKU 编辑器 ===== */
.sku-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.sku-row { border: 1px solid #e4e8f0; border-radius: 12px; padding: 10px 12px; background: #fafbfd; }
.sku-row-main { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sku-in { border: 1px solid #d9dde6; border-radius: 8px; padding: 7px 10px; font-size: 13px; background: #fff; min-width: 0; }
.sku-row-main .sku-in:first-child { flex: 1 1 140px; }
.sku-in-price { width: 110px; flex: none; }
.sku-in-course { flex: 1 1 200px; }
.sku-in-desc { width: 100%; margin-top: 8px; box-sizing: border-box; }
.sku-mini { padding: 6px 12px !important; font-size: 12px !important; flex: none; }
.sku-del { color: #c0392b !important; }
.sku-lessons { margin-top: 10px; border-top: 1px dashed #e4e8f0; padding-top: 10px; }
.sku-lesson-tools { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #6b7280; margin-bottom: 8px; }
.sku-lesson-list { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.sku-lesson-item { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 5px 6px; border-radius: 8px; cursor: pointer; }
.sku-lesson-item:hover { background: #f0f5ff; }
.sku-lesson-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sku-lesson-dur { flex: none; color: #9aa4b2; font-size: 12px; }
.sku-preview-btn { flex: none; border: 1px solid #e4d9b0; background: #fffdf4; color: #9a7b1d; border-radius: 999px; padding: 2px 10px; font-size: 11px; cursor: pointer; }
.sku-preview-btn.on { background: #b89149; border-color: #b89149; color: #fff; }

/* ===== 千牛式客服增强 + 课程库（2026-07-03）===== */
.cs-quickbar { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 0; }
.cs-quick-chip { border: 1px solid #d9e2f0; background: #f6f9ff; color: #2b4a76; border-radius: 999px; padding: 4px 12px; font-size: 12px; cursor: pointer; }
.cs-quick-chip:hover { background: #e8f0fe; }
.cs-quick-edit { border-style: dashed; color: #8a94a6; background: #fafbfd; }
.cs-profile-extra { margin: 10px 0; border-top: 1px dashed #e4e8f0; padding-top: 10px; }
.cs-pf-line { font-size: 12px; color: #4a5568; margin: 6px 0; line-height: 1.7; }
.cs-pf-input { width: 100%; box-sizing: border-box; border: 1px solid #d9dde6; border-radius: 8px; padding: 5px 10px; font-size: 12px; margin-top: 2px; }
.cs-pf-note { width: 100%; box-sizing: border-box; border: 1px solid #d9dde6; border-radius: 8px; padding: 7px 10px; font-size: 12px; margin: 6px 0; resize: vertical; }
.cs-pf-direction { display: flex; align-items: flex-end; gap: 8px; padding: 9px; border: 1px solid #dce6f3; border-radius: 10px; background: #f7faff; }
.cs-pf-direction label { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 4px; color: #526174; font-size: 12px; font-weight: 700; }
.cs-pf-direction select { width: 100%; min-width: 0; height: 32px; box-sizing: border-box; border: 1px solid #cfdbea; border-radius: 8px; background: #fff; color: #1e3352; padding: 0 8px; font-size: 12px; }
.cs-pf-direction .cs-mini { flex: none; height: 32px; margin: 0; }
.cs-pf-help { margin: 5px 2px 9px; color: #8a94a6; font-size: 11px; line-height: 1.5; }
.nav-dot { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 999px; background: #f04438; color: #fff; font-size: 11px; font-weight: 800; }
.course-lib-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; }
.course-lib-row .product-row-main { min-width: 0; flex: 1; }
.product-row-title { font-size: 14px; font-weight: 700; color: #1f2733; }
.product-row-sub { font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.course-lib-row { padding: 12px 14px; border: 1px solid #e9edf4; border-radius: 12px; background: #fff; margin-bottom: 8px; }
.course-lib-row:hover { border-color: #bcd0f2; background: #f8fbff; }

/* ===== 2026-07-03 课节勾选紧凑化（表单全局 label 样式会把行撑成大卡片，这里强制回单行）===== */
#skuRows .sku-lesson-list, #courseLibLessons { display: grid !important; grid-template-columns: 1fr 1fr; gap: 4px 12px; max-height: 360px; overflow-y: auto; }
#courseLibLessons { grid-template-columns: 1fr; max-height: 560px; }
#skuRows .sku-lesson-item, #courseLibLessons .sku-lesson-item {
  display: flex !important; flex-direction: row !important; align-items: center !important;
  gap: 8px !important; padding: 4px 8px !important; margin: 0 !important;
  font-size: 12.5px !important; font-weight: 400 !important; line-height: 1.3 !important;
  border-radius: 8px; background: transparent !important; width: auto !important; min-height: 0 !important;
}
#skuRows .sku-lesson-item:hover, #courseLibLessons .sku-lesson-item:hover { background: #f0f5ff !important; }
#skuRows .sku-lesson-item input[type="checkbox"] {
  width: 16px !important; height: 16px !important; margin: 0 !important; flex: none !important;
  transform: none !important; appearance: auto !important;
}
#skuRows .sku-lesson-title, #courseLibLessons .sku-lesson-title {
  flex: 1 !important; min-width: 0 !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12.5px !important; font-weight: 400 !important; color: #333 !important; margin: 0 !important;
}
#skuRows .sku-lesson-dur, #courseLibLessons .sku-lesson-dur { flex: none !important; font-size: 11px !important; color: #9aa4b2 !important; margin: 0 !important; }
#skuRows .sku-preview-btn, #courseLibLessons .sku-preview-btn {
  flex: none !important; width: auto !important; padding: 1px 8px !important; margin: 0 !important;
  font-size: 11px !important; border-radius: 999px !important; line-height: 1.6 !important;
  background: #fffdf4 !important; border: 1px solid #e4d9b0 !important; color: #9a7b1d !important;
  height: auto !important; min-height: 0 !important; display: inline-flex !important;
}
#skuRows .sku-preview-btn.on, #courseLibLessons .sku-preview-btn.on { background: #b89149 !important; border-color: #b89149 !important; color: #fff !important; }
#skuRows .sku-lesson-tools { font-size: 12px; }
#skuRows .sku-lesson-tools .sku-mini { padding: 2px 10px !important; font-size: 11.5px !important; height: auto !important; min-height: 0 !important; width: auto !important; }

/* ===== 导航折叠分组 ===== */
.nav-group-toggle { display: flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.nav-group-toggle:hover { color: #0b56a8; }
.nav-group-arrow { margin-left: auto; font-size: 10px; color: #9aa4b2; }
.nav-group-items { display: flex; flex-direction: column; }

/* ============ 2026-07-03 导航紧凑 + 课节列表重排 ============ */
/* 导航：去掉大 gap，折叠组紧凑；分组标题小而密 */
.nav { gap: 2px !important; margin-top: 14px !important; }
.nav .nav-group { margin: 0 0 2px; }
.nav .nav-group-title { padding: 12px 12px 4px !important; margin: 0 !important; }
.nav .nav-group-items { gap: 2px; }
.nav button { height: 40px !important; font-size: 13.5px !important; border-radius: 12px !important; }
.nav .nav-group-toggle { padding: 12px 12px 5px !important; }

/* 课节列表（课程库右栏）：干净单行，序号+标题省略+时长+试看 */
.cl-lesson-list { max-height: 620px; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.cl-lesson-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; font-size: 13px; }
.cl-lesson-item:hover { background: #f2f6fd; }
.cl-lesson-no { flex: none; width: 26px; height: 22px; display: inline-flex; align-items: center; justify-content: center; background: #eef2f8; color: #6b7688; border-radius: 6px; font-size: 11px; font-weight: 700; }
.cl-lesson-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #2a3340; }
.cl-lesson-dur { flex: none; font-size: 11.5px; color: #9aa4b2; font-variant-numeric: tabular-nums; }
.cl-lesson-item .sku-preview-btn { flex: none; }

/* 课程库左列行：清爽卡片 + 选中高亮 */
.course-lib-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px solid #e9edf4; border-radius: 12px; background: #fff; margin-bottom: 8px; cursor: pointer; }
.course-lib-row:hover { border-color: #bcd0f2; background: #f8fbff; }
.course-lib-row.active { border-color: #0b56a8; background: #f0f6ff; box-shadow: inset 3px 0 0 #0b56a8; }
.course-lib-row .product-row-main { min-width: 0; flex: 1; }
.course-lib-acts { display: flex; gap: 6px; flex: none; }
.cl-mini { padding: 5px 12px !important; font-size: 12px !important; height: auto !important; min-height: 0 !important; }

/* 课节徽标：一眼看出有没有视频 / 字幕 / DRM */
.cl-badge { flex: none; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 5px; line-height: 1.5; }
.cl-badge-vod { background: #e6f4ea; color: #1a8f4a; }
.cl-badge-none { background: #fdecea; color: #c0392b; }
.cl-badge-sub { background: #eaf1fd; color: #0b56a8; }
.cl-badge-drm { background: #fff2df; color: #b9770e; }

/* 课节内联编辑面板 */
.cl-lesson-edit { margin: 2px 0 10px 34px; padding: 12px 14px; background: #f7f9fc; border: 1px solid #e6ecf5; border-radius: 10px; display: flex; flex-direction: column; gap: 9px; }
.cl-edit-field { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: #55607a; }
.cl-edit-field > span { flex: none; width: 78px; text-align: right; font-weight: 600; }
.cl-edit-field input[type="text"] { flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid #d6deea; border-radius: 7px; font-size: 12.5px; color: #22303f; background: #fff; }
.cl-edit-field input[type="text"]:focus { border-color: #0b56a8; outline: none; }
.cl-edit-check { gap: 8px; }
.cl-edit-check input { flex: none; width: 16px; height: 16px; }
.cl-edit-check > span { width: auto; text-align: left; font-weight: 500; color: #6b7686; }
.cl-edit-actions { display: flex; align-items: center; gap: 10px; margin-left: 88px; }
.cl-edit-msg { font-size: 12px; font-weight: 600; }

/* 从 VOD 批量拉取建课节 */
/* 从 VOD 批量拉视频（紧凑版）。注意：.form-card label{display:grid} 会污染这里的 <label> 行，
   所以关键布局都用更高优先级 .form-card label.xxx 或 !important 覆盖回横向。 */
.vod-pick-wrap { margin-top: 16px; padding: 16px; border: 1px solid #e6ecf5; border-radius: 14px; background: linear-gradient(180deg,#fbfdff,#f5f9ff); }
.vod-pick-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.vod-pick-head h4 { font-size: 15px; color: #22303f; margin: 2px 0 0; }
.vod-pick-filters { display: flex; align-items: center; gap: 8px; }
.vod-pick-filters select, .vod-pick-filters input { padding: 6px 10px; border: 1px solid #d6deea; border-radius: 8px; font-size: 12.5px; color: #22303f; background: #fff; }
.vod-pick-filters select { max-width: 170px; cursor: pointer; }
.vod-pick-toolbar { display: flex; align-items: center; gap: 14px; padding: 8px 2px; margin: 10px 0 6px; border-bottom: 1px solid #eef2f8; }
.vod-pick-list { display: flex; flex-direction: column; gap: 4px; max-height: 400px; overflow-y: auto; padding-right: 4px; }
.form-card label.vod-pick-item,
.vod-pick-item { display: flex !important; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid #edf1f7; border-radius: 10px; background: #fff; cursor: pointer; font-weight: 400; }
.vod-pick-item:hover { border-color: #bcd0f2; background: #f7fbff; }
.vod-pick-item.picked { border-color: #0b56a8; background: #eef5ff; box-shadow: inset 0 0 0 1px #0b56a8; }
.vod-pick-item.used { opacity: .5; cursor: default; }
.vod-pick-item.used:hover { border-color: #edf1f7; background: #fff; }
.vod-pick-item > input[type="checkbox"] { flex: none; width: 17px; height: 17px; accent-color: #0b56a8; margin: 0; }
.vod-pick-cover { flex: none; width: 90px; height: 51px; border-radius: 6px; object-fit: cover; background: #e4e9f1; display: inline-block; }
.vod-pick-meta { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.vod-pick-name { font-size: 13px; font-weight: 600; color: #22303f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vod-pick-sub { font-size: 11.5px; color: #9aa4b2; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 8px; min-width: 0; }
.vod-pick-sub > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vod-pick-cat { flex: none; font-size: 10.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: #eaf1fd; color: #0b56a8; }
.vod-pick-used-badge { flex: none; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #eef2f8; color: #7a8698; }
/* 课节编辑面板的 label 也被 .form-card label{display:grid} 影响，这里恢复成横向一行 */
.form-card label.cl-edit-field { display: flex !important; align-items: center; }
.form-card label.cl-edit-check { display: flex !important; align-items: center; }

/* 课节按「所属分类」分组的小节标题 */
.cl-group-head { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; padding: 5px 10px; font-size: 12.5px; font-weight: 800; color: #0b56a8; background: #eef4ff; border-radius: 7px; }
.cl-group-count { font-size: 10.5px; font-weight: 700; color: #7a8aa6; background: #fff; padding: 1px 8px; border-radius: 999px; }

/* 课节列表工具条 + 二级标题行 */
.cl-lessons-toolbar { display: flex; gap: 8px; margin: 0 0 10px; flex-wrap: wrap; }
.cl-lesson-titlewrap { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cl-lesson-titlewrap .cl-lesson-title { flex: none; }
.cl-lesson-sub { font-size: 11px; color: #9aa4b2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#vodUploadClass { width: 100%; padding: 8px 10px; border: 1px solid #d6deea; border-radius: 8px; font-size: 13px; background: #fff; margin-top: 6px; cursor: pointer; }

/* SKU 编辑器里的课节勾选：从两列改单列，避免右侧溢出被截断 */
#skuRows .sku-lesson-list { grid-template-columns: 1fr !important; max-height: 300px; }
#skuRows .sku-lesson-item { padding: 5px 8px !important; }

/* ============ 2026-07-03 UI 打磨（第2轮）：导航更紧 + 去大方块 + 傻瓜表单 ============ */
/* 导航：进一步收紧，不再空荡 */
.nav { gap: 1px !important; margin-top: 10px !important; }
.nav .nav-group { margin: 0 !important; }
.nav .nav-group-title, .nav .nav-group-toggle { padding: 10px 12px 3px !important; font-size: 10.5px !important; color: #aab4c2 !important; }
.nav .nav-group-items { gap: 1px !important; }
.nav button { height: 38px !important; font-size: 13px !important; font-weight: 600 !important; border-radius: 10px !important; padding: 0 14px !important; }
.nav button.active { font-weight: 800 !important; }

/* 表单分区：去掉厚重边框/内阴影，轻描边 */
.form-section { padding: 4px 0 !important; border: none !important; background: transparent !important; box-shadow: none !important; border-top: 1px solid #eef1f6 !important; border-radius: 0 !important; }
.form-section:first-of-type { border-top: none !important; }
.form-card { gap: 12px !important; }
.field-group-title strong { font-size: 14px !important; }
.field-group-title strong::before { width: 6px !important; height: 6px !important; }

/* 输入框：更克制的圆角与边框，不再是大白块 */
.form-card input, .form-card select, .form-card textarea,
.filter-bar input, .filter-bar select {
  border-radius: 10px !important;
  border: 1px solid #dde3ec !important;
  background: #fff !important;
  font-size: 13.5px !important;
}
.form-card input:focus, .form-card select:focus, .form-card textarea:focus { border-color: #7fa8dd !important; }

/* 内容列表：紧凑单行卡（替代大空方块 product-card） */
.content-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; border: 1px solid #ebeef4; border-radius: 12px; background: #fff; margin-bottom: 7px; cursor: pointer; }
.content-row:hover { border-color: #bcd0f2; background: #f8fbff; }
.content-row.active { border-color: #0b56a8; background: #f0f6ff; box-shadow: inset 3px 0 0 #0b56a8; }
.content-row-main { min-width: 0; flex: 1; }
.content-row-title { font-size: 14px; font-weight: 700; color: #263243; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content-row-sub { font-size: 12px; margin-top: 3px; }
.tag.ok { background: #e6f4ec; color: #1a7f4b; }

/* 方向勾选 pills（傻瓜化） */
.chk-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0; }
.chk-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border: 1px solid #dde3ec; border-radius: 999px; font-size: 13px; color: #46506a; cursor: pointer; background: #fff; user-select: none; }
.chk-pill input { margin: 0; }
.chk-pill:hover { border-color: #9bb4dd; background: #f4f8ff; }
.req-star { color: #f04438; font-weight: 700; }

/* ===== 负责人班级看板 ===== */
.oc-dash-head { margin-top: 16px; }
.oc-dash-head h4 { margin: 0 0 10px; font-size: 15px; }
.oc-dash-cards { display: flex; gap: 12px; margin-bottom: 12px; }
.oc-dc { flex: 1; text-align: center; padding: 12px; border: 1px solid #e9edf4; border-radius: 12px; background: #fbfcff; }
.oc-dc b { display: block; font-size: 22px; font-weight: 800; color: #0b56a8; }
.oc-dc span { font-size: 12px; color: #6b7688; }
.oc-dash-table th, .oc-dash-table td { font-size: 13px; }
.oc-prog { position: relative; height: 16px; background: #eef2f8; border-radius: 999px; overflow: hidden; min-width: 90px; }
.oc-prog-fill { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #2f7bd6, #0b56a8); border-radius: 999px; }
.oc-prog span { position: absolute; left: 0; right: 0; top: 0; line-height: 16px; text-align: center; font-size: 10.5px; color: #1f2733; font-weight: 700; }

/* ===== 班级配课面板 ===== */
.cg-card { border: 1px solid #dbe4f0; }
.cg-display-config { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(240px, 1fr) minmax(240px, 1fr); gap: 12px; align-items: end; margin: 12px 0; padding: 14px; border: 1px solid #dbe7f7; border-radius: 12px; background: #f6f9fe; }
.cg-display-copy { align-self: center; min-width: 0; }
.cg-display-copy b, .cg-display-copy span { display: block; }
.cg-display-copy b { color: #183b68; font-size: 13px; }
.cg-display-copy span { margin-top: 4px; color: #6f7d91; font-size: 11px; line-height: 1.45; }
.cg-display-config input { width: 100%; min-width: 0; border: 1px solid #cfd9e7; border-radius: 10px; padding: 8px 10px; font-size: 13px; background: #fff; }
.cc-student-preview { display: block; margin-top: 4px; color: #718096; font-size: 11px; font-weight: 500; line-height: 1.35; }
.cg-row { border: 1px solid #e9edf4; border-radius: 14px; padding: 12px; margin-bottom: 10px; background: #fbfcff; }
.cg-row-main { display: grid; grid-template-columns: minmax(240px, .9fr) minmax(280px, 1.1fr) auto auto; gap: 10px; align-items: start; }
.cg-field { display: grid; gap: 6px; min-width: 0; }
.cg-field > span { color: #56647a; font-size: 12px; font-weight: 800; }
.cg-field > small { color: #7a879b; font-size: 11px; line-height: 1.35; }
.cg-course { width: 100%; min-width: 0; border: 1px solid #d9dde6; border-radius: 10px; padding: 7px 10px; font-size: 13px; }
.cg-student-course-name { width: 100%; min-width: 0; border: 1px solid #cfd9e7; border-radius: 10px; padding: 8px 10px; font-size: 13px; background: #fff; }
.cg-student-course-name:focus { border-color: #2d78c8; box-shadow: 0 0 0 3px rgba(45, 120, 200, .1); outline: none; }
.cg-row-main .cl-mini { height: 42px; min-height: 42px; margin-top: 22px; white-space: nowrap; }
.cg-lessons { margin-top: 10px; border: 1px solid #e4e8f0; border-radius: 12px; padding: 12px; background: #fff; }
.cg-sync-guide { margin: 10px 0 14px; border: 1px solid #cfe0f5; border-radius: 14px; overflow: hidden; background: #f8fbff; }
.cg-sync-guide > summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; color: #173d6c; background: #eef5ff; list-style-position: inside; }
.cg-sync-guide > summary span { font-size: 13px; font-weight: 900; }
.cg-sync-guide > summary small { color: #6e7f96; font-size: 11.5px; font-weight: 600; }
.cg-sync-guide-body { display: grid; gap: 12px; padding: 14px; }
.cg-sync-rule-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.cg-sync-rule-grid article { padding: 11px 12px; border: 1px solid #dce8f7; border-radius: 11px; background: #fff; }
.cg-sync-rule-grid b { display: block; margin-bottom: 5px; color: #183b68; font-size: 12.5px; }
.cg-sync-rule-grid p,
.cg-sync-button-guide p,
.cg-sync-safe-note { margin: 0; color: #5e6d82; font-size: 12px; line-height: 1.65; }
.cg-sync-mode-table { display: grid; border: 1px solid #dce5f1; border-radius: 11px; overflow: hidden; background: #fff; }
.cg-sync-mode-table > div { display: grid; grid-template-columns: minmax(120px, .7fr) minmax(150px, .9fr) minmax(220px, 1.4fr); }
.cg-sync-mode-table > div + div { border-top: 1px solid #e8edf4; }
.cg-sync-mode-table span,
.cg-sync-mode-table b { min-width: 0; padding: 8px 10px; color: #526176; font-size: 11.5px; line-height: 1.45; }
.cg-sync-mode-table span + span,
.cg-sync-mode-table b + span { border-left: 1px solid #e8edf4; }
.cg-sync-mode-table b { color: #173d6c; }
.cg-sync-mode-table .is-head { background: #f1f5fa; }
.cg-sync-mode-table .is-head span { color: #66758a; font-weight: 800; }
.cg-sync-button-guide { display: grid; gap: 6px; padding: 11px 12px; border: 1px solid #eadbbd; border-radius: 11px; background: #fffaf1; }
.cg-sync-button-guide b { color: #76501e; }
.cg-sync-safe-note { padding: 9px 11px; border-radius: 9px; color: #257047; background: #edf9f2; font-weight: 700; }

/* ===== 总览「开课三步走」引导 ===== */
.guide-flow { margin: 6px 0 18px; padding: 16px 18px; border: 1px solid #dbe6f5; border-radius: 16px; background: linear-gradient(180deg, #f5f9ff, #fdfefe); }
.guide-flow-title { font-size: 14px; font-weight: 800; color: #163a66; margin-bottom: 12px; }
.guide-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 900px) { .guide-steps { grid-template-columns: 1fr; } }
.guide-step { position: relative; padding: 14px 14px 12px; border: 1px solid #e3ebf6; border-radius: 12px; background: #fff; cursor: pointer; transition: all .15s; }
.guide-step:hover { border-color: #7fa8dd; box-shadow: 0 4px 14px rgba(24,88,200,.10); transform: translateY(-1px); }
.guide-step-no { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: #0b56a8; color: #fff; font-size: 13px; font-weight: 800; margin-bottom: 8px; }
.guide-step strong { display: block; font-size: 15px; color: #1f2d40; margin-bottom: 5px; }
.guide-step p { font-size: 12.5px; color: #6b7688; line-height: 1.6; margin: 0 0 10px; }
.guide-step-go { font-size: 12.5px; font-weight: 700; color: #0b56a8; }
.guide-flow-tip { margin: 12px 0 0; font-size: 12.5px; color: #7a8698; line-height: 1.6; }

/* ============ 2026-07-03 修勾选方框 + 首页内容工具条 ============ */
/* 之前的输入框圆角描边样式误伤了勾选框/单选框——这里恢复成正常小勾选框 */
.form-card input[type="checkbox"], .form-card input[type="radio"],
.filter-bar input[type="checkbox"], .filter-bar input[type="radio"],
.chk-pill input, .chk-pills input, .check-row input {
  width: 16px !important; height: 16px !important; min-width: 16px !important;
  border-radius: 3px !important; padding: 0 !important; margin: 0 !important;
  appearance: auto !important; -webkit-appearance: auto !important;
  background: initial !important; border: initial !important; flex: none !important;
  vertical-align: middle;
}
.chk-pills { display: flex !important; flex-wrap: wrap; gap: 8px !important; margin: 4px 0; }
.chk-pill { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 6px;
  padding: 6px 13px !important; border: 1px solid #dde3ec; border-radius: 999px !important;
  font-size: 13px; color: #46506a; cursor: pointer; background: #fff; width: auto !important; }
.chk-pill:hover { border-color: #9bb4dd; background: #f4f8ff; }

/* 首页内容工具条 */
.content-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 12px; padding: 10px 14px; background: #f7f9fd; border: 1px solid #e6ecf5; border-radius: 12px; }
.content-toolbar label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #4a5568; }
.content-toolbar select, .content-toolbar input { border: 1px solid #d9dde6; border-radius: 8px; padding: 5px 10px; font-size: 13px; background: #fff; }
.content-toolbar-gap { flex: 1; }
.content-row-del { flex: none; margin-left: 8px; color: #c0392b; font-size: 12px; cursor: pointer; opacity: .7; }
.content-row-del:hover { opacity: 1; }

/* 班级负责人下拉：约束宽度，避免超长选项把控件撑爆 */
#ccGroupPick { max-width: 320px; }

/* ===== 班级配课：勾选课节 UI 修复（补 #classGrantsBox 作用域）+ 警告 ===== */
#classGrantsBox .sku-lesson-tools {
  position: sticky; top: 0; z-index: 2;
  display: flex !important; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 0 0 8px; padding: 8px 0 10px;
  background: #fff; border-bottom: 1px solid #eef2f7;
}
#classGrantsBox .cg-lesson-search {
  flex: 1 1 210px; min-width: 180px; min-height: 32px;
  border-radius: 9px; padding: 5px 10px; font-size: 12.5px; font-weight: 700;
}
#classGrantsBox .sku-lesson-list { display: flex; flex-direction: column; gap: 5px; max-height: 460px; overflow-y: auto; margin-top: 0; padding: 2px 2px 8px; }
#classGrantsBox .sku-lesson-item {
  display: flex !important; flex-direction: row !important; align-items: flex-start !important;
  gap: 10px !important; padding: 8px 10px !important; margin: 0 !important;
  font-size: 12.5px !important; font-weight: 400 !important; line-height: 1.45 !important;
  border: 1px solid #edf1f7; border-radius: 9px; background: #fbfcff !important; width: auto !important; min-height: 36px !important;
}
#classGrantsBox .sku-lesson-item:hover { background: #f0f5ff !important; }
#classGrantsBox .sku-lesson-item input[type="checkbox"] {
  width: 16px !important; height: 16px !important; min-width: 16px !important; flex: none !important;
  margin: 2px 0 0 !important; padding: 0 !important; appearance: auto !important; -webkit-appearance: auto !important;
  border-radius: 3px !important; background: initial !important; border: initial !important;
}
#classGrantsBox .sku-lesson-title { flex: 1 !important; min-width: 0 !important; overflow: visible !important; text-overflow: clip !important; white-space: normal !important; overflow-wrap: anywhere; font-size: 12.5px !important; font-weight: 600 !important; color: #263241 !important; margin: 0 !important; }
#classGrantsBox .sku-lesson-dur { flex: none !important; font-size: 11px !important; color: #9aa4b2 !important; margin: 2px 0 0 !important; }
.cg-warn { margin: 6px 0 10px; padding: 10px 14px; background: #fff6ec; border: 1px solid #f0d0a8; border-radius: 10px; font-size: 12.5px; color: #8a5a1a; line-height: 1.7; }

#classGrantsBox .cg-lesson-picker {
  display: grid;
  gap: 12px;
}

#classGrantsBox .cg-lesson-tools {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(260px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0 12px;
  background: #fff;
  border-bottom: 1px solid #eef2f7;
}

#classGrantsBox .cg-lesson-count {
  display: grid;
  gap: 2px;
  min-width: 0;
}

#classGrantsBox .cg-lesson-count strong {
  color: #1f2a37;
  font-size: 13px;
}

#classGrantsBox .cg-lesson-count span {
  color: #7b8798;
  font-size: 11.5px;
  font-weight: 600;
}

#classGrantsBox .cg-lesson-search {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  box-sizing: border-box;
}

#classGrantsBox .cg-lesson-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 280px);
  gap: 14px;
  align-items: start;
}

#classGrantsBox .cg-lesson-list {
  display: grid;
  gap: 12px;
  max-height: 520px;
  overflow-y: auto;
  padding: 2px 6px 2px 0;
}

#classGrantsBox .cg-lesson-category {
  overflow: hidden;
  border: 1px solid #e2eaf5;
  border-radius: 12px;
  background: #fff;
}

#classGrantsBox .cg-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-bottom: 1px solid #e8eef6;
  background: linear-gradient(135deg, #f3f7fd, #fffaf2);
}

#classGrantsBox .cg-category-head > div { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
#classGrantsBox .cg-category-head b { color: #23486f; font-size: 12.5px; }
#classGrantsBox .cg-category-head span { padding: 2px 7px; border-radius: 999px; background: #e5eef9; color: #5c7696; font-size: 10.5px; font-weight: 800; }
#classGrantsBox .cg-category-head .cl-mini { min-height: 28px; padding: 4px 8px; }
#classGrantsBox .cg-category-lessons { display: grid; gap: 6px; padding: 8px; }

#classGrantsBox .cg-lesson-item {
  display: grid !important;
  grid-template-columns: 18px 34px minmax(0, 1fr) 76px;
  gap: 10px;
  align-items: start;
  min-width: 0;
  margin: 0 !important;
  padding: 9px 10px !important;
  border: 1px solid #edf1f7;
  border-radius: 10px;
  background: #fbfcff;
  cursor: pointer;
  line-height: 1.45;
}

#classGrantsBox .cg-lesson-item:hover {
  border-color: #cbdcf5;
  background: #f3f7ff;
}

#classGrantsBox .cg-lesson-check {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  margin: 3px 0 0 !important;
  padding: 0 !important;
  appearance: auto !important;
  -webkit-appearance: auto !important;
}

#classGrantsBox .cg-lesson-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  border-radius: 7px;
  background: #eef3fb;
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
}

#classGrantsBox .cg-lesson-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

#classGrantsBox .cg-lesson-title {
  color: #263241;
  font-size: 13px;
  font-weight: 750;
  white-space: normal;
  overflow-wrap: anywhere;
}

#classGrantsBox .cg-lesson-id {
  color: #9aa4b2;
  font-size: 10.5px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#classGrantsBox .cg-lesson-dur {
  justify-self: end;
  color: #8a95a6;
  font-size: 11.5px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
  margin-top: 2px;
}

#classGrantsBox .cg-lesson-summary {
  position: sticky;
  top: 68px;
  display: grid;
  gap: 8px;
  max-height: 520px;
  overflow: hidden;
  padding: 12px;
  border: 1px solid #edf1f7;
  border-radius: 12px;
  background: #f8fafc;
}

#classGrantsBox .cg-lesson-summary b {
  color: #263241;
  font-size: 13px;
}

#classGrantsBox .cg-lesson-summary b small {
  margin-left: 6px;
  color: #8491a4;
  font-size: 10.5px;
  font-weight: 650;
}

.lesson-plan-row.is-draggable { cursor: grab; transition: border-color .15s ease, background .15s ease, opacity .15s ease; }
.lesson-plan-row.is-draggable:active { cursor: grabbing; }
.lesson-plan-row.is-dragging { opacity: .45; }
.lesson-plan-row.drag-over { outline: 2px solid #5d9fe6; background: #eef6ff !important; }
.lesson-plan-drag-handle { cursor: grab; user-select: none; }

#classGrantsBox .cg-lesson-summary div {
  display: grid;
  gap: 6px;
  overflow-y: auto;
  padding-right: 2px;
}

#classGrantsBox .cg-lesson-summary span,
#classGrantsBox .cg-lesson-summary em {
  display: block;
  padding: 6px 8px;
  border-radius: 8px;
  background: #fff;
  color: #4a5568;
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

#classGrantsBox .cg-lesson-summary .muted {
  background: transparent;
  padding: 0;
  color: #8a95a6;
}

@media (max-width: 1180px) {
  .cg-display-config,
  .cg-row-main,
  #classGrantsBox .cg-lesson-tools,
  #classGrantsBox .cg-lesson-layout {
    grid-template-columns: 1fr;
  }

  #classGrantsBox .cg-lesson-summary {
    position: static;
    max-height: 180px;
  }

  .cg-sync-rule-grid,
  .cg-sync-mode-table > div {
    grid-template-columns: 1fr;
  }

  .cg-sync-mode-table span + span,
  .cg-sync-mode-table b + span {
    border-left: 0;
    border-top: 1px dashed #e8edf4;
  }
}

/* 课程商品 / 班型里的课节勾选也允许长标题换行，避免 50+ 节课挤成一团。 */
#skuRows .sku-lesson-list { gap: 5px !important; max-height: 420px !important; }
#skuRows .sku-lesson-item { align-items: flex-start !important; padding: 7px 9px !important; border: 1px solid #edf1f7; background: #fbfcff !important; }
#skuRows .sku-lesson-item input[type="checkbox"] { margin-top: 2px !important; }
#skuRows .sku-lesson-title { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; overflow-wrap: anywhere; line-height: 1.45 !important; }

/* Dev17: lesson arrangement and class/SKU lesson plans. */
#courseLibLessons {
  display: block !important;
  max-height: none !important;
  overflow: visible !important;
}

.cl-arrange-panel {
  margin: 10px 0 14px;
  padding: 14px;
  border: 1px solid #dbe7f7;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
}

.cl-arrange-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.cl-arrange-head b,
.sku-lesson-summary b,
.cg-lesson-summary b {
  display: block;
  color: #17233a;
  font-weight: 900;
}

.cl-arrange-head span {
  display: block;
  margin-top: 4px;
  color: #748098;
  font-size: 12px;
}

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

.cl-arrange-list,
.lesson-plan-editor {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cl-arrange-list {
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
}

.cl-arrange-row,
.lesson-plan-row {
  display: grid;
  align-items: center;
  gap: 8px;
}

.cl-arrange-row {
  grid-template-columns: 34px minmax(240px, 1fr) minmax(130px, 180px) 64px auto auto;
}

.lesson-plan-row {
  grid-template-columns: 28px minmax(130px, 1fr) minmax(110px, 150px) auto auto;
}

.cl-arrange-no,
.lesson-plan-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  border-radius: 8px;
  background: #edf3fb;
  color: #526179;
  font-size: 12px;
  font-weight: 900;
}

.cl-arrange-title,
.cl-arrange-group,
.lesson-plan-group {
  min-width: 0;
  height: 34px;
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  padding: 0 10px;
  background: #fff;
  font-size: 12px;
}

.cl-arrange-dur {
  color: #94a0b2;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.lesson-plan-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #263241;
  font-size: 12.5px;
  font-weight: 800;
}

.sku-lesson-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 34%);
  gap: 12px;
  align-items: start;
}

.sku-lesson-summary,
#classGrantsBox .cg-lesson-summary {
  position: sticky;
  top: 8px;
  max-height: 420px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid #e5ebf5;
  border-radius: 14px;
  background: #fbfdff;
}

.sku-lesson-summary .muted,
#classGrantsBox .cg-lesson-summary .muted {
  display: block;
  color: #8a94a7;
  line-height: 1.5;
}

@media (max-width: 1180px) {
  .cl-arrange-head,
  .sku-lesson-layout,
  #classGrantsBox .cg-lesson-layout {
    display: block;
  }

  .cl-arrange-actions,
  .sku-lesson-summary,
  #classGrantsBox .cg-lesson-summary {
    margin-top: 10px;
  }

  .cl-arrange-row,
  .lesson-plan-row {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .cl-arrange-group,
  .cl-arrange-dur,
  .lesson-plan-group,
  .cl-arrange-row .cl-mini,
  .lesson-plan-row .cl-mini {
    grid-column: 2;
  }
}

/* 批量导入分班/标签行 */
.aa-import-classline { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; }
.aa-import-classline label { display: inline-flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: #4a5568; }

/* Dev22: course arrangement, product detail assets, and review moderation. */
.cl-arrange-category-order {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #e4ebf5;
  border-radius: 10px;
  background: #fbfdff;
}
.cl-arrange-subhead { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.cl-arrange-subhead b { color: #26364b; font-size: 12px; }
.cl-arrange-subhead span { color: #8a96a8; font-size: 11px; }
.cl-category-drag-list { display: flex; gap: 8px; flex-wrap: wrap; }
.cl-category-drag-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px 0 7px;
  border: 1px solid #d8e4f2;
  border-radius: 8px;
  background: #fff;
  color: #284563;
  font-size: 12px;
  cursor: grab;
}
.cl-category-drag-item small { color: #91a0b2; font-size: 10px; }
.cl-drag-handle { color: #9aa9bc; font-size: 17px; line-height: 1; cursor: grab; user-select: none; }
.cl-arrange-row { cursor: grab; }
.cl-arrange-row.is-dragging,
.cl-category-drag-item.is-dragging { opacity: .45; }
.cl-arrange-row.drag-over,
.cl-category-drag-item.drag-over { outline: 2px solid #67a5e8; background: #f1f7ff; }
#courseLibArrangePanel .cl-arrange-row {
  grid-template-columns: 20px 34px minmax(260px, 1fr) minmax(160px, 220px) 64px auto auto;
}
.product-detail-upload { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.product-detail-upload .field-label { flex: 1; min-width: 220px; margin: 0; }
.product-detail-image-preview { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.product-detail-image-item { position: relative; width: 112px; padding: 6px; border: 1px solid #e1e8f2; border-radius: 9px; background: #fbfdff; }
.product-detail-image-item img { display: block; width: 100%; height: 72px; object-fit: cover; border-radius: 6px; background: #f0f4f8; }
.product-detail-image-item button { width: 100%; margin-top: 5px; }
.product-reviews-panel { margin-top: 14px; }
.product-reviews-body { display: flex; flex-direction: column; gap: 8px; }
.product-review-row { display: flex; justify-content: space-between; gap: 18px; padding: 12px 14px; border: 1px solid #e3eaf3; border-radius: 10px; background: #fcfdff; }
.product-review-main { min-width: 0; flex: 1; }
.product-review-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: #20354e; }
.product-review-main p { margin: 7px 0 5px; color: #536277; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.product-review-main small { color: #98a4b4; }
.product-review-score { color: #c58420; font-size: 12px; }
.product-review-side { display: flex; align-items: flex-end; flex-direction: column; gap: 10px; flex: none; }
.product-review-actions { display: flex; gap: 6px; }
.review-status-approved { color: #147b46; background: #e9f7ef; }
.review-status-pending { color: #a56b13; background: #fff5df; }
.review-status-rejected,
.review-status-hidden,
.review-status-deleted { color: #a34444; background: #fff0f0; }
@media (max-width: 1180px) {
  #courseLibArrangePanel .cl-arrange-row { grid-template-columns: 20px 30px minmax(0, 1fr); }
  #courseLibArrangePanel .cl-arrange-group,
  #courseLibArrangePanel .cl-arrange-dur,
  #courseLibArrangePanel .cl-arrange-row .cl-mini { grid-column: 3; }
  .product-review-row { flex-direction: column; }
  .product-review-side { align-items: flex-start; }
}
.aa-import-classline select { border: 1px solid #d9dde6; border-radius: 8px; padding: 6px 10px; font-size: 13px; min-width: 220px; }

/* Dev18: course library right panel must never overflow its card. */
#courseLibrary,
#courseLibrary .grid,
#courseLibrary .form-card,
#courseLibLessons {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

#courseLibLessons {
  display: block !important;
  overflow: hidden !important;
}

#courseLibLessons .cl-lessons-toolbar {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  max-width: 100% !important;
}

#courseLibLessons .cl-lesson-item {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) 70px 48px 48px 62px 76px 58px;
  gap: 8px !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  padding: 7px 8px !important;
}

#courseLibLessons .cl-lesson-title {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#courseLibLessons .cl-lesson-dur,
#courseLibLessons .cl-badge,
#courseLibLessons .sku-preview-btn,
#courseLibLessons .cl-mini {
  min-width: 0 !important;
  max-width: 100% !important;
  justify-self: stretch !important;
  text-align: center !important;
  white-space: nowrap !important;
}

#courseLibLessons .sku-preview-btn,
#courseLibLessons .cl-mini {
  justify-content: center !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
}

#courseLibLessons .cl-lesson-edit {
  max-width: 100% !important;
  margin-left: 0 !important;
  box-sizing: border-box !important;
}

@media (max-width: 1440px) {
  #courseLibLessons .cl-lesson-item {
    grid-template-columns: 34px minmax(0, 1fr) 66px 46px 60px 70px 54px;
  }

  #courseLibLessons .cl-badge-sub {
    display: none !important;
  }
}

@media (max-width: 1180px) {
  #courseLibLessons .cl-lesson-item {
    grid-template-columns: 34px minmax(0, 1fr) 58px 66px 52px;
  }

  #courseLibLessons .cl-lesson-dur,
  #courseLibLessons .cl-badge {
    display: none !important;
  }
}

/* Dev19: class grants selected-lesson editor needs real working room. */
#classGrantsBox .cg-lesson-layout {
  grid-template-columns: 1fr !important;
  gap: 14px !important;
}

#classGrantsBox .cg-lesson-summary {
  position: static !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 14px !important;
}

#classGrantsBox .cg-lesson-summary > div {
  display: block !important;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

#classGrantsBox .cg-lesson-summary .lesson-plan-editor {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 8px !important;
  width: 100% !important;
}

#classGrantsBox .cg-lesson-summary .lesson-plan-row {
  grid-template-columns: 32px minmax(420px, 1fr) minmax(220px, 280px) 64px 64px !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  padding: 8px 10px;
  border: 1px solid #e6edf7;
  border-radius: 10px;
  background: #fff;
}

#classGrantsBox .cg-lesson-summary .lesson-plan-no {
  display: inline-flex !important;
  padding: 0 !important;
}

#classGrantsBox .cg-lesson-summary .lesson-plan-title {
  display: block !important;
  padding: 0 !important;
  background: transparent !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere !important;
  line-height: 1.35;
}

#classGrantsBox .cg-lesson-summary .lesson-plan-group {
  width: 100% !important;
  box-sizing: border-box !important;
}

#classGrantsBox .cg-lesson-summary .cl-mini {
  min-width: 0 !important;
  justify-content: center !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
}

@media (max-width: 1180px) {
  #classGrantsBox .cg-lesson-summary .lesson-plan-editor {
    grid-template-columns: 1fr;
  }

  #classGrantsBox .cg-lesson-summary .lesson-plan-row {
    grid-template-columns: 30px minmax(0, 1fr) !important;
  }

  #classGrantsBox .cg-lesson-summary .lesson-plan-group,
  #classGrantsBox .cg-lesson-summary .lesson-plan-row .cl-mini {
    grid-column: 2;
  }
}

/* Dev23: wide course operations, direction groups, reusable lessons, and validity tools. */
#courseLibrary .course-lib-direction-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 16px;
  padding: 5px;
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #e2e9f2;
  border-radius: 8px;
  background: #f7f9fc;
}

#courseLibrary .course-lib-direction-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #53657a;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

#courseLibrary .course-lib-direction-tab span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #e9eef5;
  color: #6d7b8e;
  font-size: 11px;
}

#courseLibrary .course-lib-direction-tab.active {
  border-color: #bdd5ef;
  background: #fff;
  color: #0b56a8;
  box-shadow: 0 3px 10px rgba(28, 80, 135, .08);
}

#courseLibrary .course-lib-direction-tab.active span {
  background: #e8f2ff;
  color: #0b56a8;
}

#courseLibrary .course-lib-layout {
  display: grid !important;
  grid-template-columns: minmax(350px, .48fr) minmax(760px, 1.52fr) !important;
  gap: 18px !important;
  align-items: start;
}

#courseLibrary #courseLibList {
  min-width: 0;
  max-height: calc(100vh - 260px);
  overflow-y: auto;
  padding-right: 5px;
}

#courseLibrary .course-lib-row {
  align-items: flex-start;
  padding: 14px !important;
  border-radius: 8px !important;
}

#courseLibrary .course-lib-row .product-row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  line-height: 1.4;
}

#courseLibrary .course-direction-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 5px;
  background: #eaf3ff;
  color: #2366aa;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

#courseLibrary .course-lib-acts {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 100%;
}

#courseLibrary .course-direction-select {
  min-width: 86px;
  height: 34px;
  padding: 0 28px 0 9px;
  border: 1px solid #dce5ef;
  border-radius: 7px;
  background-color: #fff;
  color: #334b65;
  font-size: 12px;
  font-weight: 700;
}

#courseLibrary .course-lib-layout > .form-card {
  min-width: 0;
  padding: 18px !important;
  border-radius: 8px !important;
}

#courseLibLessons {
  overflow: visible !important;
}

#courseLibLessons .cl-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 5px;
  padding: 8px 10px;
  border-left: 3px solid #2d74bb;
  border-radius: 4px;
  background: #edf4fc;
  color: #214c79;
  font-size: 13px;
  font-weight: 900;
}

#courseLibLessons .cl-group-count {
  color: #8190a2;
  font-size: 11px;
  font-weight: 700;
}

#courseLibLessons .cl-lesson-item {
  display: grid !important;
  grid-template-columns: minmax(260px, 1fr) auto auto !important;
  gap: 12px !important;
  align-items: center !important;
  padding: 9px 10px !important;
  border-bottom: 1px solid #edf1f6;
  border-radius: 5px !important;
}

#courseLibLessons .cl-lesson-main {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
}

#courseLibLessons .cl-lesson-title {
  min-width: 0 !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

#courseLibLessons .cl-lesson-meta,
#courseLibLessons .cl-lesson-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

#courseLibLessons .cl-lesson-meta {
  min-width: 130px;
}

#courseLibLessons .cl-lesson-actions {
  min-width: 224px;
}

#courseLibLessons .cl-lesson-actions .cl-mini,
#courseLibLessons .cl-lesson-actions .sku-preview-btn {
  flex: 1 1 68px;
  min-width: 68px !important;
  max-width: none !important;
  justify-self: auto !important;
}

#courseLibLessons .cl-lesson-dur,
#courseLibLessons .cl-badge {
  display: inline-flex !important;
  flex: none;
  width: auto;
  justify-self: auto !important;
}

#courseLibArrangePanel .cl-arrange-panel {
  overflow: visible;
  padding: 16px;
  border-radius: 8px;
  background: #fbfdff;
}

#courseLibArrangePanel .cl-arrange-category-order {
  padding: 12px;
  border-radius: 7px;
}

#courseLibArrangePanel .cl-arrange-groups {
  display: grid;
  gap: 14px;
}

#courseLibArrangePanel .cl-arrange-category-section {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  background: #fff;
}

#courseLibArrangePanel .cl-arrange-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #e5ebf3;
  background: #f3f7fc;
}

#courseLibArrangePanel .cl-arrange-category-head > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#courseLibArrangePanel .cl-arrange-category-head input {
  min-width: 180px;
  max-width: 320px;
  height: 34px;
  padding: 0 9px;
  border: 1px solid #cfdae8;
  border-radius: 6px;
  background: #fff;
  color: #24425f;
  font-weight: 800;
}

#courseLibArrangePanel .cl-arrange-category-head span,
#courseLibArrangePanel .cl-arrange-category-head small {
  color: #8190a3;
  font-size: 11px;
}

#courseLibArrangePanel .cl-arrange-category-lessons {
  display: grid;
  gap: 2px;
  min-height: 48px;
  padding: 6px;
}

#courseLibArrangePanel .cl-arrange-category-lessons.drag-over {
  background: #edf6ff;
}

#courseLibArrangePanel .cl-arrange-row {
  display: grid !important;
  grid-template-columns: 22px 34px minmax(280px, 1fr) minmax(180px, 260px) 72px !important;
  gap: 8px !important;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 6px 7px;
  border-bottom: 1px solid #eef2f6;
  box-sizing: border-box;
}

#courseLibArrangePanel .cl-arrange-row:last-child {
  border-bottom: 0;
}

#courseLibArrangePanel .cl-arrange-title,
#courseLibArrangePanel .cl-arrange-group {
  width: 100%;
  min-width: 0;
  height: 38px;
  border-radius: 6px;
  box-sizing: border-box;
}

#courseLibArrangePanel .cl-arrange-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border: 1px dashed #ccd8e7;
  border-radius: 6px;
  color: #8694a7;
  font-size: 12px;
}

#skuRows .sku-grants-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 12px 0 7px;
}

#skuRows .sku-grants-head b {
  color: #24384f;
  font-size: 13px;
}

#skuRows .sku-grants-head span {
  color: #7c899b;
  font-size: 11px;
}

#skuRows .sku-grants {
  display: grid;
  gap: 10px;
}

#skuRows .sku-grant-block {
  min-width: 0;
  padding: 10px;
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  background: #fbfdff;
}

#skuRows .sku-grant-main {
  display: grid;
  grid-template-columns: 32px minmax(260px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

#skuRows .sku-grant-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  border-radius: 6px;
  background: #eaf2fb;
  color: #315b85;
  font-size: 12px;
  font-weight: 900;
}

#skuRows .sku-add-grant {
  margin-top: 9px;
}

#skuRows .sku-lesson-layout {
  grid-template-columns: minmax(420px, 1.15fr) minmax(420px, .85fr) !important;
  gap: 14px !important;
}

#skuRows .sku-lesson-summary {
  position: static;
  max-height: 480px;
}

.vod-pick-reuse-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 5px;
  background: #eaf5ff;
  color: #28658f;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}

.aa-validity-line {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(260px, 1.2fr) minmax(180px, .7fr) auto;
  gap: 10px;
  align-items: center;
}

.aa-validity-line > * {
  min-width: 0;
}

@media (max-width: 1360px) {
  #courseLibrary .course-lib-layout {
    grid-template-columns: 1fr !important;
  }

  #courseLibrary #courseLibList {
    max-height: 360px;
  }

  #courseLibrary .course-lib-row {
    align-items: center;
  }
}

@media (max-width: 1040px) {
  #courseLibLessons .cl-lesson-item {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #courseLibLessons .cl-lesson-meta,
  #courseLibLessons .cl-lesson-actions {
    justify-content: flex-start;
    min-width: 0;
  }

  #courseLibLessons .cl-lesson-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(86px, 1fr));
  }

  #courseLibArrangePanel .cl-arrange-row {
    grid-template-columns: 22px 34px minmax(0, 1fr) !important;
  }

  #courseLibArrangePanel .cl-arrange-group,
  #courseLibArrangePanel .cl-arrange-dur {
    grid-column: 3;
  }

  #courseLibArrangePanel .cl-arrange-category-head {
    align-items: flex-start;
    flex-direction: column;
  }

  #skuRows .sku-lesson-layout {
    grid-template-columns: 1fr !important;
  }

  .aa-validity-line {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  #courseLibrary .course-lib-row {
    align-items: flex-start;
    flex-direction: column;
  }

  #courseLibrary .course-lib-acts {
    justify-content: flex-start;
  }

  #skuRows .sku-grant-main,
  .aa-validity-line {
    grid-template-columns: 1fr;
  }

  #skuRows .sku-grant-no {
    width: 32px;
  }
}

/* App accounts workspace */
.aa-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
  padding: 4px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
}

.aa-tab {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
}

.aa-tab.active {
  background: var(--deep);
  color: #fff;
}

.aa-tab-panel,
.aa-tab-panel.active {
  display: block;
  min-width: 0;
}

.aa-tab-panel[hidden],
body.can-manage-ops-admins .aa-tab-panel.admin-only[hidden] {
  display: none !important;
}

.aa-tab-panel.admin-only {
  display: none !important;
}

body.can-manage-ops-admins .aa-tab-panel.admin-only.active {
  display: block !important;
}

.aa-work-card,
.aa-list-card,
.aa-table-card {
  margin-bottom: 12px;
}

.aa-tools-grid,
.aa-system-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.aa-system-grid .aa-danger-card {
  grid-column: 1 / -1;
  border: 1px solid rgba(185, 28, 28, 0.22);
}

.aa-check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}

.aa-panel-actions,
.aa-system-actions,
.aa-tool-line,
.aa-relink-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.aa-tool-line input,
.aa-relink-line select {
  flex: 1 1 220px;
  min-width: 0;
}

.aa-platform-links {
  margin-top: 10px;
}

.aa-platform-links summary,
.aa-password summary,
.aa-action-menu summary {
  cursor: pointer;
  color: var(--deep);
  font-weight: 800;
}

.aa-account-filters {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) repeat(3, minmax(140px, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.aa-account-filters label,
.aa-account-filters input,
.aa-account-filters select {
  min-width: 0;
  width: 100%;
}

.aa-table-scroll {
  width: 100%;
  overflow-x: auto;
}

.aa-account-table {
  min-width: 1080px;
  table-layout: fixed;
}

.aa-account-table th:nth-child(1) { width: 132px; }
.aa-account-table th:nth-child(2) { width: 130px; }
.aa-account-table th:nth-child(3) { width: 126px; }
.aa-account-table th:nth-child(4) { width: 270px; }
.aa-account-table th:nth-child(5) { width: 128px; }
.aa-account-table th:nth-child(6) { width: 88px; }
.aa-account-table th:nth-child(7) { width: 126px; }

.aa-account-table td {
  vertical-align: top;
  overflow-wrap: anywhere;
}

.aa-account-table select {
  width: 100%;
  min-width: 0;
}

.aa-password code,
.aa-password button {
  display: block;
  margin-top: 7px;
}

.aa-password button {
  min-height: 30px;
  padding: 0 10px;
}

.aa-device-bound {
  display: block;
  color: #137a49;
  font-weight: 800;
}

.aa-account-table small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.aa-action-menu > summary {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  list-style: none;
}

.aa-action-menu > summary::-webkit-details-marker {
  display: none;
}

.aa-action-menu-pop {
  display: grid;
  gap: 6px;
  margin-top: 7px;
}

.aa-action-menu-pop button {
  width: 100%;
  min-height: 32px;
  padding: 0 8px;
}

.aa-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
}

.aa-pagination > div {
  display: flex;
  gap: 8px;
}

@media (max-width: 1100px) {
  .aa-account-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .aa-search-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .aa-tools-grid,
  .aa-system-grid,
  .aa-account-filters {
    grid-template-columns: 1fr;
  }

  .aa-system-grid .aa-danger-card,
  .aa-search-field {
    grid-column: auto;
  }
}

/* Dev25 cascade lock: these must stay after all legacy course-library rules. */
#courseLibrary .course-lib-layout {
  grid-template-columns: minmax(400px, 430px) minmax(0, 1fr) !important;
  gap: 16px !important;
}

#courseLibrary #courseLibList {
  display: grid;
  align-content: start;
  gap: 10px;
  padding-right: 6px;
}

#courseLibrary .course-lib-row {
  display: block !important;
  min-width: 0;
  margin: 0 !important;
  padding: 13px !important;
}

#courseLibrary .course-lib-row .product-row-main {
  display: block;
  width: 100%;
  min-width: 0;
}

#courseLibrary .course-lib-row .product-row-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  min-width: 0;
  line-height: 1.45;
}

#courseLibrary .course-lib-course-title {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  color: #1f3045;
  font-weight: 900;
  overflow-wrap: break-word;
  word-break: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#courseLibrary .course-lib-row .product-row-sub {
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#courseLibrary .course-lib-acts {
  display: grid !important;
  grid-template-columns: auto auto minmax(92px, 1fr) auto;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 12px;
}

#courseLibrary .course-lib-acts .cl-mini,
#courseLibrary .course-direction-select {
  min-width: 0 !important;
  height: 34px;
  margin: 0;
  white-space: nowrap;
}

#courseLibrary .course-lib-acts .cl-mini {
  padding: 0 10px;
}

#courseLibrary .course-direction-select {
  width: 100%;
}

#courseLibrary .course-lib-layout > .form-card {
  min-width: 0;
  overflow: hidden;
}

#courseLibrary .course-lib-layout > .form-card > .form-title {
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

#courseLibrary .course-lib-layout > .form-card > .form-title > div {
  flex: 1 1 360px;
  min-width: 0;
}

#courseLibrary .course-lib-layout > .form-card > .form-title h3 {
  overflow-wrap: break-word;
  word-break: normal;
}

#courseLibArrangePanel .cl-category-drag-list {
  align-items: center;
}

#courseLibArrangePanel .cl-category-drag-item {
  flex: 0 0 auto;
  max-width: 100%;
  white-space: nowrap;
}

#courseLibArrangePanel .cl-category-drag-item > span:not(.cl-drag-handle) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

#courseLibArrangePanel .cl-category-drag-item small {
  flex: none;
  white-space: nowrap;
}

#courseLibArrangePanel .cl-arrange-category-head > div {
  flex: 1 1 auto;
  flex-wrap: nowrap;
}

#courseLibArrangePanel .cl-arrange-category-head input {
  flex: 1 1 220px;
  width: min(320px, 100%);
  min-width: 0;
}

#courseLibArrangePanel .cl-arrange-category-head span {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: 24px;
  padding: 0 7px;
  border-radius: 5px;
  background: #e8eff8;
  white-space: nowrap;
}

#courseLibArrangePanel .cl-arrange-category-head small {
  flex: 0 1 auto;
  text-align: right;
}

@media (max-width: 1500px) {
  #courseLibrary .course-lib-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #courseLibrary #courseLibList {
    grid-template-columns: repeat(2, minmax(300px, 1fr));
    max-height: 390px;
  }

  #appAccounts .aa-tools-grid,
  #appAccounts .aa-system-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #appAccounts .aa-system-grid .aa-danger-card {
    grid-column: auto;
  }
}

@media (max-width: 920px) {
  #courseLibrary #courseLibList {
    grid-template-columns: minmax(0, 1fr);
  }

  #courseLibArrangePanel .cl-arrange-category-head {
    align-items: flex-start;
    flex-direction: column;
  }

  #courseLibArrangePanel .cl-arrange-category-head small {
    text-align: left;
  }
}

@media (max-width: 640px) {
  #courseLibrary .course-lib-acts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #courseLibrary .course-direction-select {
    grid-column: 1 / -1;
  }
}
