:root {
  --admin-bg: #f4f1ec;
  --admin-bg-soft: #faf9f6;
  --admin-card-bg: #ffffff;
  --admin-card: var(--admin-card-bg);
  --admin-surface: #f7f7f4;
  --admin-border: #ded9cf;
  --admin-border-strong: #111111;
  --admin-text: #111111;
  --admin-muted: #68625a;
  --admin-primary: #111111;
  --admin-primary-soft: #efede7;
  --admin-primary-text: #ffffff;
  --admin-primary-hover: #2a2a2a;
  --admin-accent: #8b1e1e;
  --admin-accent-soft: #f7e8e4;
  --admin-success: #176c43;
  --admin-success-soft: #e8f3ec;
  --admin-warning: #a45b12;
  --admin-warning-soft: #fff1d8;
  --admin-danger: #b42318;
  --admin-danger-soft: #fae5e1;
  --admin-purple: #4b2e83;
  --admin-purple-soft: #eee8fb;
  --admin-sidebar-bg: #111111;
  --admin-sidebar-text: #ffffff;
  --admin-sidebar-muted: rgba(255, 255, 255, 0.62);
  --admin-sidebar-active-bg: #ffffff;
  --admin-sidebar-active-text: #111111;
  --admin-table-head-bg: #ede9df;
  --admin-input-bg: #faf9f6;
  --admin-secondary-button-bg: #ffffff;
  --admin-secondary-button-hover-bg: #f7f7f4;
  --admin-secondary-button-text: #111111;
  --admin-danger-text: #ffffff;
  --admin-modal-backdrop: rgba(17, 17, 17, 0.58);
  --admin-page-gradient-start: #f7f4ee;
  --admin-page-gradient-end: #efede7;
  --admin-shadow: 0 14px 34px rgba(17, 17, 17, 0.08);
  color: var(--admin-text);
  background: var(--admin-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* V2.10 fix1 final layout override: sidebar + main canvas only. */
.admin-layout.admin-shell {
  grid-template-columns: 240px minmax(0, 1fr);
}

.layout-info-panel {
  display: none;
}

@media (max-width: 1180px) {
  .admin-layout.admin-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

/* V2.10 - Gemini three-column borderless canvas UI */
:root {
  --admin-bg: #ffffff;
  --admin-bg-soft: #ffffff;
  --admin-card-bg: #ffffff;
  --admin-surface: #f4f5f7;
  --admin-border: #f1f1f4;
  --admin-border-strong: #d9dde3;
  --admin-text: #111111;
  --admin-muted: #666668;
  --admin-primary: #0d2e1f;
  --admin-primary-soft: #e8f4ee;
  --admin-primary-text: #ffffff;
  --admin-primary-hover: #164e35;
  --admin-accent: #e67e22;
  --admin-accent-soft: #fff2e5;
  --admin-success: #176c43;
  --admin-success-soft: #e8f8f5;
  --admin-warning: #a45b12;
  --admin-warning-soft: #fff5e7;
  --admin-danger: #b42318;
  --admin-danger-soft: #fae5e1;
  --admin-sidebar-bg: #0d2e1f;
  --admin-sidebar-text: #ffffff;
  --admin-sidebar-muted: rgba(255, 255, 255, 0.68);
  --admin-sidebar-active-bg: #e67e22;
  --admin-sidebar-active-text: #ffffff;
  --admin-table-head-bg: #f4f5f7;
  --admin-input-bg: #f4f5f7;
  --admin-secondary-button-bg: #f4f5f7;
  --admin-secondary-button-hover-bg: #e8eaee;
  --admin-secondary-button-text: #111111;
  --admin-page-gradient-start: #ffffff;
  --admin-page-gradient-end: #ffffff;
  --admin-shadow: none;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body {
  background: #ffffff;
  color: var(--admin-text);
  line-height: 1.6;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.page {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.admin-layout.admin-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 300px;
  gap: 0;
  width: 100vw;
  height: 100vh;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
}

.admin-layout.admin-shell[hidden] {
  display: none;
}

.layout-sidebar.admin-sidebar {
  position: static;
  width: 240px;
  height: 100vh;
  min-height: 0;
  padding: 24px 16px;
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  background: #0d2e1f;
  color: #ffffff;
}

.admin-sidebar-title {
  padding: 0 8px 24px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-sidebar-title strong,
.section-head h2,
.admin-section h2,
.admin-section h3,
.admin-section h4,
.layout-info-panel h4,
.admin-top-path strong,
.text-bold,
strong {
  letter-spacing: -0.02em;
}

.admin-sidebar-title strong {
  font-size: 16px;
  font-weight: 700;
}

.admin-sidebar-title span {
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.admin-nav-group-title {
  padding: 0 8px 8px;
  color: rgba(255, 255, 255, 0.36);
  font-size: 11px;
  letter-spacing: 0.05em;
}

.admin-nav-item {
  min-height: 36px;
  margin-bottom: 4px;
  padding: 9px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  text-align: left;
}

.admin-nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}

.admin-nav-item.active,
.admin-nav-item[aria-current="page"] {
  background: #e67e22;
  color: #ffffff;
  font-weight: 700;
}

.admin-sidebar-actions button {
  width: 100%;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.layout-canvas.admin-content {
  min-width: 0;
  height: 100vh;
  padding: 40px 48px;
  overflow-y: auto;
  background: #ffffff;
}

.layout-info-panel {
  display: block;
  width: 300px;
  height: 100vh;
  padding: 40px 24px;
  overflow-y: auto;
  border-left: 1px solid #f1f1f4;
  background: #fcfcfd;
}

.info-panel-title {
  margin: 0 0 24px;
  color: #111111;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.info-card {
  margin: 0 0 28px;
  color: #666668;
  font-size: 13px;
  line-height: 1.6;
}

.info-card h4 {
  margin: 0 0 8px;
  color: #111111;
  font-size: 13px;
  font-weight: 700;
}

.info-card p {
  margin: 0;
}

.admin-top-path {
  margin: 0 0 36px;
  padding: 0 0 16px;
  border-bottom: 1px solid #f1f1f4;
  background: transparent;
}

.layout-canvas > .admin-section.panel,
.admin-content > .admin-section.panel {
  margin: 0 0 48px;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.admin-content .panel + .panel {
  margin-top: 0;
}

.section-head {
  margin-bottom: 24px;
  padding-bottom: 0;
  border-bottom: 0;
}

.section-head h2 {
  margin: 0;
  color: #111111;
  font-size: 22px;
  font-weight: 750;
  line-height: 1.25;
}

.desc,
.section-head .desc,
p,
td,
th,
label,
.status {
  line-height: 1.6;
}

input,
select,
textarea {
  border: 1px solid transparent;
  border-radius: 6px;
  background: #f4f5f7;
  color: #111111;
  font-family: inherit;
  box-shadow: none;
}

input,
select {
  min-height: 38px;
}

textarea {
  min-height: 86px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #0d2e1f;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(13, 46, 31, 0.08);
  outline: none;
}

button {
  min-height: 38px;
  border-radius: 6px;
  border-color: transparent;
  background: #0d2e1f;
  color: #ffffff;
  font-family: inherit;
  font-weight: 650;
  box-shadow: none;
}

button:hover {
  background: #164e35;
}

button.secondary {
  border-color: transparent;
  background: #f4f5f7;
  color: #111111;
}

button.secondary:hover {
  background: #e8eaee;
}

button.danger {
  background: #b42318;
  color: #ffffff;
}

button:disabled {
  background: #eef0f3;
  color: #a0a5ad;
  cursor: not-allowed;
}

.operation-log-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.operation-log-filter-grid .field {
  margin: 0;
}

.operation-log-card {
  border: 1px solid #f1f1f4;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.operation-log-table-wrap {
  overflow-x: auto;
}

.operation-log-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.operation-log-table th,
.operation-log-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #f1f1f4;
  text-align: left;
  vertical-align: top;
}

.operation-log-table th {
  color: #666668;
  background: #f4f5f7;
  font-size: 12px;
  font-weight: 750;
}

.operation-log-table td {
  color: #111111;
  font-size: 13px;
}

.operation-log-result {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e8f8f5;
  color: #176c43;
  font-size: 12px;
  font-weight: 750;
}

.operation-log-result.failed {
  background: #fae5e1;
  color: #b42318;
}

.operation-log-muted {
  color: #666668;
  font-size: 12px;
}

.system-dataflow-panel {
  display: grid;
  gap: 18px;
}

.system-dataflow-panel[hidden] {
  display: none;
}

.system-dataflow-hero {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.system-dataflow-hero > div,
.system-dataflow-card,
.system-dataflow-code-card {
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-card-bg);
}

.system-dataflow-hero > div {
  padding: 16px;
}

.system-dataflow-hero .label {
  display: block;
  margin-bottom: 6px;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 650;
}

.system-dataflow-hero strong {
  display: block;
  color: var(--admin-text);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.system-dataflow-card {
  padding: 18px;
}

.system-dataflow-card h3,
.system-dataflow-card h4,
.system-dataflow-code-card h4 {
  margin: 0 0 10px;
}

.system-dataflow-card .desc {
  margin: 0 0 14px;
  color: var(--admin-muted);
}

.system-dataflow-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 18px;
}

.system-dataflow-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.system-dataflow-list li {
  color: var(--admin-text);
  line-height: 1.65;
}

.system-dataflow-code-list {
  display: grid;
  gap: 14px;
}

.system-dataflow-code-card {
  padding: 14px;
  background: var(--admin-bg-soft);
}

.system-dataflow-code {
  max-height: 420px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #0f172a;
  color: #e5e7eb;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre;
}

@media (max-width: 1180px) {
  .admin-layout.admin-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .layout-sidebar.admin-sidebar {
    width: 220px;
  }

  .layout-info-panel {
    display: none;
  }
}

@media (max-width: 820px) {
  body {
    overflow: auto;
  }

  .admin-layout.admin-shell {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
  }

  .layout-sidebar.admin-sidebar,
  .layout-canvas.admin-content {
    width: 100%;
    height: auto;
    min-height: 0;
  }

  .layout-sidebar.admin-sidebar {
    padding: 18px 16px;
  }

  .layout-canvas.admin-content {
    padding: 28px 18px 40px;
    overflow: visible;
  }

  .admin-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .admin-nav-group-title {
    grid-column: 1 / -1;
  }

  .operation-log-filter-grid {
    grid-template-columns: 1fr;
  }

  .system-dataflow-hero,
  .system-dataflow-grid {
    grid-template-columns: 1fr;
  }
}

/* V2.10 fix1 final layout override: sidebar + main canvas only. */
.admin-layout.admin-shell {
  grid-template-columns: 240px minmax(0, 1fr);
}

.layout-info-panel {
  display: none;
}

@media (max-width: 1180px) {
  .admin-layout.admin-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

/* V2.10 fix1: user confirmed no right-side info panel. */
.admin-layout.admin-shell {
  grid-template-columns: 240px minmax(0, 1fr);
}

.layout-info-panel {
  display: none;
}

@media (max-width: 1180px) {
  .admin-layout.admin-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

:root[data-admin-theme="dopamine"] {
  --admin-bg: #fff3f5;
  --admin-bg-soft: #fff9fb;
  --admin-card-bg: #ffffff;
  --admin-surface: #fff5fa;
  --admin-border: #f7bfd6;
  --admin-text: #181019;
  --admin-muted: #7a4d62;
  --admin-primary: #e11d8f;
  --admin-primary-soft: #ffe1f1;
  --admin-primary-text: #ffffff;
  --admin-primary-hover: #be1475;
  --admin-accent: #2563eb;
  --admin-accent-soft: #dbeafe;
  --admin-sidebar-bg: #25091d;
  --admin-sidebar-active-bg: #ffe55c;
  --admin-sidebar-active-text: #181019;
  --admin-table-head-bg: #ffe1f1;
  --admin-input-bg: #ffffff;
  --admin-secondary-button-bg: #ffffff;
  --admin-secondary-button-hover-bg: #fff5fa;
  --admin-secondary-button-text: #181019;
  --admin-page-gradient-start: #fff6bf;
  --admin-page-gradient-end: #dbeafe;
}

:root[data-admin-theme="pastel"] {
  --admin-bg: #f7f5ff;
  --admin-bg-soft: #fbfaff;
  --admin-card-bg: #ffffff;
  --admin-surface: #f6f7ff;
  --admin-border: #d8d5f0;
  --admin-text: #202033;
  --admin-muted: #6f6d85;
  --admin-primary: #6d5dfc;
  --admin-primary-soft: #ebe9ff;
  --admin-primary-text: #ffffff;
  --admin-primary-hover: #5546da;
  --admin-accent: #e58ab6;
  --admin-accent-soft: #fde7f1;
  --admin-sidebar-bg: #29243f;
  --admin-sidebar-active-bg: #ffd9ec;
  --admin-sidebar-active-text: #202033;
  --admin-table-head-bg: #ebe9ff;
  --admin-input-bg: #ffffff;
  --admin-secondary-button-bg: #ffffff;
  --admin-secondary-button-hover-bg: #f6f7ff;
  --admin-secondary-button-text: #202033;
  --admin-page-gradient-start: #fce7f3;
  --admin-page-gradient-end: #dbeafe;
}

:root[data-admin-theme="powerRed"] {
  --admin-bg: #121212;
  --admin-bg-soft: #1d1d1d;
  --admin-card-bg: #1b1b1b;
  --admin-surface: #242424;
  --admin-border: #3b3030;
  --admin-border-strong: #f2f2f2;
  --admin-text: #f8fafc;
  --admin-muted: #b8b2ad;
  --admin-primary: #ef4444;
  --admin-primary-soft: #3a1b1b;
  --admin-primary-text: #ffffff;
  --admin-primary-hover: #dc2626;
  --admin-accent: #f87171;
  --admin-accent-soft: #3a1b1b;
  --admin-sidebar-bg: #070707;
  --admin-sidebar-active-bg: #ef4444;
  --admin-sidebar-active-text: #ffffff;
  --admin-table-head-bg: #2b1f1f;
  --admin-input-bg: #111111;
  --admin-secondary-button-bg: #242424;
  --admin-secondary-button-hover-bg: #2e2e2e;
  --admin-secondary-button-text: #f8fafc;
  --admin-modal-backdrop: rgba(0, 0, 0, 0.72);
  --admin-page-gradient-start: #171717;
  --admin-page-gradient-end: #101010;
  --admin-shadow: 0 16px 38px rgba(0, 0, 0, 0.36);
}

:root[data-admin-theme="forestOrange"] {
  --admin-bg: #edf3ea;
  --admin-bg-soft: #f8fbf5;
  --admin-card-bg: #ffffff;
  --admin-surface: #f3f7ef;
  --admin-border: #c8d6bf;
  --admin-text: #102116;
  --admin-muted: #536456;
  --admin-primary: #175c38;
  --admin-primary-soft: #e4f1e7;
  --admin-primary-text: #ffffff;
  --admin-primary-hover: #0f4429;
  --admin-accent: #c75a16;
  --admin-accent-soft: #ffe7d2;
  --admin-sidebar-bg: #0c2417;
  --admin-sidebar-active-bg: #f59e0b;
  --admin-sidebar-active-text: #102116;
  --admin-table-head-bg: #e4f1e7;
  --admin-input-bg: #ffffff;
  --admin-secondary-button-bg: #ffffff;
  --admin-secondary-button-hover-bg: #f3f7ef;
  --admin-secondary-button-text: #102116;
  --admin-page-gradient-start: #f7f1df;
  --admin-page-gradient-end: #dfeedd;
}

:root[data-admin-theme="freshGreen"] {
  --admin-bg: #f3fbf3;
  --admin-bg-soft: #fbfffb;
  --admin-card-bg: #ffffff;
  --admin-surface: #f3faf2;
  --admin-border: #cfe5ce;
  --admin-text: #132017;
  --admin-muted: #5d705f;
  --admin-primary: #2f8f5b;
  --admin-primary-soft: #e5f5ea;
  --admin-primary-text: #ffffff;
  --admin-primary-hover: #247548;
  --admin-accent: #ea8ab2;
  --admin-accent-soft: #fde8f1;
  --admin-sidebar-bg: #102417;
  --admin-sidebar-active-bg: #ffd7e9;
  --admin-sidebar-active-text: #132017;
  --admin-table-head-bg: #e5f5ea;
  --admin-input-bg: #ffffff;
  --admin-secondary-button-bg: #ffffff;
  --admin-secondary-button-hover-bg: #f3faf2;
  --admin-secondary-button-text: #132017;
  --admin-page-gradient-start: #ffe9f3;
  --admin-page-gradient-end: #e3f7df;
}

:root[data-admin-theme="mamba"] {
  --admin-bg: #17121f;
  --admin-bg-soft: #21182f;
  --admin-card-bg: #21182f;
  --admin-surface: #2a1f3c;
  --admin-border: #4b3b66;
  --admin-border-strong: #f5d36b;
  --admin-text: #fff8df;
  --admin-muted: #d9c99b;
  --admin-primary: #f5c542;
  --admin-primary-soft: #443419;
  --admin-primary-text: #16111e;
  --admin-primary-hover: #d9a915;
  --admin-accent: #7c3aed;
  --admin-accent-soft: #36224f;
  --admin-sidebar-bg: #0f0a17;
  --admin-sidebar-active-bg: #f5c542;
  --admin-sidebar-active-text: #16111e;
  --admin-table-head-bg: #302247;
  --admin-input-bg: #17121f;
  --admin-secondary-button-bg: #2a1f3c;
  --admin-secondary-button-hover-bg: #36224f;
  --admin-secondary-button-text: #fff8df;
  --admin-modal-backdrop: rgba(0, 0, 0, 0.72);
  --admin-page-gradient-start: #20172e;
  --admin-page-gradient-end: #120d1b;
  --admin-shadow: 0 16px 38px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--admin-page-gradient-start) 0%, var(--admin-bg) 42%, var(--admin-page-gradient-end) 100%);
}

.page {
  width: min(1360px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 36px;
}

.is-logged-out .page {
  width: min(420px, calc(100% - 32px));
  min-height: 100vh;
  display: grid;
  align-items: center;
}

.is-logged-in .page {
  width: min(1360px, calc(100% - 32px));
  min-height: 0;
  display: block;
  padding-top: 30px;
}

.login-view[hidden],
.admin-shell[hidden],
.login-env-field[hidden],
.login-support-actions[hidden],
.status-panel[hidden],
#adminBuildBadge[hidden] {
  display: none !important;
}

body.is-logged-out .admin-shell,
body.is-logged-in .login-view {
  display: none !important;
}

.admin-shell {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-sidebar {
  position: sticky;
  top: 18px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  background: var(--admin-sidebar-bg);
  box-shadow: var(--admin-shadow);
}

.admin-sidebar-title {
  display: grid;
  gap: 3px;
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--admin-sidebar-muted);
  font-size: 11px;
  font-weight: 700;
}

.admin-sidebar-title strong {
  color: var(--admin-sidebar-text);
  font-size: 17px;
  line-height: 1.25;
}

.admin-sidebar-title span {
  color: var(--admin-primary);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-sidebar-actions {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
}

.admin-sidebar-actions button {
  width: 100%;
}

.smart-search-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px 16px;
}

.smart-search-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.smart-search-field {
  margin-bottom: 0;
}

.smart-search-status {
  color: var(--admin-muted);
  font-size: 13px;
  line-height: 1.55;
}

.smart-search-suggestions,
.smart-search-results {
  display: grid;
  gap: 8px;
}

.smart-search-suggestion-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.smart-search-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0 6px;
  color: var(--admin-text);
  font-size: 14px;
  border-bottom: 1px dashed var(--admin-border);
}

.smart-search-close-button {
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
}

.smart-search-result-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-bg-soft);
}

.smart-search-result-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.smart-search-result-title {
  margin: 0;
  color: var(--admin-text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
}

.smart-search-result-subtitle,
.smart-search-result-meta {
  margin: 0;
  color: var(--admin-muted);
  font-size: 13px;
  line-height: 1.5;
}

.smart-search-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-sidebar .admin-theme-switch {
  display: grid;
  gap: 7px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.admin-sidebar .admin-theme-switch span {
  color: var(--admin-sidebar-muted);
  font-size: 11px;
  font-weight: 800;
}

.admin-sidebar .admin-theme-switch select {
  width: 100%;
  max-width: none;
  height: 36px;
  border-color: rgba(255, 255, 255, 0.22);
  background: var(--admin-sidebar-active-bg);
  color: var(--admin-sidebar-active-text);
  font-weight: 800;
}

.system-settings-panel {
  display: grid;
  gap: 16px;
}

.system-settings-panel[hidden] {
  display: none;
}

.system-settings-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #d8e0d2;
  border-radius: 8px;
  background: var(--admin-bg-soft);
}

.system-settings-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.system-settings-card h3,
.system-settings-card p {
  margin: 0;
}

.system-settings-card h3 {
  color: var(--admin-text);
}

.system-settings-card p {
  margin-top: 6px;
  color: var(--admin-muted);
}

.system-settings-theme-switch {
  display: grid;
  max-width: 360px;
  gap: 7px;
}

.system-settings-theme-switch span {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 800;
}

.system-settings-theme-switch select {
  width: 100%;
  max-width: none;
  min-height: 40px;
  background: var(--admin-input-bg);
}

.ai-draft-key-state {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid var(--admin-border);
  border-radius: 999px;
  background: var(--admin-card-bg);
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 800;
}

.ai-draft-key-state.is-configured {
  border-color: rgba(22, 163, 74, 0.28);
  background: rgba(22, 163, 74, 0.08);
  color: #15803d;
}

.admin-password-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-password-grid label {
  display: grid;
  gap: 6px;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-password-grid input {
  width: 100%;
  max-width: none;
  min-height: 40px;
  background: var(--admin-input-bg);
}

.admin-password-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.ai-draft-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ai-draft-settings-grid label {
  display: grid;
  gap: 6px;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 800;
}

.ai-draft-settings-grid input,
.ai-draft-settings-grid select {
  width: 100%;
  max-width: none;
  min-height: 40px;
  background: var(--admin-input-bg);
}

.ai-draft-toggle-row {
  align-content: center;
  grid-template-columns: auto 1fr;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-card-bg);
}

.ai-draft-toggle-row input {
  width: 16px;
  min-height: 16px;
  margin: 2px 0 0;
}

.ai-draft-settings-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.offline-course-panel {
  display: grid;
  gap: 16px;
}

.offline-course-panel[hidden] {
  display: none;
}

.offline-course-toolbar,
.offline-course-actions,
.offline-course-admin-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.offline-course-toolbar-note {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 700;
}

.offline-course-editor,
.offline-course-list-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-bg-soft);
}

.offline-course-editor-head,
.offline-course-list-head,
.offline-course-admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.offline-course-editor-head h3,
.offline-course-list-head h3,
.offline-course-admin-head h3,
.offline-course-editor-head p,
.offline-course-list-head p,
.offline-course-admin-head p {
  margin: 0;
}

.offline-course-editor-head p,
.offline-course-list-head p,
.offline-course-admin-head p {
  margin-top: 6px;
  color: var(--admin-muted);
}

.offline-course-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.offline-course-form-grid label {
  display: grid;
  gap: 6px;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 800;
}

.offline-course-form-grid input,
.offline-course-form-grid textarea {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  background: var(--admin-input-bg);
}

.offline-course-publish-field {
  grid-template-columns: auto 1fr;
  align-content: center;
  align-items: center;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-card-bg);
}

.offline-course-publish-field input {
  width: 16px;
  min-height: 16px;
  margin: 0;
}

.offline-course-content-field {
  grid-column: 1 / -1;
}

.offline-course-admin-list {
  display: grid;
  gap: 12px;
}

.offline-course-admin-card {
  padding: 14px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-card-bg);
}

.offline-course-admin-card.is-expired {
  opacity: 0.72;
}

.offline-course-status {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: var(--admin-table-head-bg);
  color: var(--admin-text);
}

.offline-course-status.is-published {
  color: #0f6b3f;
}

.offline-course-status.is-draft,
.offline-course-status.is-expired {
  color: var(--admin-muted);
}

.offline-course-admin-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px 14px;
  color: var(--admin-muted);
  font-size: 13px;
}

.offline-course-admin-content {
  margin-top: 12px;
}

.offline-course-admin-content ul {
  margin: 0;
  padding-left: 20px;
}

.offline-course-muted {
  color: var(--admin-muted);
}

.offline-course-admin-actions {
  margin-top: 14px;
}

.system-settings-reserved-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.system-settings-reserved-list div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-card-bg);
}

.system-settings-reserved-list strong {
  color: var(--admin-text);
}

.system-settings-reserved-list span {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 700;
}

.plan-current-head-actions,
.student-plan-view-day-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.admin-nav {
  display: grid;
  gap: 6px;
}

.admin-nav-group-title {
  margin: 10px 0 3px;
  color: var(--admin-sidebar-muted);
  font-size: 11px;
  font-weight: 800;
}

.admin-nav-group-title:first-child {
  margin-top: 0;
}

.admin-nav-item {
  width: 100%;
  height: auto;
  min-height: 40px;
  padding: 10px 12px 10px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--admin-sidebar-muted);
  text-align: left;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.admin-nav-item:hover,
.admin-nav-item.is-active {
  border-color: var(--admin-primary);
  background: rgba(255, 255, 255, 0.1);
  color: var(--admin-sidebar-text);
}

.admin-nav-item.is-active {
  position: relative;
  background: var(--admin-sidebar-active-bg);
  color: var(--admin-sidebar-active-text);
  box-shadow: inset 4px 0 0 var(--admin-accent);
}

.admin-content {
  min-width: 0;
}

.admin-top-path {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-card-bg);
  box-shadow: var(--admin-shadow);
}

.admin-top-path .label {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-top-path strong {
  min-width: 0;
  color: var(--admin-text);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.admin-version-chip {
  margin-left: auto;
  padding: 3px 8px;
  border: 1px solid var(--admin-border);
  border-radius: 999px;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-content .panel {
  margin-bottom: 0;
}

.admin-section[hidden] {
  display: none;
}

.panel {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  background: var(--admin-card);
  box-shadow: var(--admin-shadow);
}

.admin-auth-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.login-view {
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  margin-bottom: 0;
}

.admin-auth-grid .panel {
  margin-bottom: 0;
}

.login-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
}

.login-copy {
  grid-column: 1;
  align-self: center;
  min-width: 0;
}

.login-panel .eyebrow {
  margin-bottom: 4px;
}

.login-panel h1 {
  font-size: 22px;
}

.login-panel .desc {
  margin: 6px 0 0;
}

.login-form {
  grid-column: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: end;
  justify-self: stretch;
  width: 100%;
  min-width: 0;
}

.login-form .field {
  margin-bottom: 0;
}

.login-remember-row {
  display: inline-grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  color: var(--admin-muted);
  font-size: 13px;
  font-weight: 800;
}

.login-remember-row input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.login-form .actions {
  grid-column: 1 / -1;
  margin-top: 0;
}

.status-panel {
  padding: 14px 18px;
}

.status-panel h2 {
  font-size: 16px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--admin-text);
}

h1 {
  font-size: 26px;
  line-height: 1.25;
}

h2 {
  font-size: 19px;
  line-height: 1.35;
}

h3 {
  font-size: 16px;
  line-height: 1.4;
}

h4 {
  font-size: 15px;
  line-height: 1.4;
}

.desc {
  margin: 10px 0 20px;
  color: var(--admin-muted);
  font-size: 14px;
  line-height: 1.7;
}

.field {
  display: block;
  margin: 0 0 14px;
}

.field span,
.label {
  display: block;
  margin-bottom: 7px;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  max-width: 420px;
  padding: 0 12px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-bg-soft);
  color: var(--admin-text);
  font-size: 14px;
  outline: none;
}

input,
select {
  height: 42px;
}

textarea {
  min-height: 86px;
  padding-top: 10px;
  padding-bottom: 10px;
  line-height: 1.5;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--admin-primary);
  background: var(--admin-input-bg);
  box-shadow: 0 0 0 3px rgba(139, 30, 30, 0.08);
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

button {
  height: 42px;
  padding: 0 16px;
  border: 1px solid var(--admin-primary);
  border-radius: 8px;
  background: var(--admin-primary);
  color: var(--admin-primary-text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

button:hover {
  border-color: var(--admin-primary-hover);
  background: var(--admin-primary-hover);
  box-shadow: 0 8px 18px rgba(17, 17, 17, 0.14);
}

button.secondary {
  border-color: var(--admin-border);
  background: var(--admin-secondary-button-bg);
  color: var(--admin-secondary-button-text);
}

button.secondary:hover {
  border-color: var(--admin-primary);
  background: var(--admin-secondary-button-hover-bg);
}

button.danger {
  border-color: var(--admin-danger);
  background: var(--admin-danger);
  color: var(--admin-danger-text);
}

button.small-button {
  height: 32px;
  margin-top: 12px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
}

button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.status,
.dashboard-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--admin-border);
  background: var(--admin-surface);
  color: var(--admin-muted);
  font-size: 13px;
}

.login-panel .actions {
  margin-top: 4px;
}

.summary,
.dashboard-summary,
.coach-review-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.summary div,
.metric-card {
  min-height: 78px;
  padding: 14px;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: var(--admin-surface);
}

.status-panel .summary {
  margin: 10px 0;
}

.status-panel .summary div {
  min-height: 58px;
  padding: 10px 12px;
}

.status-panel .summary strong {
  font-size: 16px;
}

.summary strong,
.metric-card strong {
  display: block;
  color: var(--admin-text);
  font-size: 18px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.metric-card strong {
  font-size: 26px;
}

.metric-card.danger {
  border-color: #e7b4ac;
  background: var(--admin-danger-soft);
}

.metric-card.danger strong {
  color: var(--admin-danger);
}

.metric-card.warning {
  border-color: #e5bd72;
  background: var(--admin-warning-soft);
}

.metric-card.warning strong {
  color: var(--admin-warning);
}

.metric-card.muted {
  border-color: var(--admin-border);
  background: #f0efeb;
}

.result {
  min-height: 180px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #111827;
  color: #f9fafb;
  font-size: 12px;
  line-height: 1.5;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-head .desc {
  margin-bottom: 0;
}

.dashboard-status {
  margin: 0 0 14px;
}

.system-health-panel {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: var(--admin-bg-soft);
}

.system-health-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.system-health-head .desc {
  margin-bottom: 0;
}

.system-health-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.system-health-time {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 700;
}

.system-health-summary {
  margin: 0;
}

.system-health-summary .metric-card small {
  display: block;
  margin-top: 6px;
  color: var(--admin-muted);
  font-size: 12px;
  line-height: 1.45;
}

.system-health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.system-health-block {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: var(--admin-surface);
}

.system-health-list {
  display: grid;
  gap: 8px;
}

.system-health-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--admin-border);
  border-left: 4px solid var(--admin-muted);
  border-radius: 8px;
  background: var(--admin-bg-soft);
}

.system-health-item strong {
  color: var(--admin-text);
  font-size: 13px;
}

.system-health-item span {
  color: var(--admin-muted);
  font-size: 12px;
  line-height: 1.55;
}

.system-health-item.warning {
  border-left-color: var(--admin-warning);
  background: var(--admin-warning-soft);
}

.system-health-item.danger {
  border-left-color: var(--admin-danger);
  background: var(--admin-danger-soft);
}

.v313-preview-console-panel {
  display: grid;
  gap: 16px;
}

.v313-preview-console-panel[hidden] {
  display: none;
}

.v313-preview-block {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: var(--admin-bg-soft);
}

.v313-queue-panel {
  border-color: rgba(14, 165, 233, .35);
  background: #f8fbff;
}

.v313-queue-warning {
  padding: 10px 12px;
  border: 1px solid #fde68a;
  border-radius: 10px;
  background: #fffbeb;
  color: #92400e;
  font-size: 13px;
  line-height: 1.5;
}

.v313-preview-block-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.v313-preview-block-head .desc {
  margin-bottom: 0;
}

.v313-preview-two-column {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.v313-preview-layer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.v313-preview-subblock {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface);
}

.v313-preview-filter-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(120px, 0.6fr));
  gap: 12px;
  align-items: end;
}

.v313-preview-actions {
  align-items: center;
  flex-wrap: wrap;
}

.v313-preview-user-match {
  padding: 10px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface);
  color: var(--admin-muted);
  font-size: 13px;
  line-height: 1.55;
}

.v313-preview-list {
  display: grid;
  gap: 8px;
}

.v313-preview-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.v313-preview-list-item,
.v313-preview-package-row,
.v313-preview-collection-card {
  padding: 10px 12px;
  border: 1px solid var(--admin-border);
  border-left: 4px solid var(--admin-muted);
  border-radius: 8px;
  background: var(--admin-bg-soft);
  color: var(--admin-text);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.v313-preview-collection-card {
  display: grid;
  gap: 6px;
  align-content: start;
}

.v313-preview-collection-card strong,
.v313-preview-cn-value {
  display: block;
  color: var(--admin-text);
  font-size: 15px;
  line-height: 1.35;
}

.v313-preview-collection-card p {
  margin: 0;
  color: var(--admin-muted);
  font-size: 12px;
  line-height: 1.55;
}

.v313-preview-tech-name {
  display: inline-block;
  margin-top: 3px;
  color: var(--admin-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  white-space: normal;
}

.v313-preview-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.v313-preview-count,
.v313-preview-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid var(--admin-border);
  border-radius: 999px;
  color: var(--admin-muted);
  background: var(--admin-surface);
  font-size: 12px;
  font-weight: 700;
}

.v313-preview-status-chip.danger {
  border-color: #e7b4ac;
  color: var(--admin-danger);
  background: var(--admin-danger-soft);
}

.v313-preview-package-row {
  display: grid;
  gap: 4px;
}

.v313-preview-package-row span {
  color: var(--admin-muted);
  font-size: 12px;
}

.v313-preview-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface);
}

.v313-preview-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.v313-preview-table th,
.v313-preview-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--admin-border);
  color: var(--admin-text);
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.v313-preview-table th {
  background: var(--admin-table-head-bg);
  color: var(--admin-muted);
  font-weight: 700;
}

.v313-preview-package-detail,
.v313-preview-audit-details {
  display: grid;
  gap: 8px;
}

.v313-preview-audit-details pre {
  max-height: 360px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #111827;
  color: #f9fafb;
  font-size: 12px;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .v313-preview-layer-grid,
  .v313-preview-filter-grid {
    grid-template-columns: 1fr;
  }
}

.coach-dashboard-panel {
  display: grid;
  gap: 14px;
}

.coach-dashboard-toolbar {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.coach-dashboard-toolbar .field {
  min-width: 150px;
  margin-bottom: 0;
}

.coach-dashboard-toolbar select {
  max-width: none;
}

.v313-source-pill {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  max-width: min(100%, 760px);
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface);
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  white-space: normal;
}

.cycle-report-v313-direct-card {
  border-color: rgba(56, 189, 248, 0.36);
}

.cycle-report-v313-direct-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(140px, 1fr)) auto auto;
  gap: 10px;
  align-items: end;
}

.cycle-report-v313-direct-controls .v313-source-pill {
  grid-column: 1 / -1;
}

.cycle-report-v313-direct-result {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.cycle-report-v313-direct-card-row {
  padding: 12px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface);
}

.cycle-report-v313-direct-row-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.cycle-report-v313-direct-row-head h4 {
  margin: 0;
  font-size: 15px;
}

.cycle-report-v313-direct-row-head p {
  margin: 0;
  color: var(--admin-muted);
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.cycle-report-v313-direct-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.cycle-report-v313-direct-metric {
  min-height: 64px;
  padding: 8px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-bg);
}

.cycle-report-v313-direct-metric .label {
  display: block;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 800;
}

.cycle-report-v313-direct-metric strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 16px;
}

@media (max-width: 980px) {
  .cycle-report-v313-direct-controls {
    grid-template-columns: 1fr;
  }
}

.coach-dashboard-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.coach-dashboard-summary-card small {
  display: block;
  margin-top: 5px;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.coach-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.coach-dashboard-three-layer {
  grid-template-columns: minmax(0, 1fr);
}

.coach-dashboard-section {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: var(--admin-surface);
}

.coach-dashboard-layer-renewal {
  border-color: color-mix(in srgb, var(--admin-purple) 34%, var(--admin-border));
  background: color-mix(in srgb, var(--admin-card-bg) 92%, var(--admin-purple) 8%);
}

.coach-dashboard-layer-must {
  border-color: color-mix(in srgb, var(--admin-danger) 32%, var(--admin-border));
}

.coach-dashboard-layer-no-training {
  border-color: color-mix(in srgb, var(--admin-warning) 18%, var(--admin-border));
  background: color-mix(in srgb, var(--admin-card-bg) 92%, var(--admin-warning) 8%);
}

.coach-dashboard-layer-observe {
  background: color-mix(in srgb, var(--admin-surface) 88%, var(--admin-muted) 12%);
}

.coach-dashboard-layer-tools {
  background: var(--admin-card-bg);
}

.coach-dashboard-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  user-select: none;
}

.coach-dashboard-section.is-collapsed .coach-dashboard-section-head {
  margin-bottom: 0;
}

.coach-dashboard-section-head:focus-visible {
  outline: 2px solid var(--admin-primary);
  outline-offset: 3px;
  border-radius: 8px;
}

.coach-dashboard-section-head > div {
  min-width: 0;
}

.coach-dashboard-section-head h3 {
  margin: 0;
}

.coach-dashboard-section-head p {
  margin: 4px 0 0;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.coach-dashboard-toggle {
  display: none;
  flex: 0 0 auto;
  min-width: 52px;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid var(--admin-border);
  border-radius: 999px;
  background: var(--admin-card-bg);
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.coach-dashboard-toggle:hover,
.coach-dashboard-toggle:focus-visible {
  border-color: var(--admin-primary);
  background: var(--admin-primary-soft);
  color: var(--admin-primary);
}

.coach-dashboard-section h3 span {
  color: var(--admin-muted);
  font-size: 13px;
}

.coach-dashboard-list {
  display: grid;
  gap: 10px;
}

.coach-dashboard-tool-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.coach-dashboard-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-card-bg);
}

.coach-dashboard-card.is-collapsible,
.student-card.is-collapsible {
  cursor: pointer;
}

.coach-dashboard-card.is-collapsible:focus-visible,
.student-card.is-collapsible:focus-visible,
.dashboard-column h3:focus-visible {
  outline: 2px solid var(--admin-primary);
  outline-offset: 3px;
}

.coach-dashboard-card.is-collapsed .coach-dashboard-card-body,
.student-card.is-collapsed .student-card-body,
.dashboard-column.is-collapsed .student-list {
  display: none;
}

.coach-dashboard-card.is-collapsed .coach-dashboard-card-head p,
.coach-dashboard-card.is-collapsed .coach-dashboard-badges {
  display: none;
}

.coach-dashboard-card.is-observation {
  border-color: color-mix(in srgb, var(--admin-warning) 22%, var(--admin-border));
  opacity: .92;
}

.coach-dashboard-card.is-no-training {
  border-color: color-mix(in srgb, var(--admin-warning) 24%, var(--admin-border));
}

.coach-dashboard-card.is-renewal {
  border-color: color-mix(in srgb, var(--admin-purple) 36%, var(--admin-border));
}

.coach-dashboard-card.is-cycle-completed {
  border-color: color-mix(in srgb, var(--admin-danger) 32%, var(--admin-border));
}

.coach-dashboard-card.is-handled {
  background: var(--admin-surface);
  opacity: .84;
}

.coach-dashboard-tool-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  min-height: 136px;
  padding: 12px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface);
}

.coach-dashboard-tool-card h4 {
  margin: 0;
  color: var(--admin-text);
  font-size: 15px;
  line-height: 1.35;
}

.coach-dashboard-tool-card p {
  min-height: 38px;
  margin: 0;
  color: var(--admin-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.coach-dashboard-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.coach-dashboard-card h4 {
  margin: 0;
  color: var(--admin-text);
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.coach-dashboard-card-head p,
.coach-dashboard-reason {
  margin: 4px 0 0;
  color: var(--admin-muted);
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.coach-dashboard-reason {
  margin-top: 0;
  color: var(--admin-text);
}

.coach-dashboard-next-action {
  margin: -2px 0 0;
  color: var(--admin-primary);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.coach-dashboard-handled-block {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--admin-border);
}

.coach-dashboard-handled-block h4 {
  margin: 0;
  color: var(--admin-text);
  font-size: 14px;
  line-height: 1.35;
}

.coach-dashboard-handled-block h4 span {
  color: var(--admin-muted);
  font-size: 12px;
}

.coach-dashboard-handled-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 12px;
  padding: 10px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface);
}

.coach-dashboard-handled-summary strong {
  color: var(--admin-text);
  font-size: 13px;
  line-height: 1.35;
}

.coach-dashboard-handled-summary span {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.coach-dashboard-handled-summary button {
  grid-row: 1 / span 2;
  grid-column: 2;
}

.coach-dashboard-dismiss-confirm-dialog {
  width: min(560px, 100%);
}

.coach-dashboard-dismiss-confirm-actions .status {
  margin-right: auto;
}

.coach-dashboard-badges,
.coach-dashboard-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.coach-dashboard-actions {
  justify-content: flex-start;
}

.coach-dashboard-actions .coach-dashboard-dismiss-button {
  color: var(--admin-muted);
  border-color: var(--admin-border);
  background: var(--admin-surface);
}

.coach-dashboard-actions .coach-dashboard-dismiss-button:hover {
  color: var(--admin-text);
  border-color: var(--admin-muted);
}

.coach-dashboard-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.coach-dashboard-badge.red {
  background: var(--admin-danger-soft);
  color: var(--admin-danger);
}

.coach-dashboard-badge.yellow {
  background: var(--admin-warning-soft);
  color: var(--admin-warning);
}

.coach-dashboard-badge.cycle-completed,
.coach-dashboard-badge.plan-adjust,
.coach-dashboard-badge.renewal {
  background: var(--admin-purple-soft);
  color: var(--admin-purple);
}

.coach-dashboard-badge.review-pending,
.coach-dashboard-badge.data-quality,
.coach-dashboard-badge.no-training {
  background: var(--admin-warning-soft);
  color: var(--admin-warning);
}

.coach-dashboard-badge.reviewed,
.coach-dashboard-badge.normal-lead {
  background: var(--admin-success-soft);
  color: var(--admin-success);
}

.coach-dashboard-badge.pain {
  background: var(--admin-danger-soft);
  color: var(--admin-danger);
}

.coach-dashboard-badge.muted {
  background: var(--admin-primary-soft);
  color: var(--admin-muted);
}

.coach-dashboard-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.coach-dashboard-meta-grid div {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface);
}

.coach-dashboard-meta-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--admin-muted);
  font-size: 11px;
  font-weight: 800;
}

.coach-dashboard-meta-grid strong {
  display: block;
  color: var(--admin-text);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.coach-dashboard-detail {
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--admin-surface) 88%, var(--admin-background));
  padding: 8px 10px;
}

.coach-dashboard-detail summary {
  cursor: pointer;
  color: var(--admin-primary);
  font-weight: 800;
}

.coach-dashboard-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.coach-dashboard-detail-grid div {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  background: var(--admin-background);
}

.coach-dashboard-detail-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--admin-muted);
  font-size: 12px;
}

.coach-dashboard-detail-grid strong {
  display: block;
  color: var(--admin-text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.invite-code-create-card {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f9fafb;
}

.invite-code-create-form {
  display: grid;
  gap: 12px;
}

.invite-create-row {
  display: grid;
  gap: 12px;
  align-items: end;
}

.invite-create-row-primary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.invite-create-row-secondary {
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(132px, auto);
}

.invite-code-create-form .field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 0;
}

.invite-code-create-form .field span {
  min-height: 16px;
  margin-bottom: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-code-create-form input,
.invite-code-create-form select {
  max-width: none;
  background: #ffffff;
}

.invite-code-create-form button {
  align-self: end;
  white-space: nowrap;
}

#createInviteCodeMemberUntilHint[data-status-type="success"] {
  color: #166534;
}

#createInviteCodeMemberUntilHint[data-status-type="error"] {
  color: #b91c1c;
}

.created-invite-code-result {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.created-invite-code-result[hidden] {
  display: none;
}

.created-invite-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.created-invite-code-head .small-button {
  margin-top: 0;
}

.created-invite-code-list {
  min-height: 90px;
  max-height: 260px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  color: #111827;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre;
}

.status-panel .result {
  min-height: 72px;
  max-height: 128px;
}

.back-to-top-button {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 28;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--admin-border-strong);
  border-radius: 999px;
  background: var(--admin-secondary-button-bg);
  color: var(--admin-secondary-button-text);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.16s ease, transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.back-to-top-button.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top-button:hover {
  border-color: var(--button-secondary-hover-border);
  background: var(--admin-secondary-button-hover-bg);
  color: var(--text);
  transform: translateY(-1px);
}

.back-to-top-button:focus-visible {
  outline: 2px solid var(--info);
  outline-offset: 3px;
}

.back-to-top-button[hidden] {
  display: none;
}

.user-filter-card,
.invite-code-filter-card {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(130px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f9fafb;
}

.invite-code-filter-card {
  grid-template-columns: minmax(220px, 2fr) repeat(2, minmax(130px, 1fr)) auto;
}

.user-filter-card .field,
.invite-code-filter-card .field {
  margin-bottom: 0;
}

.user-filter-card input,
.user-filter-card select,
.invite-code-filter-card input,
.invite-code-filter-card select {
  max-width: none;
  background: #ffffff;
}

.user-category-stats-card {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f9fafb;
}

.user-category-stats-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.user-category-stats-head h3 {
  margin: 0;
  color: #111827;
  font-size: 16px;
}

.user-category-stats-head p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.user-category-stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.user-category-stats-grid .metric-card {
  min-height: 88px;
  padding: 12px;
  border-radius: 10px;
}

.user-category-stats-grid .metric-card strong {
  font-size: 24px;
}

.user-category-stats-grid .metric-card small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.user-summary,
.invite-code-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.user-summary-card {
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.user-summary-card:hover,
.user-summary-card:focus-visible {
  border-color: #94a3b8;
  background: #f8fafc;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.user-summary-card:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.user-summary-card.is-active {
  border-color: #111827;
  background: #eef2ff;
  box-shadow: inset 0 0 0 1px #111827;
}

.user-summary-card.is-active strong {
  color: #111827;
}

.user-actions,
.invite-code-actions {
  margin-bottom: 14px;
}

.user-list,
.invite-code-list {
  display: grid;
  gap: 12px;
}

.user-card,
.invite-code-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f9fafb;
}

.user-card {
  padding: 0;
  overflow: hidden;
}

.user-card-summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.user-card-summary::-webkit-details-marker {
  display: none;
}

.user-card-summary strong {
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.user-card[open] .user-card-summary {
  border-bottom: 1px solid #e5e7eb;
}

.user-card-body {
  padding: 16px;
}

.user-card.is-workbench-muted {
  border-color: #f59e0b;
  background: #fffbeb;
}

.coach-internal-note-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #f8fafc;
}

.coach-internal-note-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}

.coach-internal-note-head::-webkit-details-marker {
  display: none;
}

.coach-internal-note-head strong {
  color: #0f172a;
  font-size: 14px;
}

.coach-internal-note-body {
  display: grid;
  gap: 8px;
  padding-top: 6px;
}

.coach-followup-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.coach-followup-badge.is-focus,
.coach-followup-badge.is-renewal {
  background: #fef3c7;
  color: #92400e;
}

.coach-followup-badge.is-leave,
.coach-followup-badge.is-travel,
.coach-followup-badge.is-inactive_known {
  background: #ede9fe;
  color: #5b21b6;
}

.coach-followup-badge.is-changed_account,
.coach-followup-badge.is-test_account,
.coach-followup-badge.is-other {
  background: #e5e7eb;
  color: #374151;
}

.coach-internal-note-summary,
.coach-dashboard-internal-note,
.student-internal-note {
  margin: 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.coach-internal-note-meta {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.focus-student-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
}

.focus-student-panel.is-focus {
  border-color: #f59e0b;
  background: #fffbeb;
}

.focus-student-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}

.focus-student-summary::-webkit-details-marker {
  display: none;
}

.focus-student-summary strong {
  color: #0f172a;
  font-size: 14px;
}

.focus-student-body {
  display: grid;
  gap: 8px;
  padding-top: 6px;
}

.focus-student-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #374151;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.focus-student-badge.is-high {
  background: #fee2e2;
  color: #b91c1c;
}

.focus-student-badge.is-medium {
  background: #fef3c7;
  color: #92400e;
}

.focus-student-badge.is-low {
  background: #dbeafe;
  color: #1d4ed8;
}

.focus-student-text,
.coach-dashboard-focus-note,
.student-focus-note {
  margin: 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.focus-student-enabled-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 12px;
  color: #0f172a;
  font-weight: 800;
}

.focus-student-enabled-row input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.focus-student-tag-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.focus-student-tag-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.focus-student-tag-option input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.operation-log-actions {
  margin-bottom: 14px;
}

.operation-log-list {
  display: grid;
  gap: 12px;
}

.operation-log-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f9fafb;
}

.operation-log-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.operation-log-card-head h4 {
  overflow-wrap: anywhere;
}

.operation-log-card-head p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 12px;
}

.operation-log-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.operation-log-undo-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.operation-log-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 12px;
}

.operation-log-meta span {
  display: block;
  margin-bottom: 3px;
  color: #64748b;
  font-size: 12px;
}

.operation-log-meta strong {
  display: block;
  overflow-wrap: anywhere;
  color: #111827;
  font-size: 13px;
  line-height: 1.45;
}

.operation-log-detail {
  margin-top: 12px;
}

.operation-log-detail summary {
  cursor: pointer;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.operation-log-json {
  max-height: 260px;
  margin: 10px 0 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #111827;
  color: #f9fafb;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre;
}

.plan-converter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
  --plan-converter-pane-height: min(520px, 60vh);
}

.plan-converter-card {
  margin-top: 14px;
}

.plan-converter-card > h3 {
  margin-bottom: 10px;
}

.plan-converter-input-card,
.plan-converter-output-card,
.plan-message-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  background: #f9fafb;
}

.plan-converter-input-card,
.plan-converter-output-card[open] {
  display: flex;
  flex-direction: column;
  height: var(--plan-converter-pane-height);
  overflow: hidden;
}

.plan-converter-input-card .field {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  margin-bottom: 12px;
}

.plan-converter-input-card textarea {
  flex: 1 1 auto;
  max-width: none;
  min-height: 0;
  overflow: auto;
  background: #ffffff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
}

.plan-converter-output-head {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.plan-collapsible-card {
  min-width: 0;
}

.plan-collapsible-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.plan-collapsible-head::-webkit-details-marker {
  display: none;
}

.plan-collapsible-head h3 {
  margin: 0;
}

.plan-collapsible-head:hover h3,
.plan-collapsible-head:focus-visible h3 {
  color: var(--admin-primary);
}

.plan-converter-output-head .small-button {
  margin-top: 0;
}

.plan-converter-output {
  flex: 1 1 auto;
  min-height: 0;
  max-width: 100%;
  max-height: min(520px, 60vh);
  margin: 0;
  padding: 12px;
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  color: #111827;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre;
}

.plan-message-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.plan-preview-card {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f9fafb;
}

.plan-preview-card h3 {
  margin-bottom: 10px;
}

.plan-preview-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.plan-preview-summary div {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
}

.plan-preview-summary strong {
  display: block;
  overflow-wrap: anywhere;
  color: #111827;
  font-size: 16px;
  line-height: 1.35;
}

.plan-preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 14px;
  --plan-preview-pane-height: min(620px, 65vh);
}

.plan-preview-table-card {
  min-width: 0;
  max-width: 100%;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--admin-border);
  border-radius: 22px;
  background: var(--admin-surface);
}

.plan-preview-table-card[open] {
  display: flex;
  flex-direction: column;
  height: var(--plan-preview-pane-height);
}

.plan-preview-table-card.plan-collapsible-card {
  display: block;
}

.plan-preview-table-card.plan-collapsible-card[open] {
  display: flex;
}

.plan-preview-table-card .plan-collapsible-head {
  flex: 0 0 auto;
  margin-bottom: 10px;
}

.plan-preview-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-width: 100%;
  max-height: min(620px, 65vh);
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
}

.plan-preview-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  font-size: 12px;
}

.plan-preview-table th,
.plan-preview-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #e5e7eb;
  color: #334155;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.plan-preview-table th {
  background: #f3f4f6;
  color: #111827;
  font-weight: 700;
}

.plan-backend-preview {
  display: grid;
  flex: 1 1 auto;
  gap: 10px;
  min-height: 0;
  max-width: 100%;
  max-height: min(620px, 65vh);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  padding-right: 4px;
}

.plan-backend-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  overflow-wrap: anywhere;
}

.plan-backend-card h4 {
  margin-bottom: 8px;
}

.plan-backend-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}

.plan-backend-meta-grid .plan-backend-meta:last-child {
  grid-column: 1 / -1;
}

.plan-backend-meta span {
  display: block;
  margin-bottom: 3px;
  color: #64748b;
  font-size: 12px;
}

.plan-backend-meta strong {
  display: block;
  overflow-wrap: anywhere;
  color: #111827;
  font-size: 13px;
}

.plan-assign-card {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f9fafb;
}

.plan-assign-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.plan-assign-head .desc {
  margin-bottom: 0;
}

.plan-assign-head .small-button {
  margin-top: 0;
}

.plan-cycle-update-context {
  display: grid;
  gap: 4px;
  margin: 0 0 14px 0;
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #2563eb;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
}

.plan-cycle-update-context[hidden] {
  display: none;
}

.plan-cycle-update-context strong {
  font-size: 14px;
  line-height: 1.3;
}

.plan-cycle-update-context span {
  font-size: 13px;
  line-height: 1.45;
}

.plan-cycle-update-context.is-mismatch {
  border-color: #fde68a;
  border-left-color: #d97706;
  background: #fffbeb;
  color: #78350f;
}

.plan-assign-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(240px, 1.5fr) auto;
  gap: 12px;
  align-items: end;
}

.plan-assign-form .field {
  margin-bottom: 0;
}

.plan-assign-form select,
.plan-assign-form input {
  max-width: none;
  background: #ffffff;
}

.plan-assign-actions {
  margin-top: 12px;
}

.plan-student-form,
.plan-confirm-form {
  display: grid;
  gap: 12px;
  align-items: end;
}

.plan-student-form {
  grid-template-columns: minmax(260px, 1fr);
}

.plan-confirm-form {
  grid-template-columns: minmax(260px, 1fr) minmax(280px, auto);
}

.plan-student-form .field,
.plan-confirm-form .field {
  margin-bottom: 0;
}

.plan-student-form input,
.plan-student-form select,
.plan-confirm-form input {
  max-width: none;
  background: #ffffff;
}

.plan-confirm-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
  align-items: end;
}

.plan-confirm-actions button {
  width: 100%;
  min-width: 0;
  white-space: normal;
}

.plan-confirm-mode-hint {
  grid-column: 1 / -1;
  flex-basis: 100%;
  margin: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
}

.plan-v2-cycle-suggested-field small {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.plan-v2-cycle-import-result {
  margin-top: 12px;
}

.plan-v2-current-summary {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.plan-v2-current-consistency {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #ffffff;
}

.plan-v2-current-read-path-audit {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
}

.plan-v2-current-read-path-grid strong {
  word-break: break-word;
}

.plan-v2-current-read-path-json {
  max-height: 420px;
  overflow: auto;
  margin: 0;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 12px;
  line-height: 1.5;
}

.plan-v2-current-consistency h4,
.plan-v2-current-read-path-audit h4,
.plan-v2-current-day-list h4 {
  margin: 0;
}

.plan-v2-current-legacy-note {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
}

.plan-v2-current-day-card ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.plan-v2-cycle-action-notes {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  color: #475569;
  font-size: 12px;
  line-height: 1.5;
}

.plan-v2-cycle-action-notes p {
  margin: 0;
}

.plan-v2-cycle-action-notes strong {
  color: #111827;
}

.plan-v2-cycle-button-state {
  flex: 1 1 100%;
  min-width: 100%;
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.plan-current-card {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f9fafb;
}

.plan-current-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.plan-current-head .desc {
  margin-bottom: 0;
}

.plan-current-actions {
  margin-bottom: 12px;
}

.plan-current-result {
  display: grid;
  gap: 12px;
}

.plan-revoke-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 12px;
}

.plan-revoke-form .field {
  margin-bottom: 0;
}

.plan-revoke-form input {
  max-width: none;
  background: #ffffff;
}

.plan-revoke-actions {
  margin-top: 10px;
}

.plan-revoke-actions .status[data-status-type="error"] {
  color: #b91c1c;
}

.plan-revoke-actions .status[data-status-type="success"] {
  color: #047857;
}

.plan-revoke-modal[hidden] {
  display: none;
}

.plan-revoke-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
}

.plan-revoke-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.plan-revoke-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  padding: 18px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}

.plan-revoke-dialog h3 {
  margin-bottom: 10px;
}

.plan-revoke-dialog p {
  margin: 0;
  color: #334155;
  font-size: 14px;
  line-height: 1.7;
}

.admin-inline-confirm-dialog {
  width: min(560px, 100%);
}

.admin-inline-confirm-message {
  white-space: pre-line;
}

.admin-inline-confirm-reason-field {
  display: block;
  margin-top: 14px;
}

.admin-inline-confirm-reason-field textarea {
  max-width: none;
  background: #ffffff;
}

.admin-inline-confirm-actions .status {
  margin-right: auto;
}

.plan-assign-confirm-dialog {
  width: min(620px, 100%);
}

.invite-generate-confirm-dialog {
  width: min(560px, 100%);
}

.raw-archive-dialog {
  width: min(640px, 100%);
}

.raw-archive-warning {
  padding: 10px 12px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  font-weight: 700;
}

.raw-archive-reason-field {
  display: block;
  margin-top: 14px;
}

.raw-archive-reason-field textarea {
  max-width: none;
  background: #ffffff;
}

.raw-archive-dialog-actions .status {
  margin-right: auto;
}

.plan-assign-confirm-details {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.plan-assign-confirm-details div {
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
}

.plan-assign-confirm-details .label {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 12px;
}

.plan-assign-confirm-details strong {
  display: block;
  color: #111827;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}

.plan-revoke-dialog-actions {
  justify-content: flex-end;
  margin-top: 16px;
}

.invite-generate-confirm-actions .status {
  margin-right: auto;
}

.plan-current-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.plan-current-summary div,
.plan-current-day-card,
.plan-current-history-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
}

.plan-current-summary strong {
  display: block;
  overflow-wrap: anywhere;
  color: #111827;
  font-size: 14px;
  line-height: 1.35;
}

.plan-current-day-list,
.plan-current-history-list {
  display: grid;
  gap: 10px;
}

.plan-current-day-card h4,
.plan-current-history-card h4 {
  margin-bottom: 6px;
}

.plan-current-day-card p,
.plan-current-history-card p {
  margin: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
}

.plan-current-day-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.plan-current-day-card-head h4 {
  margin-bottom: 0;
}

.plan-current-day-card-head .small-button {
  flex: 0 0 auto;
  margin-top: 0;
}

.plan-current-day-card-head .plan-day-edit-open-button {
  display: inline-flex;
  visibility: visible;
  opacity: 1;
}

.plan-day-backfill-reason {
  margin: 2px 0 0;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.5;
}

.student-plan-view-day-card.is-completed {
  opacity: 0.62;
  background: #f8fafc;
}

.student-plan-view-day-card.is-future-day {
  background: #f8fafc;
  border-style: dashed;
}

.student-plan-view-day-card.is-incomplete-day {
  border-color: rgba(217, 119, 6, 0.32);
}

.student-plan-view-day-card.is-unknown-day {
  border-color: rgba(107, 114, 128, 0.36);
}

.plan-current-warning {
  margin: 8px 0 12px;
  padding: 8px 10px;
  border: 1px solid rgba(217, 119, 6, 0.24);
  border-radius: 6px;
  background: rgba(255, 251, 235, 0.92);
  color: #92400e;
  font-size: 12px;
  line-height: 1.5;
}

.student-plan-view-day-card.is-muted-day {
  border-style: dashed;
  background: #f9fafb;
}

.student-plan-view-day-card[draggable="true"] {
  cursor: grab;
}

.student-plan-view-day-card.is-dragging {
  opacity: 0.45;
  cursor: grabbing;
}

.student-plan-view-day-card.is-drop-before {
  border-top: 3px solid #2563eb;
}

.student-plan-view-day-card.is-drop-after {
  border-bottom: 3px solid #2563eb;
}

.student-plan-view-day-card.is-adjustment-day {
  border-color: #c4b5fd;
  background: #faf5ff;
}

.student-plan-view-day-title {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.student-plan-view-title-toggle {
  cursor: pointer;
}

.student-plan-view-title-toggle:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 3px;
  border-radius: 8px;
}

.student-plan-view-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.student-plan-view-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  line-height: 1.2;
}

.student-plan-view-badge.done {
  background: #e5e7eb;
  color: #4b5563;
}

.student-plan-view-badge.pending {
  background: #fef3c7;
  color: #92400e;
}

.student-plan-view-badge.future {
  background: #e0f2fe;
  color: #075985;
}

.student-plan-view-badge.rest {
  background: #f3f4f6;
  color: #6b7280;
}

.student-plan-view-badge.unknown {
  background: #f1f5f9;
  color: #475569;
}

.student-plan-view-badge.muted {
  background: #f3f4f6;
  color: #6b7280;
}

.student-plan-view-badge.adjustment {
  background: #ede9fe;
  color: #6d28d9;
}

.student-plan-view-badge.adjustment-soft {
  background: #f5f3ff;
  color: #7c3aed;
}

.student-plan-view-day-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}

.student-plan-view-day-actions .small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 44px;
  padding: 0 18px;
  margin-top: 0;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.plan-insert-preview {
  padding: 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
}

.plan-insert-preview summary {
  cursor: pointer;
  color: #334155;
  font-weight: 700;
}

.plan-insert-preview-body {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.plan-insert-position-field {
  margin-bottom: 0;
}

.plan-insert-position-field select,
.plan-adjustment-type-field select,
.plan-adjustment-title-field input,
.plan-adjustment-text-field textarea {
  max-width: none;
  background: #ffffff;
}

.plan-adjustment-text-field textarea {
  min-height: 156px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  line-height: 1.55;
}

.plan-insert-position-preview {
  margin: 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.6;
}

.plan-insert-preview-tip {
  margin-bottom: 0;
}

.plan-adjustment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.plan-adjustment-actions .small-button {
  margin-top: 0;
}

.plan-adjustment-status {
  margin: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
}

.plan-adjustment-status.is-error {
  color: #b91c1c;
}

.plan-adjustment-status.is-success {
  color: #166534;
}

.plan-adjustment-preview-result {
  display: grid;
  gap: 10px;
}

.plan-adjustment-preview-result:empty {
  display: none;
}

.plan-adjustment-preview-result h4,
.plan-adjustment-preview-result p {
  margin: 0;
}

.plan-adjustment-preview-day-list {
  display: grid;
  gap: 8px;
}

.plan-adjustment-preview-day {
  padding: 10px;
  border: 1px solid #ddd6fe;
  border-radius: 8px;
  background: #faf5ff;
}

.plan-adjustment-preview-day h5 {
  margin: 0 0 8px;
  color: #4c1d95;
  font-size: 14px;
}

.plan-adjustment-preview-day ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  color: #334155;
  font-size: 13px;
  line-height: 1.5;
}

.plan-adjustment-warning {
  color: #92400e;
}

.student-plan-view-day-detail {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.student-plan-view-coach-note {
  padding: 10px;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
}

.student-plan-view-exercise {
  min-width: 0;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
}

.student-plan-view-exercise h5 {
  margin: 0 0 6px;
  color: #111827;
  font-size: 14px;
}

.student-plan-view-set-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.student-plan-view-set-row {
  padding: 7px 8px;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  line-height: 1.4;
}

.plan-day-edit-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
}

.plan-day-edit-panel[hidden] {
  display: none;
}

.plan-day-edit-head,
.plan-day-edit-workout-head,
.plan-day-edit-exercise-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.plan-day-edit-head {
  margin-bottom: 12px;
}

.plan-day-edit-head .desc {
  margin-bottom: 0;
}

.plan-day-edit-status,
.plan-day-edit-actions .status,
.plan-day-edit-head .status[data-status-type="success"] {
  color: #047857;
}

.plan-day-edit-head .status[data-status-type="error"] {
  color: #b91c1c;
}

.plan-day-edit-context {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.plan-day-edit-context div {
  min-width: 0;
  padding: 10px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #ffffff;
}

.plan-day-edit-context strong {
  display: block;
  overflow-wrap: anywhere;
  color: #111827;
  font-size: 14px;
  line-height: 1.5;
}

.plan-day-edit-basic-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 240px);
  gap: 12px;
  align-items: end;
}

.plan-day-edit-basic-grid .field,
.plan-day-edit-note-field,
.plan-day-edit-reason-field {
  margin-bottom: 0;
}

.plan-day-edit-basic-grid input,
.plan-day-edit-note-field textarea,
.plan-day-edit-reason-field textarea,
.plan-day-edit-exercise-fields input,
.plan-day-edit-exercise-fields textarea,
.plan-day-edit-set-fields input,
.plan-day-edit-set-fields textarea {
  max-width: none;
  background: #ffffff;
}

.plan-day-edit-note-field,
.plan-day-edit-reason-field {
  margin-top: 12px;
}

.plan-day-edit-checkline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #ffffff;
  color: #111827;
}

.plan-day-edit-checkline input {
  width: auto;
  margin: 0;
}

.plan-day-edit-workout-head {
  align-items: center;
  margin-top: 14px;
  margin-bottom: 10px;
}

.plan-day-edit-workout-head h4 {
  margin-bottom: 0;
}

.plan-day-edit-workout-list {
  display: grid;
  gap: 12px;
}

.plan-day-edit-exercise-card {
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #ffffff;
}

.plan-day-edit-exercise-head {
  align-items: center;
  margin-bottom: 10px;
}

.plan-day-edit-exercise-head h4 {
  margin-bottom: 0;
}

.plan-day-edit-exercise-fields {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.4fr);
  gap: 12px;
}

.plan-day-edit-set-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.plan-day-edit-set-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
}

.plan-day-edit-set-row > strong {
  align-self: center;
  color: #111827;
  font-size: 13px;
}

.plan-day-edit-set-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr)) minmax(180px, 1.4fr);
  gap: 10px;
}

.plan-day-edit-set-fields .field,
.plan-day-edit-exercise-fields .field {
  margin-bottom: 0;
}

.plan-day-edit-set-actions,
.plan-day-edit-actions {
  margin-top: 12px;
}

.plan-message-card h3 {
  margin-bottom: 10px;
}

.plan-message-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: #334155;
  font-size: 13px;
  line-height: 1.6;
}

.plan-message-empty {
  color: #64748b;
}

.user-card-head,
.invite-code-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.user-card-head h4,
.invite-code-card-head h4 {
  overflow-wrap: anywhere;
}

.user-card-head p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 12px;
}

.workbench-muted-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 26px;
  margin-top: 8px;
  padding: 0 10px;
  border: 1px solid #f59e0b;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.user-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.user-meta-grid,
.invite-code-meta-grid,
.raw-user-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px 12px;
}

.raw-user-summary[hidden] {
  display: none;
}

.raw-user-summary {
  margin-bottom: 14px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.raw-user-summary div {
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
}

.user-meta span,
.invite-code-meta span,
.raw-user-summary .label {
  display: block;
  margin-bottom: 3px;
  color: #64748b;
  font-size: 12px;
}

.user-meta strong,
.invite-code-meta strong,
.raw-user-summary strong {
  display: block;
  overflow-wrap: anywhere;
  color: #111827;
  font-size: 13px;
  line-height: 1.45;
}

.raw-candidate-list {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
}

.raw-candidate-list[hidden] {
  display: none;
}

.raw-candidate-title {
  margin: 0;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

.raw-candidate-card {
  display: grid;
  height: auto;
  min-height: 54px;
  padding: 10px 12px;
  border-color: #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  text-align: left;
}

.raw-candidate-card strong {
  font-size: 14px;
  line-height: 1.5;
}

.raw-candidate-card span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.coach-alias-editor {
  margin-top: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
}

.coach-alias-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}

.coach-alias-summary::-webkit-details-marker {
  display: none;
}

.coach-alias-summary span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.coach-alias-summary strong {
  min-width: 0;
  color: #111827;
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
  text-align: right;
}

.coach-alias-body {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
  gap: 8px;
  padding: 0 12px 12px;
}

.coach-alias-label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.coach-alias-label input {
  width: 100%;
  min-width: 0;
}

.coach-alias-status {
  grid-column: 1 / -1;
  min-height: 18px;
  font-size: 12px;
}

.workbench-mute-panel {
  display: grid;
  margin-top: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.workbench-mute-panel.is-muted {
  border-color: #f59e0b;
  background: #fff7ed;
}

.workbench-mute-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 12px;
  cursor: pointer;
  list-style: none;
}

.workbench-mute-summary::-webkit-details-marker {
  display: none;
}

.workbench-mute-head {
  display: grid;
  gap: 4px;
}

.workbench-mute-head strong {
  color: #111827;
  font-size: 13px;
  line-height: 1.45;
}

.workbench-mute-head span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.workbench-mute-body {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.workbench-mute-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 220px) auto;
  gap: 8px;
  align-items: end;
}

.workbench-mute-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.workbench-mute-field select,
.workbench-mute-field input {
  width: 100%;
  min-width: 0;
}

.workbench-mute-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workbench-mute-status {
  min-height: 18px;
  font-size: 12px;
}

.invite-code-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.user-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.user-flag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.user-flag.is-on {
  background: #111827;
  color: #ffffff;
}

.normal-readonly-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #0f766e;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.normal-readonly-badge.muted {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.normal-readonly-filter-card {
  display: grid;
  grid-template-columns: minmax(220px, 250px) minmax(260px, 1fr) minmax(120px, max-content) minmax(96px, max-content) minmax(220px, 260px);
  column-gap: 14px;
  row-gap: 10px;
  align-items: end;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  background: #f8fafc;
}

.normal-readonly-filter-card .field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.normal-readonly-filter-card input,
.normal-readonly-filter-card select {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  font-size: 14px;
}

.normal-readonly-filter-card button {
  align-self: end;
  height: 48px;
  padding: 0 20px;
  white-space: nowrap;
}

.normal-readonly-filter-card .status {
  align-self: end;
  justify-content: center;
  min-height: 48px;
  padding: 0 14px;
  line-height: 1.35;
  text-align: left;
}

.normal-readonly-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.normal-readonly-user-list-card,
.normal-readonly-summary-card,
.normal-readonly-export-card,
.normal-readonly-record-group {
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  background: #ffffff;
}

.normal-readonly-user-list-card {
  overflow: hidden;
}

.normal-readonly-card-head,
.normal-readonly-summary-card,
.normal-readonly-record-group {
  padding: 14px;
}

.normal-readonly-card-head {
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}

.normal-readonly-card-head h3,
.normal-readonly-summary-card h3,
.normal-readonly-export-card h3,
.normal-readonly-record-group h3 {
  margin: 0;
  color: #111827;
  font-size: 16px;
}

.normal-readonly-card-head h3 span {
  color: #0f766e;
}

.normal-readonly-card-head p,
.normal-readonly-export-card p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.normal-readonly-scope-notice {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.normal-conversion-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
}

.normal-conversion-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.normal-conversion-head h3 {
  margin: 0;
  color: #111827;
  font-size: 16px;
}

.normal-conversion-head p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
}

.normal-conversion-tools {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

.normal-conversion-tools .field {
  min-width: 160px;
  margin-bottom: 0;
}

.normal-conversion-tools select {
  width: 100%;
  min-height: 40px;
}

.normal-conversion-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.normal-conversion-summary-grid .metric-card {
  min-height: 78px;
  border-radius: 8px;
}

.normal-conversion-table {
  min-width: 1680px;
}

.normal-conversion-table td:last-child {
  min-width: 330px;
}

.normal-conversion-table td:last-child .small-button {
  margin: 0 6px 6px 0;
}

.normal-conversion-level {
  font-weight: 800;
}

.normal-conversion-level.is-high {
  color: #b91c1c;
}

.normal-conversion-level.is-medium {
  color: #b45309;
}

.normal-conversion-level.is-low {
  color: #047857;
}

.normal-conversion-level.is-insufficient {
  color: #64748b;
}

.normal-conversion-followup {
  font-weight: 800;
}

.normal-conversion-followup.is-unreviewed {
  color: #475569;
}

.normal-conversion-followup.is-watching {
  color: #0369a1;
}

.normal-conversion-followup.is-potential {
  color: #b45309;
}

.normal-conversion-followup.is-contacted {
  color: #4f46e5;
}

.normal-conversion-followup.is-converted {
  color: #047857;
}

.normal-conversion-followup.is-ignored {
  color: #64748b;
}

.normal-conversion-note-cell {
  max-width: 260px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.normal-conversion-status-dialog {
  width: min(640px, 100%);
}

.normal-conversion-status-dialog .field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.normal-conversion-status-dialog select,
.normal-conversion-status-dialog textarea {
  width: 100%;
  max-width: none;
}

.normal-conversion-status-dialog textarea {
  resize: vertical;
}

.normal-conversion-status-actions .status {
  margin-right: auto;
}

.normal-readonly-table-wrap {
  width: 100%;
  overflow: auto;
}

.normal-readonly-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  font-size: 13px;
}

.normal-readonly-table th,
.normal-readonly-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: top;
}

.normal-readonly-table th {
  background: #f8fafc;
  color: #334155;
  font-weight: 800;
  white-space: nowrap;
}

.normal-readonly-table tbody tr {
  cursor: pointer;
}

.normal-readonly-table tbody tr:hover,
.normal-readonly-table tbody tr.is-active {
  background: #f0fdfa;
}

.normal-readonly-table td strong,
.normal-readonly-table td span {
  display: block;
}

.normal-readonly-table td span {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.normal-readonly-record-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.normal-user-card,
.normal-readonly-record-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
}

.normal-user-card {
  cursor: pointer;
  user-select: none;
}

.normal-user-card:hover,
.normal-user-card:focus-visible,
.normal-user-card.is-active {
  border-color: #0f766e;
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.12);
}

.normal-user-card:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.22);
  outline-offset: 2px;
}

.normal-user-card h4,
.normal-readonly-record-card h4 {
  margin: 0;
  color: #111827;
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.normal-user-card-meta,
.normal-readonly-field-grid,
.normal-readonly-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.normal-readonly-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.normal-readonly-summary-grid .metric-card {
  border-radius: 8px;
}

.normal-readonly-summary-grid .metric-card strong {
  font-size: 20px;
}

.normal-readonly-summary-grid .metric-card.muted strong {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.normal-manual-plan-panel[hidden] {
  display: none;
}

.normal-manual-plan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.normal-manual-plan-head p {
  margin: 4px 0 0;
  color: var(--admin-muted);
  font-size: 13px;
}

.normal-manual-plan-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.normal-manual-plan-summary div,
.normal-manual-plan-day,
.normal-manual-plan-exercise {
  min-width: 0;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
}

.normal-manual-plan-summary span {
  display: block;
  margin-bottom: 4px;
  color: var(--admin-muted);
  font-size: 12px;
}

.normal-manual-plan-summary strong {
  display: block;
  overflow-wrap: anywhere;
  color: #111827;
  font-size: 14px;
  line-height: 1.35;
}

.normal-manual-plan-result,
.normal-manual-plan-exercise-list,
.normal-manual-plan-set-list {
  display: grid;
  gap: 10px;
}

.normal-manual-plan-day.is-rest-day {
  border-style: dashed;
  background: #f8fafc;
  opacity: 0.72;
}

.normal-manual-plan-day h4,
.normal-manual-plan-exercise h5 {
  margin: 0 0 6px;
  color: #111827;
}

.normal-manual-plan-day p,
.normal-manual-plan-exercise p {
  margin: 0 0 8px;
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
}

.normal-manual-plan-set-row {
  padding: 7px 8px;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  line-height: 1.4;
}

.normal-manual-plan-raw {
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
}

.normal-manual-plan-raw summary {
  cursor: pointer;
  color: #334155;
  font-weight: 700;
}

.normal-manual-plan-raw pre {
  max-height: 320px;
  margin: 10px 0 0;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #334155;
  font-size: 12px;
}

.normal-user-card-meta div,
.normal-readonly-field-grid div {
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: #f8fafc;
}

.normal-user-card-meta span,
.normal-readonly-field-grid span {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 12px;
}

.normal-user-card-meta strong,
.normal-readonly-field-grid strong {
  display: block;
  color: #111827;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.normal-readonly-detail {
  display: grid;
  gap: 14px;
}

.normal-readonly-detail[hidden] {
  display: none;
}

.normal-readonly-detail-head,
.normal-readonly-export-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #dbe3ea;
}

.normal-readonly-detail-head h3 {
  margin: 0;
  color: #111827;
  font-size: 20px;
}

.normal-readonly-detail-head p {
  margin: 6px 0 0;
  color: #0f766e;
  font-size: 13px;
  font-weight: 700;
}

.normal-readonly-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.permission-modal[hidden] {
  display: none;
}

.permission-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.permission-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
}

.permission-dialog {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 20px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.25);
}

.user-full-profile-dialog {
  width: min(900px, 100%);
}

.permission-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.permission-current-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
}

.permission-current-grid .label {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 12px;
}

.permission-current-grid strong {
  display: block;
  overflow-wrap: anywhere;
  color: #111827;
  font-size: 13px;
}

.permission-action-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.permission-action-fields[hidden],
.permission-warning[hidden] {
  display: none;
}

.permission-warning {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #fbbf24;
  border-radius: 12px;
  background: #fffbeb;
  color: #92400e;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
}

.permission-rule-tip,
.permission-confirm-tip {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.permission-actions {
  align-items: center;
  margin-top: 14px;
}

.user-full-profile-content {
  display: grid;
  gap: 14px;
}

.user-full-profile-section {
  display: grid;
  gap: 10px;
}

.user-full-profile-section h3 {
  margin: 0;
  color: #111827;
  font-size: 16px;
}

.user-full-profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.user-full-profile-field {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
}

.user-full-profile-field span {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 12px;
}

.user-full-profile-field strong {
  display: block;
  color: #111827;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.user-full-profile-actions {
  margin-top: 14px;
}

.user-full-profile-json[hidden] {
  display: none;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  align-items: start;
  gap: 16px;
}

.dashboard-column,
.raw-record-group {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f9fafb;
}

.dashboard-column {
  display: grid;
  align-content: start;
  gap: 12px;
}

.dashboard-column h3,
.raw-record-group h3 {
  margin: 0 0 12px;
}

.dashboard-column h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #d6e5cf;
}

.dashboard-column-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid #c7daba;
  border-radius: 999px;
  background: #ffffff;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

.raw-record-group h3 span {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.student-list,
.raw-record-list {
  display: grid;
  gap: 10px;
}

.student-card,
.raw-record-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
}

.dashboard-column h3 {
  cursor: pointer;
  user-select: none;
}

.dashboard-column.is-collapsed {
  padding-bottom: 14px;
}

.dashboard-column.is-collapsed h3 {
  padding-bottom: 0;
  border-bottom: 0;
}

.raw-record-card.is-archived {
  border-color: #f59e0b;
  background: #fffbeb;
}

.raw-record-card.is-review-record {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.raw-record-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.raw-record-card-head h4 {
  margin: 0;
  overflow-wrap: anywhere;
}

.raw-archive-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #92400e;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.raw-archive-note {
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #ffffff;
  color: #92400e;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.raw-record-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.raw-record-card-actions .small-button {
  margin-top: 0;
}

.raw-female-summary-card {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
}

.raw-female-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.raw-female-summary-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
}

.raw-female-summary-head span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.raw-female-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.raw-female-summary-note {
  margin: 12px 0 0;
  color: #92400e;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.raw-female-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.raw-female-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.raw-female-tag.is-review {
  background: #fef3c7;
  color: #92400e;
}

.raw-record-group[hidden] {
  display: none;
}

.raw-summary-grid {
  margin-bottom: 12px;
}

.raw-record-detail {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #cbd5e1;
}

.raw-detail-section + .raw-detail-section {
  margin-top: 12px;
}

.raw-detail-section h5 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
}

.raw-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.raw-detail-text-list {
  display: grid;
  gap: 6px;
}

.raw-detail-text-list p,
.raw-detail-empty {
  margin: 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.raw-record-light-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
}

.raw-review-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
}

.raw-review-badge.is-reviewed,
.raw-review-badge.is-handled {
  background: #dcfce7;
  color: #166534;
}

.raw-review-badge.is-closed,
.raw-review-badge.is-dismissed {
  background: #f1f5f9;
  color: #475569;
}

.raw-review-badge.is-pending,
.raw-review-badge.is-active,
.raw-review-badge.is-open {
  background: #fef3c7;
  color: #92400e;
}

.raw-record-card.is-traffic-red {
  border-color: #fecaca;
  background: #fff7f7;
}

.raw-record-card.is-traffic-red .raw-record-light-badge {
  background: #dc2626;
  color: #ffffff;
}

.raw-record-card.is-traffic-yellow {
  border-color: #fde68a;
  background: #fffbeb;
}

.raw-record-card.is-traffic-yellow .raw-record-light-badge {
  background: #d97706;
  color: #ffffff;
}

.raw-record-card.is-traffic-green {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.raw-record-card.is-traffic-green .raw-record-light-badge {
  background: #16a34a;
  color: #ffffff;
}

.student-card h4 {
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}

.student-card.is-collapsed h4 {
  margin-bottom: 0;
}

.student-card-body {
  display: grid;
  gap: 12px;
}

.student-meta-grid,
.raw-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.student-meta span,
.raw-field span {
  display: block;
  margin-bottom: 3px;
  color: #64748b;
  font-size: 12px;
}

.student-meta strong,
.raw-field strong {
  display: block;
  overflow-wrap: anywhere;
  color: #111827;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-list span {
  max-width: 100%;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #475569;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.coach-review-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.coach-review-column {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
}

.coach-review-column.attention {
  border-color: #fecaca;
  border-top: 3px solid #dc2626;
  background: #fffafa;
}

.coach-review-column.no-training {
  background: #f8fafc;
}

.coach-review-column.cycle-completed {
  border-color: #bfdbfe;
  border-top: 3px solid #2563eb;
  background: #eff6ff;
}

.coach-review-column.reviewed-attention {
  border-color: #cbd5e1;
  border-top: 3px solid #64748b;
  background: #f8fafc;
}

.coach-review-column h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
}

.coach-review-column.is-collapsed h3 {
  margin-bottom: 0;
}

.coach-review-group-head {
  cursor: pointer;
  user-select: none;
}

.coach-review-group-head:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 3px;
  border-radius: 8px;
}

.coach-review-column h3 span {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.coach-review-collapse-button {
  flex: 0 0 auto;
  min-width: 52px;
  padding: 4px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.coach-review-collapse-button:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.coach-review-list {
  display: grid;
  gap: 6px;
}

.coach-review-card {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-left-width: 4px;
  border-radius: 8px;
  background: #ffffff;
}

.coach-review-card.is-red {
  border-color: #fecaca;
  border-left-color: #dc2626;
}

.coach-review-card.is-yellow {
  border-color: #fde68a;
  border-left-color: #d97706;
}

.coach-review-card.is-green {
  border-left-color: #16a34a;
}

.coach-review-card.is-cycle-completed {
  border-color: #bfdbfe;
  border-left-color: #2563eb;
}

.coach-review-card.is-no-training {
  border-left-color: #94a3b8;
}

.coach-review-list-row {
  display: grid;
  grid-template-columns: auto auto minmax(90px, 1.05fr) minmax(220px, 2.5fr) minmax(140px, 1.1fr) auto auto auto auto;
  gap: 8px;
  align-items: center;
}

.coach-review-name {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #111827;
  font-size: 14px;
  line-height: 1.35;
}

.coach-review-compact-reason,
.coach-review-compact-date {
  min-width: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}

.coach-review-compact-date {
  color: #64748b;
}

.coach-review-toggle {
  min-width: 76px;
  white-space: nowrap;
}

.coach-review-raw-button {
  min-width: 92px;
  white-space: nowrap;
}

.coach-review-review-button {
  min-width: 52px;
  white-space: nowrap;
}

.coach-review-plan-update-button {
  min-width: 76px;
  white-space: nowrap;
}

.coach-review-detail {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding: 10px 0 0 0;
  border-top: 1px solid #e5e7eb;
}

.coach-review-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.coach-review-card h4 {
  margin: 0;
  overflow-wrap: anywhere;
}

.coach-review-card-head p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 12px;
}

.coach-review-traffic-badge {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.coach-review-traffic-badge.red {
  background: #fee2e2;
  color: #b91c1c;
}

.coach-review-traffic-badge.yellow {
  background: #fef3c7;
  color: #92400e;
}

.coach-review-traffic-badge.green {
  background: #dcfce7;
  color: #166534;
}

.coach-review-traffic-badge.cycle-completed,
.coach-review-traffic-badge.renewal {
  background: #dbeafe;
  color: #1d4ed8;
}

.coach-review-traffic-badge.no-training,
.coach-review-traffic-badge.empty {
  background: #e5e7eb;
  color: #475569;
}

.coach-review-state-badge {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.coach-review-state-badge.unreviewed {
  background: #fff7ed;
  color: #9a3412;
}

.coach-review-state-badge.reviewed {
  background: #e0f2fe;
  color: #075985;
}

.coach-review-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.coach-review-meta span {
  display: block;
  margin-bottom: 3px;
  color: #64748b;
  font-size: 12px;
}

.coach-review-meta strong {
  display: block;
  overflow-wrap: anywhere;
  color: #111827;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.coach-review-summary-text {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.coach-review-menstrual-notice {
  padding: 10px 12px;
  border: 1px solid #fde68a;
  border-left: 4px solid #d97706;
  border-radius: 10px;
  background: #fffbeb;
  color: #78350f;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.coach-review-menstrual-notice.is-red {
  border-color: #fecaca;
  border-left-color: #dc2626;
  background: #fff1f2;
  color: #991b1b;
}

.coach-review-tags {
  margin-bottom: 12px;
}

.coach-review-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.coach-review-modal[hidden] {
  display: none;
}

.coach-review-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
}

.coach-review-dialog {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: calc(100vh - 36px);
  padding: 20px;
  overflow: auto;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}

.coach-review-dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.coach-review-dialog-head h2 {
  margin: 0 0 6px;
}

.coach-review-current-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.coach-review-current-grid div {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
}

.coach-review-current-grid strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: #111827;
}

.coach-review-internal-note-field {
  grid-column: 1 / -1;
}

.coach-review-dialog textarea {
  width: 100%;
  max-width: none;
  resize: vertical;
}

.coach-review-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 14px;
  color: #334155;
  font-weight: 700;
}

.coach-review-checkbox input {
  width: 16px;
  height: 16px;
}

.coach-review-modal-actions {
  margin-top: 14px;
}

.feedback-draft-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.feedback-draft-modal[hidden] {
  display: none;
}

.feedback-draft-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.44);
}

.feedback-draft-dialog {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: calc(100vh - 36px);
  padding: 20px;
  overflow: auto;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}

.feedback-draft-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.feedback-draft-head h2 {
  margin: 0 0 6px;
}

.feedback-draft-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.feedback-draft-toolbar .field,
.feedback-draft-text-field {
  margin-bottom: 0;
}

.feedback-draft-toolbar select,
.feedback-draft-text-field textarea {
  max-width: none;
  background: #ffffff;
}

.feedback-draft-text-field textarea {
  width: 100%;
  resize: vertical;
  line-height: 1.65;
}

.feedback-draft-evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.feedback-draft-evidence-grid section {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
}

.feedback-draft-evidence-grid h3 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 14px;
}

.feedback-draft-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.feedback-draft-list span {
  display: inline-flex;
  max-width: 100%;
  padding: 6px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.feedback-draft-actions {
  margin-top: 14px;
}

.empty {
  margin: 0;
  padding: 16px;
  border: 1px dashed #d1d5db;
  border-radius: 14px;
  background: #ffffff;
  color: #64748b;
  font-size: 14px;
  text-align: center;
}

.training-export-form,
.raw-form {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f9fafb;
}

.training-export-form {
  grid-template-columns: minmax(200px, 1fr) minmax(130px, 0.55fr) minmax(260px, 1.45fr) repeat(2, minmax(140px, 0.65fr));
  align-items: end;
}

.training-export-form .field {
  margin-bottom: 0;
}

.training-export-form input,
.training-export-form select {
  max-width: none;
  background: #ffffff;
}

.training-export-actions {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.training-export-actions .status {
  flex: 1 1 260px;
}

.training-export-format-note {
  grid-column: 1 / -1;
  margin: -2px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
}

.training-export-summary {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(220px, 1fr) repeat(2, minmax(140px, 0.7fr));
  gap: 12px;
  margin-top: 14px;
}

.training-export-summary div,
.training-export-preview-item {
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
}

.training-export-summary .label,
.training-export-preview-meta span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.training-export-summary strong,
.training-export-preview-meta strong {
  display: block;
  margin-top: 4px;
  color: #111827;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

.training-export-preview {
  margin-top: 16px;
}

.training-export-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.training-export-preview-head h3,
.training-export-preview-item h4 {
  margin: 0;
}

.training-export-preview-list {
  display: grid;
  gap: 10px;
}

.training-export-preview-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.raw-records-panel .section-head .small-button {
  margin-top: 0;
}

.raw-query-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.raw-date-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.raw-form .field {
  margin-bottom: 0;
}

.raw-form input,
.raw-form select {
  max-width: none;
  background: #ffffff;
}

.traffic-debug-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.traffic-debug-quick-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.traffic-debug-quick-row .hint {
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.traffic-debug-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
}

.raw-type-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 12px;
}

.raw-type-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.raw-type-button:hover {
  border-color: #94a3b8;
  background: #ffffff;
}

.raw-type-button.is-active {
  border-color: #111827;
  background: #111827;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.raw-type-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.raw-type-option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.raw-type-option span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #f3f4f6;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

.raw-type-option input[type="checkbox"]:checked + span {
  border-color: #111827;
  background: #111827;
  color: #ffffff;
}

.raw-archive-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -2px 0 12px;
}

.raw-archive-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.raw-archive-toggle input {
  width: 18px;
  height: 18px;
}

.raw-actions {
  margin-bottom: 16px;
}

.admin-student-detail-panel,
.raw-enhanced-filter-card {
  display: grid;
  gap: 12px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-card-bg);
}

.admin-student-detail-panel[hidden] {
  display: none;
}

.admin-student-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-student-detail-head h3,
.admin-student-detail-card h4,
.admin-student-record-card h5 {
  margin: 0;
}

.admin-student-detail-content {
  display: grid;
  gap: 12px;
}

.admin-student-detail-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface);
}

.admin-student-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.admin-student-metric-grid div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-card-bg);
}

.admin-student-metric-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-student-metric-grid strong {
  display: block;
  color: var(--admin-text);
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.admin-student-record-list,
.admin-student-review-list {
  display: grid;
  gap: 10px;
}

.admin-student-record-card,
.admin-student-review-item,
.raw-enhanced-record-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-card-bg);
}

.admin-student-record-card p,
.raw-enhanced-record-card p {
  margin: 6px 0 0;
  color: var(--admin-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.admin-student-card-actions,
.admin-student-quick-actions,
.raw-enhanced-record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.admin-student-review-item {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.admin-student-review-item span {
  color: var(--admin-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.raw-enhanced-filter-card summary {
  cursor: pointer;
  color: var(--admin-text);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
}

.raw-enhanced-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.raw-enhanced-keyword-field {
  grid-column: span 2;
}

.raw-enhanced-filter-grid .field {
  margin-bottom: 0;
}

.raw-enhanced-filter-grid input,
.raw-enhanced-filter-grid select {
  max-width: none;
  background: #ffffff;
}

.raw-enhanced-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 0;
}

.raw-enhanced-result-list {
  display: grid;
  gap: 10px;
}

.raw-enhanced-result-head {
  padding: 10px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface);
  color: var(--admin-muted);
  font-size: 13px;
  font-weight: 800;
}

.raw-enhanced-record-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.raw-enhanced-record-head h4 {
  margin: 0;
  color: var(--admin-text);
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.raw-enhanced-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.raw-enhanced-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #374151;
  font-size: 12px;
  font-weight: 800;
}

.raw-enhanced-tag.is-readiness {
  background: #dbeafe;
  color: #1d4ed8;
}

.raw-enhanced-tag.is-post {
  background: #fef3c7;
  color: #92400e;
}

.raw-enhanced-tag.is-female {
  background: #fce7f3;
  color: #be185d;
}

.raw-enhanced-tag.is-risk {
  background: #fee2e2;
  color: #b91c1c;
}

.raw-records-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.traffic-debug-result-group {
  margin-top: 16px;
}

.traffic-debug-list {
  display: grid;
  gap: 10px;
}

.traffic-debug-card {
  border-radius: 12px;
}

.traffic-debug-card.is-menstrual {
  border-color: #f59e0b;
  background: #fffbeb;
}

.traffic-debug-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.traffic-debug-card-head strong {
  overflow-wrap: anywhere;
}

.traffic-debug-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f97316;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.traffic-debug-field-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.raw-json {
  max-height: 300px;
  margin: 12px 0 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #111827;
  color: #f9fafb;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre;
}

.student-trend-panel {
  display: grid;
  gap: 14px;
}

.trend-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f9fafb;
}

.trend-card h3 {
  margin-bottom: 12px;
}

.trend-v313-dashboard-card {
  border-color: rgba(14, 165, 233, 0.38);
  background: #f8fbff;
}

.trend-v313-dashboard-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.trend-v313-dashboard-head .desc {
  max-width: 760px;
  margin: 0;
  color: #64748b;
}

.trend-v313-dashboard-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) minmax(320px, 2fr) minmax(136px, 1fr) minmax(136px, 1fr) minmax(150px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 14px;
}

.trend-v313-dashboard-query-field input,
.trend-v313-dashboard-controls input,
.trend-v313-dashboard-controls select {
  max-width: none;
  background: #ffffff;
}

.trend-v313-range-field {
  display: grid;
  gap: 7px;
}

.trend-v313-range-field > span {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.trend-v313-range-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.trend-v313-range-button {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #ffffff;
  color: #075985;
  font-size: 12px;
  font-weight: 800;
}

.trend-v313-range-button.is-active {
  border-color: #0284c7;
  background: #e0f2fe;
  color: #0c4a6e;
}

.trend-v313-debug-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.trend-v313-debug-summary[hidden] {
  display: none;
}

.trend-v313-debug-summary span {
  max-width: 100%;
  padding: 6px 9px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.trend-v313-debug-summary b {
  color: #0f172a;
}

.trend-v313-summary-grid,
.trend-v313-metric-grid,
.trend-v313-chart-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.trend-v313-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
}

.trend-v313-summary-grid .metric-card,
.trend-v313-metric-card,
.trend-v313-chart-card,
.trend-v313-node-card {
  min-width: 0;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
}

.trend-v313-summary-grid .metric-card {
  min-height: 88px;
  padding: 12px;
}

.trend-v313-summary-grid .metric-card .label {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
}

.trend-v313-summary-grid .metric-card strong {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: 16px;
}

.trend-v313-metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.trend-v313-metric-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.trend-v313-metric-card h4,
.trend-v313-chart-card h4,
.trend-v313-node-card h4,
.trend-v313-node-list h4 {
  margin: 0;
  color: #0f172a;
  font-size: 14px;
}

.trend-v313-metric-card.is-insufficient {
  background: #f8fafc;
}

.trend-v313-metric-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.trend-v313-metric-values div {
  min-width: 0;
  padding: 8px;
  border-radius: 8px;
  background: #f8fafc;
}

.trend-v313-metric-values span,
.trend-v313-node-grid span {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
}

.trend-v313-metric-values strong,
.trend-v313-node-grid strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: #111827;
  font-size: 13px;
}

.trend-v313-metric-note {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.trend-v313-chart-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.trend-v313-chart-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  overflow: hidden;
}

.trend-v313-sparkline {
  width: 100%;
  height: 86px;
}

.trend-v313-sparkline-line {
  fill: none;
  stroke: #0284c7;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-v313-sparkline-point {
  fill: #ffffff;
  stroke: #0369a1;
  stroke-width: 2;
}

.trend-v313-sparkline-label {
  fill: #64748b;
  font-size: 10px;
  font-weight: 700;
}

.trend-v313-node-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.trend-v313-node-card {
  padding: 12px;
}

.trend-v313-node-card.is-effective {
  border-left: 4px solid #16a34a;
}

.trend-v313-node-card.is-diagnostic {
  border-left: 4px solid #f59e0b;
}

.trend-v313-node-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.trend-v313-node-grid div {
  min-width: 0;
  padding: 8px;
  border-radius: 8px;
  background: #f8fafc;
}

.trend-v313-warning-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.trend-v313-warning-list[hidden] {
  display: none;
}

.trend-v313-warning-list span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 12px;
  font-weight: 800;
}

.trend-student-form,
.trend-filter-grid {
  display: grid;
  gap: 12px;
  align-items: end;
}

.trend-student-form {
  grid-template-columns: minmax(240px, 1fr) minmax(320px, 1.4fr);
}

.trend-filter-grid {
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) minmax(140px, 1fr) minmax(140px, 1fr) auto;
}

.trend-student-form .field,
.trend-filter-grid .field {
  margin-bottom: 0;
}

.trend-student-form input,
.trend-student-form select,
.trend-filter-grid input,
.trend-filter-grid select {
  max-width: none;
  background: #ffffff;
}

.trend-actions {
  margin-top: 12px;
}

.trend-student-summary,
.trend-summary-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.trend-student-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.trend-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  align-items: stretch;
}

.trend-student-summary[hidden] {
  display: none;
}

.trend-student-summary div {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
}

.trend-student-summary strong {
  display: block;
  overflow-wrap: anywhere;
  color: #111827;
  font-size: 13px;
  line-height: 1.45;
}

.trend-summary-grid .metric-card {
  display: flex;
  min-width: 0;
  min-height: 104px;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 12px;
  border-radius: 12px;
  background: #ffffff;
}

.trend-summary-grid .metric-card .label {
  color: #64748b;
  font-size: 12px;
  line-height: 1.2;
}

.trend-summary-grid .trend-summary-value {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 4px;
  color: #111827;
  font-size: clamp(19px, 1.7vw, 24px);
  font-weight: 750;
  line-height: 1.12;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.trend-summary-number {
  display: inline-block;
  flex: 0 1 auto;
  min-width: 0;
}

.trend-summary-unit {
  display: inline-block;
  flex: 0 0 auto;
  color: #475569;
  font-size: 0.62em;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.trend-summary-change {
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.trend-summary-main {
  display: inline-flex;
  max-width: 100%;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
}

.trend-summary-sub {
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
  white-space: nowrap;
}

.trend-light-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 5px;
  width: 100%;
  font-size: 13px;
  line-height: 1;
}

.trend-light-item {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 7px 5px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.trend-light-item strong {
  display: inline;
  color: inherit;
  font-size: 16px;
  line-height: 1;
  overflow-wrap: normal;
}

.trend-light-item.is-green {
  background: #ecfdf5;
  color: #047857;
}

.trend-light-item.is-yellow {
  background: #fffbeb;
  color: #b45309;
}

.trend-light-item.is-red {
  background: #fef2f2;
  color: #b91c1c;
}

.trend-chart-head,
.trend-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.trend-chart-head h3,
.trend-detail-head h3 {
  margin-bottom: 0;
}

.trend-chart-wrap {
  min-height: 340px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
}

.trend-chart-wrap .empty {
  margin: 14px;
}

.trend-chart-svg {
  display: block;
}

.trend-grid-line {
  stroke: #e5e7eb;
  stroke-width: 1;
}

.trend-axis-label {
  fill: #64748b;
  font-size: 12px;
}

.trend-line {
  fill: none;
  stroke: #111827;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-point {
  fill: #111827;
  stroke: #ffffff;
  stroke-width: 2;
  cursor: pointer;
}

.trend-point-hit {
  fill: transparent;
  stroke: transparent;
  cursor: pointer;
}

.trend-point-hit:focus {
  outline: none;
}

.trend-point:hover,
.trend-point:focus {
  r: 9;
  outline: none;
}

.trend-point.is-green {
  fill: #16a34a;
}

.trend-point.is-yellow {
  fill: #d97706;
}

.trend-point.is-red {
  fill: #dc2626;
}

.trend-detail-content {
  display: grid;
  gap: 12px;
}

.trend-detail-section {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
}

.trend-detail-section h4 {
  margin-bottom: 10px;
}

.trend-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.trend-detail-field {
  min-width: 0;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
}

.trend-detail-field span {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.trend-detail-field strong {
  display: block;
  overflow-wrap: anywhere;
  color: #111827;
  font-size: 13px;
  line-height: 1.45;
}

.multi-cycle-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.multi-cycle-head h3 {
  margin-bottom: 6px;
}

.multi-cycle-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.multi-cycle-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.multi-cycle-metric-card strong {
  font-size: 14px;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}

.multi-cycle-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.multi-cycle-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 750;
}

.multi-cycle-tag.is-muted {
  background: #f1f5f9;
  color: #475569;
}

.multi-cycle-content {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.multi-cycle-notice {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #fde68a;
  border-radius: 10px;
  background: #fffbeb;
  color: #92400e;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.multi-cycle-details {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.multi-cycle-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 14px;
  color: #111827;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.multi-cycle-details > summary::-webkit-details-marker {
  display: none;
}

.multi-cycle-details > summary::after {
  content: "展开";
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.multi-cycle-details[open] > summary::after {
  content: "收起";
}

.multi-cycle-table-wrap {
  overflow-x: auto;
  border-top: 1px solid #e5e7eb;
}

.multi-cycle-table {
  min-width: 920px;
  border: 0;
  border-radius: 0;
}

.multi-cycle-table th,
.multi-cycle-table td {
  white-space: nowrap;
}

.multi-cycle-raw {
  margin: 0;
  max-height: 360px;
  padding: 12px;
  overflow: auto;
  border-top: 1px solid #e5e7eb;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 12px;
  line-height: 1.55;
}

.cycle-review-panel {
  display: grid;
  gap: 14px;
}

.cycle-review-content {
  display: grid;
  gap: 14px;
}

.cycle-review-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  background: var(--admin-surface);
  color: var(--admin-text);
}

.cycle-review-card h3 {
  margin-bottom: 12px;
}

.cycle-review-card h4 {
  margin: 12px 0 8px;
  color: var(--admin-text);
  font-size: 14px;
}

.cycle-review-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(240px, 1fr) minmax(300px, 1.4fr) auto;
  gap: 12px;
  align-items: end;
}

.cycle-review-form .field {
  margin-bottom: 0;
}

.cycle-review-form input,
.cycle-review-form select {
  max-width: none;
  background: var(--admin-input-bg);
  color: var(--admin-text);
}

.cycle-review-actions {
  margin-top: 12px;
}

[hidden],
.cycle-report-tab-panel[hidden],
[data-cycle-report-main-panel][hidden],
[data-cycle-report-panel][hidden],
.cycle-review-card[hidden],
.cycle-report-v2-html-panel[hidden],
.cycle-report-html-preview-controls[hidden] {
  display: none !important;
}

.cycle-report-tab-panel {
  display: grid;
  gap: 14px;
}

.cycle-report-main-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.08);
}

.cycle-report-main-tab {
  min-width: 0;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.78);
  color: var(--admin-text);
  box-shadow: none;
  white-space: nowrap;
}

.cycle-report-main-tab.is-active {
  background: linear-gradient(135deg, #047857, #10b981);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(4, 120, 87, 0.22);
}

.cycle-archive-card {
  display: grid;
  gap: 14px;
}

.cycle-archive-all-card {
  display: grid;
  gap: 14px;
}

.cycle-archive-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.cycle-archive-summary > div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.68);
}

.cycle-archive-summary .label {
  display: block;
  margin-bottom: 4px;
  color: var(--admin-muted);
  font-size: 12px;
}

.cycle-archive-summary strong {
  color: var(--admin-text);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.cycle-archive-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.cycle-archive-all-card .cycle-archive-actions button.secondary {
  background: rgba(255, 255, 255, 0.74);
  border-color: var(--admin-border);
  color: var(--admin-text);
  box-shadow: none;
}

.cycle-archive-actions .status {
  flex: 1 1 260px;
}

.cycle-archive-period-list {
  display: grid;
  gap: 12px;
}

.cycle-archive-group {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.cycle-archive-group + .cycle-archive-group {
  padding-top: 4px;
}

.cycle-archive-group-head {
  display: grid;
  gap: 4px;
}

.cycle-archive-group-head h4 {
  margin: 0;
  color: var(--admin-text);
  font-size: 15px;
}

.cycle-archive-group-head .desc {
  margin: 0;
}

.cycle-archive-period-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  background: var(--admin-card-bg);
}

.cycle-archive-period-card[data-status="current"] {
  border-color: rgba(56, 189, 248, 0.55);
}

.cycle-archive-period-card[data-status="ended"] {
  border-color: rgba(52, 211, 153, 0.45);
}

.cycle-archive-period-card[data-status="inferred"] {
  border-color: rgba(251, 191, 36, 0.55);
}

.cycle-archive-period-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.cycle-archive-period-head h4 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
}

.cycle-archive-status-pill {
  flex: 0 0 auto;
  padding: 3px 8px;
  border: 1px solid var(--admin-border);
  border-radius: 999px;
  color: var(--admin-text);
  background: rgba(148, 163, 184, 0.12);
  font-size: 12px;
  font-weight: 700;
}

.cycle-archive-period-meta,
.cycle-archive-period-progress,
.cycle-archive-period-quality,
.cycle-archive-period-name,
.cycle-archive-period-hint,
.cycle-archive-period-warning,
.cycle-archive-warning {
  margin: 0;
  color: var(--admin-muted);
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.cycle-archive-period-name {
  color: var(--admin-text);
  font-weight: 800;
}

.cycle-archive-period-hint {
  padding: 8px 10px;
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: 10px;
  background: rgba(14, 165, 233, 0.08);
  color: #b6e3ff;
}

.cycle-archive-period-warning,
.cycle-archive-warning {
  color: #fbbf24;
}

.cycle-archive-period-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cycle-archive-diagnostics {
  padding: 10px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.18);
}

.cycle-archive-diagnostics > summary {
  cursor: pointer;
  color: var(--admin-text);
  font-size: 13px;
  font-weight: 800;
}

.cycle-archive-diagnostics .desc {
  margin: 8px 0 10px;
}

.cycle-archive-diagnostics-list {
  display: grid;
  gap: 10px;
}

.cycle-archive-diagnostic-block {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: var(--admin-card-bg);
}

.cycle-archive-diagnostic-block h4 {
  margin: 0;
  font-size: 13px;
}

.cycle-archive-diagnostic-row {
  margin: 0;
  color: var(--admin-muted);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.cycle-review-student-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.cycle-review-student-summary[hidden] {
  display: none;
}

.cycle-review-student-summary div,
.cycle-review-metric {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: var(--admin-card-bg);
}

.cycle-review-student-summary strong,
.cycle-review-metric strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--admin-text);
  font-size: 13px;
  line-height: 1.45;
}

.cycle-review-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 10px;
}

.cycle-review-metric .label,
.cycle-review-student-summary .label {
  display: block;
  margin-bottom: 5px;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 700;
}

.cycle-review-metric small {
  display: block;
  margin-top: 5px;
  color: var(--admin-muted);
  font-size: 12px;
  line-height: 1.35;
}

.cycle-review-text-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.cycle-review-text-list span {
  max-width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--admin-border);
  border-radius: 999px;
  background: var(--admin-card-bg);
  color: var(--admin-text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.cycle-review-mini-table {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: var(--admin-card-bg);
}

.cycle-review-insufficient {
  padding: 12px 14px;
  border: 1px solid var(--admin-warning);
  border-radius: 10px;
  background: var(--admin-warning-soft);
  color: var(--admin-warning);
  font-size: 13px;
  font-weight: 700;
}

.cycle-review-placeholder {
  margin: 0;
  padding: 12px;
  border: 1px dashed var(--admin-border);
  border-radius: 10px;
  background: var(--admin-card-bg);
  color: var(--admin-muted);
  font-size: 13px;
  font-weight: 700;
}

.cycle-review-note-tip {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  background: var(--admin-primary-soft);
  color: var(--admin-text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}

.cycle-review-note-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.cycle-review-note-form .field {
  margin-bottom: 0;
}

.cycle-review-note-form select,
.cycle-review-note-form textarea {
  max-width: none;
  background: var(--admin-input-bg);
  color: var(--admin-text);
}

.cycle-review-note-textarea-field {
  grid-column: 1 / -1;
}

.cycle-review-note-textarea-field textarea {
  resize: vertical;
}

.cycle-review-note-actions {
  margin-top: 14px;
}

.cycle-review-plan-basis-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cycle-review-plan-basis-form .cycle-review-plan-basis-field textarea {
  min-height: 92px;
}

.cycle-review-plan-basis-tip {
  border-color: var(--admin-border);
  background: var(--admin-success-soft);
  color: var(--admin-text);
}


.cycle-review-layer-details {
  min-width: 0;
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  background: var(--admin-surface);
  color: var(--admin-text);
  overflow: hidden;
}

.cycle-review-layer-details > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px;
  cursor: pointer;
  color: var(--admin-text);
  font-size: 15px;
  font-weight: 800;
  list-style: none;
}

.cycle-review-layer-details > summary::-webkit-details-marker {
  display: none;
}

.cycle-review-layer-details > summary::after {
  content: '+';
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--admin-border);
  border-radius: 999px;
  color: var(--admin-muted);
  flex: 0 0 auto;
}

.cycle-review-layer-details[open] > summary::after {
  content: '-';
}

.cycle-review-layer-details > summary small {
  margin-left: auto;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.cycle-review-layer-body {
  display: grid;
  gap: 14px;
  padding: 0 14px 14px;
}

.cycle-review-conclusion-card {
  border-color: rgba(22, 163, 74, 0.28);
  background: linear-gradient(180deg, var(--admin-surface), var(--admin-success-soft));
}

.cycle-review-key-evidence-card {
  border-color: rgba(245, 158, 11, 0.3);
}

.cycle-review-state-tip {
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--admin-warning);
  border-radius: 12px;
  background: var(--admin-warning-soft);
  color: var(--admin-text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.6;
}

.cycle-review-empty-state {
  padding: 18px;
  border: 1px dashed var(--admin-border);
  border-radius: 16px;
  background: var(--admin-card-bg);
}

.cycle-review-plan-adjustment-panel {
  border-color: rgba(37, 99, 235, 0.28);
  background: linear-gradient(180deg, var(--admin-surface), var(--admin-card-bg));
}

.cycle-review-plan-adjustment-tip {
  border-color: rgba(37, 99, 235, 0.22);
  background: var(--admin-primary-soft);
}

.cycle-review-plan-basis-table {
  display: grid;
  gap: 8px;
}

.cycle-review-plan-basis-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: var(--admin-surface);
  color: var(--admin-text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}


.cycle-review-adjustment-tag-group {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.cycle-review-adjustment-tag-group > h5 {
  margin: 0;
  color: var(--admin-muted);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.cycle-review-adjustment-tag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.cycle-review-adjustment-tag {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  background: var(--admin-card-bg);
}

.cycle-review-adjustment-tag h5,
.cycle-review-adjustment-tag h6 {
  margin: 0 0 8px;
  color: var(--admin-text);
  font-size: 14px;
  line-height: 1.35;
}

.cycle-review-plan-basis-raw {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px dashed var(--admin-border);
  border-radius: 12px;
  background: var(--admin-card-bg);
  color: var(--admin-muted);
  font-size: 13px;
  font-weight: 700;
}

.cycle-review-plan-basis-raw summary {
  cursor: pointer;
  color: var(--admin-text);
}

.cycle-review-plan-basis-raw pre {
  max-height: 220px;
  overflow: auto;
  margin: 10px 0 0;
  padding: 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--admin-text);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.cycle-review-plan-adjustment-actions {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}


.cycle-review-student-visible-tip {
  border-color: #e5e7eb;
  background: #ffffff;
  color: #334155;
}

.cycle-review-student-visible-launch,
.cycle-review-student-visible-actions {
  flex-wrap: wrap;
  gap: 10px;
}

.cycle-review-student-visible-editor {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.cycle-review-student-visible-editor[hidden] {
  display: none;
}

.cycle-review-student-visible-form {
  align-items: start;
}

.cycle-review-student-summary-textarea-field {
  grid-column: 1 / -1;
}

.cycle-review-student-summary-textarea-field textarea {
  min-height: 82px;
  resize: vertical;
}

.cycle-review-student-visible-options {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.cycle-review-student-visible-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.cycle-review-student-visible-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: 0 0 auto;
}

.cycle-review-student-visible-preview {
  display: flex;
  justify-content: center;
  padding: 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}

.cycle-review-student-visible-card {
  width: min(100%, 520px);
  padding: 22px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.cycle-review-student-visible-card h3 {
  margin: 0;
  color: #111827;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: 0;
}

.cycle-review-student-visible-subtitle {
  margin: 6px 0 16px;
  color: #4b5563;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.cycle-review-student-visible-meta,
.cycle-review-student-visible-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cycle-review-student-visible-stats {
  margin-top: 10px;
}

.cycle-review-student-visible-line {
  min-width: 0;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
}

.cycle-review-student-visible-line span {
  display: block;
  margin-bottom: 5px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.cycle-review-student-visible-line strong {
  display: block;
  color: #111827;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.cycle-review-student-visible-paragraph {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.cycle-review-student-visible-paragraph h4 {
  margin: 0 0 6px;
  color: #111827;
  font-size: 14px;
  line-height: 1.35;
}

.cycle-review-student-visible-paragraph p {
  margin: 0;
  color: #374151;
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.cycle-review-student-visible-disclaimer {
  margin: 16px 0 0;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.cycle-data-export-card {
  display: grid;
  gap: 12px;
}

.cycle-data-export-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.cycle-data-export-head h3,
.cycle-data-export-head p {
  margin: 0;
}

.cycle-data-export-head p {
  margin-top: 5px;
}

.cycle-data-export-version,
.cycle-data-export-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--admin-border);
  border-radius: 999px;
  background: var(--admin-card-bg);
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
}

.cycle-data-export-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}

.cycle-data-export-controls .field {
  width: min(260px, 100%);
  margin-bottom: 0;
}

.cycle-data-export-controls select {
  max-width: none;
}

.cycle-data-export-actions {
  margin-top: 0;
}

.cycle-data-export-preview {
  display: grid;
  gap: 12px;
}

.cycle-data-export-section {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  background: var(--admin-card-bg);
}

.cycle-data-export-section.is-archive {
  border-color: color-mix(in srgb, var(--admin-warning) 28%, var(--admin-border));
  background: color-mix(in srgb, var(--admin-card-bg) 92%, var(--admin-warning-soft));
}

.cycle-data-export-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.cycle-data-export-section-head h4 {
  margin: 0;
  color: var(--admin-text);
  font-size: 14px;
  line-height: 1.35;
}

.cycle-data-export-metric-grid + .cycle-data-export-metric-grid {
  margin-top: 10px;
}

.cycle-data-export-note {
  margin: 0 0 10px;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.cycle-data-export-table-wrap {
  max-height: min(520px, 62vh);
  overflow: auto;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: var(--admin-card-bg);
}

.cycle-data-export-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 12px;
}

.cycle-data-export-table th,
.cycle-data-export-table td {
  padding: 8px 9px;
  border-bottom: 1px solid var(--admin-border);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.cycle-data-export-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--admin-table-head-bg);
  color: var(--admin-text);
  font-weight: 900;
}

.cycle-data-export-table tbody tr:hover {
  background: color-mix(in srgb, var(--admin-primary-soft) 35%, transparent);
}

.cycle-data-export-json {
  padding: 10px 12px;
  border: 1px dashed var(--admin-border);
  border-radius: 12px;
  background: var(--admin-card-bg);
}

.cycle-data-export-json summary {
  cursor: pointer;
  color: var(--admin-text);
  font-size: 13px;
  font-weight: 800;
}

.cycle-data-export-json pre {
  max-height: min(520px, 62vh);
  overflow: auto;
  margin: 10px 0 0;
  padding: 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--admin-text);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.cycle-report-card {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.today-findings-card,
.cycle-report-v2-card {
  display: grid;
  gap: 12px;
}

.today-findings-head,
.cycle-report-v2-head {
  align-items: flex-start;
}

.today-findings-controls,
.cycle-report-v2-controls {
  display: grid;
  gap: 10px;
  align-items: end;
}

.today-findings-controls {
  grid-template-columns: minmax(150px, 1fr) minmax(130px, 0.8fr) auto;
}

.cycle-report-v2-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
}

.cycle-report-v2-export-actions {
  padding-top: 10px;
  border-top: 1px solid var(--admin-border);
}

.cycle-report-v2-export-label {
  align-self: center;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 900;
}

.today-findings-controls .field,
.cycle-report-v2-controls .field {
  margin-bottom: 0;
}

.cycle-report-maintenance-tools {
  display: block;
  padding: 10px 12px;
  border: 1px dashed var(--admin-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--admin-card-bg) 90%, var(--admin-surface));
}

.cycle-report-maintenance-tools > summary {
  cursor: pointer;
  color: var(--admin-muted);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.4;
}

.cycle-report-maintenance-tools[open] > summary {
  margin-bottom: 8px;
}

.cycle-report-v2-maintenance-actions {
  padding-top: 6px;
}

.cycle-report-coach-review-text {
  width: 100%;
  box-sizing: border-box;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  color: var(--admin-text);
  background: color-mix(in srgb, var(--admin-card-bg) 88%, #020617);
  font-size: 12px;
  line-height: 1.6;
  resize: vertical;
}

.today-findings-summary,
.cycle-report-v2-summary {
  display: grid;
  gap: 10px;
}

.today-findings-content,
.cycle-report-v2-preview {
  display: grid;
  gap: 12px;
}

.today-findings-group,
.cycle-report-v2-section {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  background: var(--admin-card-bg);
}

.today-findings-group h4,
.cycle-report-v2-section h4 {
  margin: 0 0 10px;
  color: var(--admin-text);
  font-size: 14px;
  line-height: 1.35;
}

.today-findings-item-list,
.cycle-report-v2-list {
  display: grid;
  gap: 8px;
}

.today-findings-item,
.cycle-report-v2-list-item {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--admin-card-bg) 88%, var(--admin-surface));
}

.cycle-report-v2-list-item[data-status="insufficient"] {
  border-style: dashed;
  background: color-mix(in srgb, var(--admin-warning) 7%, var(--admin-card-bg));
}

.cycle-report-v2-list-item[data-status="sample_insufficient"],
.cycle-report-v2-list-item[data-status="field_missing"] {
  border-style: dashed;
  background: color-mix(in srgb, var(--admin-warning) 6%, var(--admin-card-bg));
}

.today-findings-item strong,
.cycle-report-v2-list-item strong {
  color: var(--admin-text);
  font-size: 13px;
  line-height: 1.4;
}

.today-findings-item p,
.cycle-report-v2-list-item p {
  margin: 0;
  color: var(--admin-muted);
  font-size: 12px;
  line-height: 1.5;
}

.cycle-report-v2-cross-group {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--admin-border);
}

.cycle-report-v2-cross-group h5 {
  margin: 0;
  color: var(--admin-text);
  font-size: 13px;
  line-height: 1.4;
}

.cycle-report-v2-plan-actual-details {
  display: block;
  margin-top: 10px;
  padding: 10px;
  border: 1px dashed var(--admin-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--admin-card-bg) 92%, var(--admin-surface));
}

.cycle-report-v2-plan-actual-details > summary {
  cursor: pointer;
  color: var(--admin-text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.4;
}

.cycle-report-v2-plan-actual-details[open] > summary {
  margin-bottom: 10px;
}

.cycle-report-v2-audit-details {
  display: block;
}

.cycle-report-v2-audit-details > summary {
  cursor: pointer;
  color: var(--admin-text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
}

.cycle-report-v2-audit-details[open] > summary {
  margin-bottom: 10px;
}

.cycle-report-v2-audit-heading {
  margin: 14px 0 8px;
  color: var(--admin-text);
  font-size: 13px;
  line-height: 1.4;
}

.cycle-report-v2-audit-details .cycle-data-export-table-wrap {
  margin-bottom: 12px;
}

.today-findings-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.today-findings-tag {
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--admin-muted);
  background: rgba(148, 163, 184, 0.14);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.today-findings-group[data-type="risk"] {
  border-color: color-mix(in srgb, var(--admin-danger) 28%, var(--admin-border));
}

.today-findings-group[data-type="progress"] {
  border-color: color-mix(in srgb, var(--admin-success) 28%, var(--admin-border));
}

.today-findings-group[data-type="missing"] {
  border-color: color-mix(in srgb, var(--admin-warning) 30%, var(--admin-border));
}

.cycle-report-v2-html-panel {
  margin-top: 2px;
}

.cycle-report-delivery-workbench {
  gap: 16px;
}

.cycle-report-delivery-head {
  align-items: center;
}

.cycle-report-delivery-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.cycle-workbench-grid {
  display: grid;
  gap: 14px;
}

.cycle-workbench-block {
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--admin-card-bg) 92%, var(--admin-primary-soft));
}

.cycle-workbench-block-head {
  display: grid;
  gap: 4px;
}

.cycle-workbench-block-head h4,
.cycle-workbench-block-head p {
  margin: 0;
}

.cycle-workbench-block-head h4 {
  color: var(--admin-text);
  font-size: 15px;
  line-height: 1.35;
}

.cycle-report-generate-controls {
  grid-template-columns: minmax(220px, 1.35fr) minmax(220px, 1.35fr) repeat(4, minmax(136px, 1fr));
}

.cycle-workbench-button-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.cycle-workbench-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.cycle-workbench-notes .field {
  margin-bottom: 0;
}

.cycle-workbench-export-grid {
  display: grid;
  gap: 12px;
}

.cycle-workbench-export-group {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px dashed var(--admin-border);
  border-radius: 12px;
  background: var(--admin-card-bg);
}

.cycle-workbench-export-group strong {
  color: var(--admin-text);
  font-size: 14px;
  line-height: 1.35;
}

.cycle-workbench-note {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.cycle-report-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
}

.cycle-report-controls button {
  min-height: 38px;
}

.cycle-report-user-field {
  grid-column: span 2;
}

.cycle-report-plan-field {
  grid-column: span 2;
}

.cycle-report-coach-note-field textarea {
  min-height: 82px;
  resize: vertical;
  line-height: 1.55;
}

.cycle-report-actions,
.cycle-report-saved-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.cycle-report-preview,
.cycle-report-saved-list {
  display: grid;
  gap: 12px;
}

.cycle-report-section,
.cycle-report-saved-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  background: var(--admin-card-bg);
}

.cycle-report-section h4,
.cycle-report-saved-head h4 {
  margin: 0 0 10px;
  color: var(--admin-text);
  font-size: 14px;
  line-height: 1.35;
}

.cycle-report-note {
  margin: 10px 0 0;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.cycle-report-saved-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
}

.cycle-report-saved-head h4,
.cycle-report-saved-head p {
  margin-bottom: 6px;
}

.cycle-report-saved-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cycle-report-saved-card p {
  margin: 8px 0 12px;
  color: var(--admin-muted);
  font-size: 13px;
  line-height: 1.55;
}

.cycle-report-visibility-badge {
  flex-shrink: 0;
  border: 1px solid var(--admin-border);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.cycle-report-visibility-badge.visible {
  color: #166534;
  background: #dcfce7;
  border-color: #bbf7d0;
}

.cycle-report-visibility-badge.admin {
  color: var(--admin-muted);
  background: rgba(148, 163, 184, 0.12);
}

.cycle-report-html-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  padding: 12px;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.04);
}

.cycle-report-html-preview-head h4,
.cycle-report-html-preview-head p {
  margin: 0 0 6px;
}

.cycle-report-html-preview-head .status {
  flex-shrink: 0;
  max-width: 360px;
  text-align: right;
}

.cycle-report-html-preview-panel {
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  background: #0b0f19;
}

.cycle-report-html-preview-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--admin-card-bg) 92%, var(--admin-primary-soft));
}

.cycle-report-html-preview-control-head {
  display: flex;
  flex: 1 1 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cycle-report-html-preview-meta {
  display: block;
  margin-top: 3px;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 600;
}

.cycle-report-html-preview-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.cycle-report-html-preview-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--admin-text);
  font-size: 13px;
  font-weight: 700;
}

.cycle-report-html-preview-controls input {
  margin: 0;
}

.cycle-report-html-preview-panel[hidden] {
  display: none;
}

.cycle-report-html-preview-panel iframe {
  display: block;
  width: 100%;
  min-height: 760px;
  border: 0;
  background: #0b0f19;
}

@media (max-width: 900px) {
  .cycle-report-controls {
    grid-template-columns: 1fr;
  }

  .cycle-report-delivery-head,
  .cycle-report-saved-head {
    display: grid;
  }

  .cycle-report-delivery-badges {
    justify-content: flex-start;
  }

  .cycle-report-user-field {
    grid-column: span 1;
  }

  .cycle-report-plan-field {
    grid-column: span 1;
  }

  .cycle-report-html-preview-head {
    display: grid;
  }

  .cycle-report-html-preview-head .status {
    max-width: none;
    text-align: left;
  }

  .cycle-report-html-preview-panel iframe {
    min-height: 680px;
  }

  .cycle-workbench-two-col {
    grid-template-columns: 1fr;
  }

  .today-findings-controls,
  .cycle-report-v2-controls {
    grid-template-columns: 1fr;
  }

  .cycle-report-main-tabs,
  .cycle-archive-summary {
    grid-template-columns: 1fr;
  }
}

.section-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--admin-border);
}

.section-head h2 {
  font-size: 21px;
}

.login-panel,
.status-panel {
  border-top: 4px solid var(--admin-primary);
}

.login-panel h1 {
  color: var(--admin-text);
}

.login-panel .eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--admin-primary);
  color: var(--admin-primary-text);
  letter-spacing: 0;
  text-transform: none;
}

.user-filter-card,
.invite-code-filter-card,
.normal-readonly-filter-card,
.normal-readonly-scope-notice,
.normal-conversion-panel,
.system-settings-card,
.training-export-form,
.raw-form,
.trend-card,
.cycle-review-card,
.plan-assign-card,
.plan-current-card,
.plan-preview-card,
.plan-converter-input-card,
.plan-converter-output-card,
.plan-message-card,
.invite-code-create-card,
.user-category-stats-card,
.normal-readonly-summary-card,
.normal-readonly-user-list-card,
.normal-readonly-detail-card,
.raw-record-group,
.coach-internal-note-panel,
.focus-student-panel {
  border-color: var(--admin-border);
  border-radius: 10px;
  background: var(--admin-surface);
}

.student-card,
.raw-record-card,
.user-card,
.invite-code-card,
.operation-log-card,
.coach-review-card,
.training-export-preview-item,
.training-export-summary div,
.trend-student-summary div,
.trend-detail-section,
.trend-detail-field,
.cycle-review-student-summary div,
.cycle-review-metric,
.plan-current-summary div,
.plan-current-day-card,
.plan-current-history-card,
.plan-backend-card,
.plan-preview-summary div,
.plan-assign-confirm-details div {
  border-color: var(--admin-border);
  border-radius: 10px;
  background: var(--admin-card-bg);
}

.plan-preview-table-wrap,
.trend-chart-wrap,
.created-invite-code-list,
.plan-converter-output,
.raw-json,
.operation-log-json,
.result {
  border-color: var(--admin-border);
  border-radius: 10px;
}

.plan-preview-table th,
.normal-readonly-table th {
  background: var(--admin-table-head-bg);
  color: var(--admin-text);
}

.plan-preview-table th,
.plan-preview-table td,
.normal-readonly-table th,
.normal-readonly-table td {
  border-bottom-color: var(--admin-border);
}

.admin-status-pill,
.coach-review-traffic-badge,
.coach-review-state-badge,
.raw-record-light-badge,
.traffic-debug-badge,
.normal-readonly-badge,
.raw-archive-badge,
.user-flag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.admin-status-pill.is-vip {
  border-color: #d6c37b;
  background: var(--admin-purple-soft);
  color: var(--admin-purple);
}

.admin-status-pill.is-student {
  border-color: #9dceb0;
  background: var(--admin-success-soft);
  color: var(--admin-success);
}

.admin-status-pill.is-normal {
  border-color: var(--admin-border);
  background: var(--admin-primary-soft);
  color: var(--admin-muted);
}

.admin-status-pill.is-expired {
  border-color: #d9b08a;
  background: var(--admin-warning-soft);
  color: var(--admin-warning);
}

.coach-review-traffic-badge.red,
.raw-record-card.is-traffic-red .raw-record-light-badge,
.trend-light-item.is-red {
  background: var(--admin-danger-soft);
  color: var(--admin-danger);
}

.coach-review-traffic-badge.yellow,
.raw-record-card.is-traffic-yellow .raw-record-light-badge,
.trend-light-item.is-yellow {
  background: var(--admin-warning-soft);
  color: var(--admin-warning);
}

.coach-review-traffic-badge.green,
.raw-record-card.is-traffic-green .raw-record-light-badge,
.trend-light-item.is-green {
  background: var(--admin-success-soft);
  color: var(--admin-success);
}

.coach-review-traffic-badge.cycle-completed,
.coach-review-traffic-badge.renewal {
  background: var(--admin-purple-soft);
  color: var(--admin-purple);
}

.coach-review-traffic-badge.no-training,
.coach-review-traffic-badge.empty {
  background: var(--admin-primary-soft);
  color: var(--admin-muted);
}

.coach-review-state-badge.unreviewed {
  background: var(--admin-warning-soft);
  color: var(--admin-warning);
}

.coach-review-state-badge.reviewed {
  background: var(--admin-success-soft);
  color: var(--admin-success);
}

.user-flag {
  border-color: var(--admin-border);
  background: var(--admin-primary-soft);
  color: var(--admin-muted);
}

.user-flag.is-on {
  border-color: #9dceb0;
  background: var(--admin-success-soft);
  color: var(--admin-success);
}

.raw-type-button,
.coach-review-collapse-button {
  border-radius: 999px;
}

.raw-type-button.is-active {
  border-color: var(--admin-primary);
  background: var(--admin-primary);
  color: var(--admin-primary-text);
}

.coach-alias-editor,
.raw-archive-note,
.raw-type-button,
.raw-type-option span,
.cycle-review-placeholder,
.cycle-review-student-visible-line,
.cycle-review-student-visible-preview,
.cycle-review-student-visible-disclaimer,
.plan-day-edit-set-row,
.plan-day-edit-exercise-card,
.permission-confirm-tip,
.plan-cycle-update-context,
.cycle-review-note-tip {
  border-color: var(--admin-border);
  background: var(--admin-surface);
  color: var(--admin-text);
}

.raw-type-button:hover {
  border-color: var(--admin-primary);
  background: var(--admin-secondary-button-hover-bg);
  color: var(--admin-secondary-button-text);
}

.raw-type-option input[type="checkbox"]:checked + span {
  border-color: var(--admin-primary);
  background: var(--admin-primary);
  color: var(--admin-primary-text);
}

.coach-alias-label,
.coach-alias-summary span,
.raw-detail-text-list p,
.raw-detail-empty,
.coach-review-compact-reason,
.coach-review-compact-date,
.cycle-review-student-visible-subtitle,
.cycle-review-student-visible-paragraph p,
.cycle-review-student-visible-line span {
  color: var(--admin-muted);
}

.raw-detail-section h5,
.coach-alias-summary strong,
.cycle-review-student-visible-card h3,
.cycle-review-student-visible-line strong,
.cycle-review-student-visible-paragraph h4,
.invite-code-status-pill {
  color: var(--admin-text);
}

.invite-code-status-pill {
  border-color: var(--admin-primary);
  background: var(--admin-primary-soft);
}

:root[data-admin-theme="powerRed"] .invite-code-status-pill,
:root[data-admin-theme="mamba"] .invite-code-status-pill {
  background: var(--admin-primary);
  color: var(--admin-primary-text);
}

.dashboard-grid,
.coach-review-grid,
.raw-records-grid,
.normal-readonly-layout {
  gap: 14px;
}

.normal-readonly-card-head,
.normal-readonly-table th,
.created-invite-code-list,
.plan-converter-output,
.trend-chart-wrap,
.cycle-review-student-visible-card,
.plan-revoke-dialog,
.permission-dialog,
.coach-review-dialog,
.raw-archive-dialog {
  background: var(--admin-card-bg);
  color: var(--admin-text);
}

.plan-revoke-modal-backdrop,
.permission-modal-backdrop,
.coach-review-modal-backdrop {
  background: var(--admin-modal-backdrop);
}

.invite-code-create-form input,
.invite-code-create-form select,
.user-filter-card input,
.user-filter-card select,
.invite-code-filter-card input,
.invite-code-filter-card select,
.normal-readonly-filter-card input,
.normal-readonly-filter-card select,
.system-settings-theme-switch select,
.training-export-form input,
.training-export-form select,
.raw-form input,
.raw-form select,
.trend-student-form input,
.trend-student-form select,
.trend-filter-grid input,
.trend-filter-grid select,
.cycle-review-form input,
.cycle-review-form select,
.cycle-review-note-form select,
.cycle-review-note-form textarea,
.plan-assign-form input,
.plan-assign-form select,
.plan-student-form input,
.plan-student-form select,
.plan-confirm-form input,
.plan-revoke-form input,
.plan-converter-input-card textarea,
.raw-archive-reason-field textarea {
  border-color: var(--admin-border);
  background: var(--admin-input-bg);
  color: var(--admin-text);
}

.student-meta strong,
.normal-readonly-table td,
.raw-field strong,
.operation-log-meta strong,
.plan-backend-meta strong,
.plan-current-summary strong,
.trend-student-summary strong,
.trend-detail-field strong,
.cycle-review-student-summary strong,
.cycle-review-metric strong,
.training-export-summary strong,
.training-export-preview-meta strong,
.normal-readonly-field-grid strong,
.normal-readonly-summary-grid strong,
.permission-current-grid strong,
.plan-assign-confirm-details strong {
  color: var(--admin-text);
}

.student-meta span,
.normal-readonly-table td span,
.raw-field span,
.operation-log-meta span,
.training-export-summary .label,
.training-export-preview-meta span,
.trend-axis-label,
.traffic-debug-quick-row .hint,
.normal-readonly-card-head p,
.cycle-review-metric small {
  color: var(--admin-muted);
}

.plan-preview-table td,
.plan-preview-table th {
  color: var(--admin-text);
}

.raw-json,
.operation-log-json,
.result {
  background: #111111;
  color: #f8fafc;
}

:root[data-admin-theme="powerRed"] .raw-json,
:root[data-admin-theme="powerRed"] .operation-log-json,
:root[data-admin-theme="powerRed"] .result,
:root[data-admin-theme="mamba"] .raw-json,
:root[data-admin-theme="mamba"] .operation-log-json,
:root[data-admin-theme="mamba"] .result {
  border-color: var(--admin-border);
  background: #070707;
  color: #f8fafc;
}

.leaderboard-panel {
  display: grid;
  gap: 16px;
}

.leaderboard-filter-card,
.leaderboard-meta-panel {
  padding: 14px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface);
}

.leaderboard-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
}

.leaderboard-actions {
  flex-wrap: wrap;
  margin-top: 12px;
}

.leaderboard-meta-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.leaderboard-meta-panel div {
  min-width: 0;
}

.leaderboard-meta-panel span {
  display: block;
  margin-bottom: 4px;
  color: var(--admin-muted);
  font-size: 12px;
}

.leaderboard-meta-panel strong {
  display: block;
  color: var(--admin-text);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.leaderboard-table-wrap {
  overflow: auto;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-card-bg);
}

.leaderboard-table {
  width: 100%;
  min-width: 1540px;
  border-collapse: collapse;
  font-size: 12px;
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 10px 9px;
  border-bottom: 1px solid var(--admin-border);
  color: var(--admin-text);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.leaderboard-table th {
  background: var(--admin-table-head-bg);
  font-weight: 700;
}

.leaderboard-table tbody tr:hover {
  background: var(--admin-primary-soft);
}

.leaderboard-rank-cell {
  font-weight: 800;
}

.leaderboard-user-cell {
  min-width: 150px;
}

.leaderboard-user-cell strong,
.leaderboard-user-cell span {
  display: block;
}

.leaderboard-user-cell strong {
  max-width: 180px;
  overflow: hidden;
  color: var(--admin-text);
  text-overflow: ellipsis;
}

.leaderboard-user-cell span {
  margin-top: 3px;
  color: var(--admin-muted);
  font-size: 11px;
}

.leaderboard-positive-cell {
  color: var(--admin-success) !important;
  font-weight: 700;
}

.leaderboard-quality-cell {
  font-weight: 700;
}

.leaderboard-quality-cell.high {
  color: var(--admin-success);
}

.leaderboard-quality-cell.medium {
  color: var(--admin-warning);
}

.leaderboard-quality-cell.low {
  color: var(--admin-muted);
}

.leaderboard-empty-cell {
  padding: 28px 12px !important;
  color: var(--admin-muted) !important;
  text-align: center !important;
}

@media (max-width: 900px) {
  .page {
    width: min(100% - 20px, 1360px);
    padding-top: 12px;
  }

  .back-to-top-button {
    right: 14px;
    bottom: 84px;
    height: 38px;
    padding: 0 14px;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .smart-search-bar {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
  }

  .admin-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-head {
    display: block;
  }

  .section-head button {
    margin-top: 12px;
  }

  .dashboard-grid,
  .coach-dashboard-grid,
  .coach-dashboard-meta-grid,
  .coach-dashboard-detail-grid,
  .coach-dashboard-toolbar,
  .coach-review-grid,
  .plan-converter-grid,
  .plan-preview-summary,
  .plan-preview-grid,
  .plan-assign-form,
  .plan-student-form,
  .plan-confirm-form,
  .plan-revoke-form,
  .plan-current-summary,
  .plan-day-edit-context,
  .plan-day-edit-basic-grid,
  .plan-day-edit-exercise-fields,
  .plan-day-edit-set-row,
  .plan-day-edit-set-fields,
  .plan-message-grid,
  .raw-records-grid,
  .user-filter-card,
  .invite-code-filter-card,
  .invite-code-create-form,
  .invite-create-row,
  .user-category-stats-grid,
  .user-meta-grid,
  .user-full-profile-grid,
  .invite-code-meta-grid,
  .raw-user-summary,
  .operation-log-meta-grid,
  .permission-current-grid,
  .permission-action-fields,
  .traffic-debug-filter-grid,
  .traffic-debug-field-grid,
  .trend-student-form,
  .trend-filter-grid,
  .trend-student-summary,
  .trend-summary-grid,
    .trend-detail-grid,
    .cycle-review-form,
    .cycle-review-note-form,
    .cycle-review-student-summary,
    .cycle-review-student-visible-options,
    .cycle-review-student-visible-meta,
    .cycle-review-student-visible-stats,
  .cycle-review-metric-grid,
  .training-export-form,
  .training-export-summary,
  .training-export-preview-meta,
  .normal-readonly-filter-card,
  .normal-readonly-layout,
  .admin-password-grid,
  .ai-draft-settings-grid,
  .system-settings-reserved-list,
  .normal-user-card-meta,
  .normal-readonly-field-grid,
  .normal-readonly-summary-grid,
  .normal-conversion-summary-grid,
  .normal-manual-plan-summary,
  .leaderboard-filter-grid,
  .leaderboard-meta-panel,
  .raw-query-row,
  .raw-date-row {
    grid-template-columns: 1fr;
  }

  .plan-converter-output-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .coach-review-meta-grid {
    grid-template-columns: 1fr;
  }

  .coach-review-list-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .coach-review-compact-reason,
  .coach-review-compact-date {
    grid-column: 1 / -1;
    white-space: normal;
  }

  .coach-review-raw-button {
    grid-column: 1;
  }

  .coach-review-review-button {
    grid-column: 2;
  }

  .coach-review-plan-update-button {
    grid-column: 2;
  }

  .coach-review-toggle {
    grid-column: 1 / -1;
  }

  .coach-review-current-grid {
    grid-template-columns: 1fr;
  }

  .user-card-head,
  .invite-code-card-head,
  .operation-log-card-head,
  .coach-dashboard-card-head,
  .coach-review-dialog-head,
  .coach-review-card-head,
  .plan-assign-head,
  .plan-current-head,
  .plan-day-edit-head,
  .plan-day-edit-workout-head,
  .plan-day-edit-exercise-head,
  .normal-readonly-detail-head,
  .normal-conversion-head,
  .normal-conversion-tools,
  .normal-readonly-export-card,
  .permission-dialog-head {
    display: block;
  }

  .user-category-stats-head {
    display: block;
  }

  .normal-readonly-actions {
    justify-content: flex-start;
    margin-top: 12px;
  }

  .user-card-actions {
    justify-content: flex-start;
    margin-top: 12px;
  }

  .coach-alias-editor {
    width: 100%;
  }

  .coach-alias-body {
    grid-template-columns: 1fr;
  }

  .workbench-mute-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .workbench-mute-actions {
    justify-content: flex-start;
  }

  .coach-dashboard-handled-summary {
    grid-template-columns: 1fr;
  }

  .coach-dashboard-handled-summary button {
    grid-row: auto;
    grid-column: auto;
    justify-self: flex-start;
  }

  .permission-modal {
    align-items: flex-start;
    padding: 12px;
  }
}

@media (max-width: 720px) {
  .admin-auth-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .login-panel,
  .login-form {
    grid-template-columns: 1fr;
  }

  .login-panel {
    gap: 12px;
  }

  .login-copy,
  .login-form {
    grid-column: 1;
  }

  .login-form {
    justify-self: stretch;
    width: 100%;
  }
}


.cycle-review-adjustment-tag[data-severity="high"] {
  border-color: rgba(220, 38, 38, 0.35);
  background: rgba(254, 242, 242, 0.65);
}

.cycle-review-adjustment-tag[data-severity="medium"] {
  border-color: rgba(245, 158, 11, 0.38);
}

.cycle-review-tag-evidence-more {
  margin-top: 8px;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 800;
}

.cycle-review-tag-evidence-more summary {
  cursor: pointer;
}

.cycle-review-adjustment-empty {
  margin: 8px 0 0;
}

/* V0.9.24 Web admin UI polish: visual hierarchy only, no business behavior changes. */
:root {
  --admin-radius-panel: 12px;
  --admin-radius-card: 8px;
  --admin-space-panel: 20px;
  --admin-space-section: 18px;
  --admin-subtle-shadow: 0 10px 26px rgba(17, 17, 17, 0.06);
}

.is-logged-in .page {
  width: min(1280px, calc(100% - 40px));
  padding-top: 34px;
  padding-bottom: 44px;
}

.admin-shell {
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 22px;
}

.admin-sidebar {
  top: 24px;
  padding: 18px;
  border-radius: var(--admin-radius-panel);
}

.admin-sidebar-title {
  gap: 4px;
  margin-bottom: 18px;
  padding-bottom: 16px;
}

.admin-sidebar-title strong {
  font-size: 16px;
}

.admin-sidebar-title span,
.admin-nav-group-title {
  letter-spacing: 0.06em;
}

.admin-nav {
  gap: 5px;
}

.admin-nav-group-title {
  margin: 16px 0 6px;
  padding: 0 4px;
  color: color-mix(in srgb, var(--admin-sidebar-muted) 74%, transparent);
  font-size: 10px;
  text-transform: uppercase;
}

.admin-nav-item {
  min-height: 38px;
  padding: 9px 11px;
  border-radius: var(--admin-radius-card);
  font-size: 13px;
  line-height: 1.35;
}

.admin-nav-item:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.admin-nav-item.is-active {
  border-color: transparent;
  box-shadow: inset 3px 0 0 var(--admin-accent), 0 8px 18px rgba(0, 0, 0, 0.12);
}

.admin-content {
  display: grid;
  min-width: 0;
  gap: var(--admin-space-section);
}

.admin-content .panel,
.admin-section.panel,
.panel {
  margin-bottom: 0;
  padding: var(--admin-space-panel);
  border-radius: var(--admin-radius-panel);
  box-shadow: var(--admin-subtle-shadow);
}

.smart-search-panel {
  gap: 12px;
  padding: 16px 18px;
}

.smart-search-bar {
  align-items: end;
}

.section-head {
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 16px;
}

.section-head h2 {
  font-size: 20px;
  letter-spacing: 0;
}

.section-head .desc,
.desc {
  color: var(--admin-muted);
  line-height: 1.65;
}

.metric-card {
  min-height: 82px;
  padding: 14px 15px;
  border-radius: var(--admin-radius-card);
  background: color-mix(in srgb, var(--admin-card-bg) 72%, var(--admin-surface));
}

.metric-card strong {
  font-size: 24px;
  letter-spacing: 0;
}

button {
  min-width: 0;
  border-radius: var(--admin-radius-card);
  font-weight: 800;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(17, 17, 17, 0.10);
}

button.secondary {
  box-shadow: none;
}

button.secondary:hover {
  box-shadow: 0 6px 14px rgba(17, 17, 17, 0.08);
}

button.small-button,
.coach-dashboard-toggle,
.coach-review-collapse-button,
.coach-review-toggle,
.coach-review-raw-button,
.coach-review-review-button,
.coach-review-plan-update-button {
  min-height: 30px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status,
.dashboard-status {
  border-radius: 999px;
  background: color-mix(in srgb, var(--admin-card-bg) 72%, var(--admin-surface));
}

.empty {
  border-color: color-mix(in srgb, var(--admin-border) 70%, transparent);
  border-radius: var(--admin-radius-card);
  background: color-mix(in srgb, var(--admin-card-bg) 82%, var(--admin-surface));
  color: var(--admin-muted);
}

.coach-dashboard-panel {
  gap: 16px;
}

.coach-dashboard-summary {
  gap: 10px;
}

.coach-dashboard-grid {
  gap: 12px;
}

.coach-dashboard-section {
  padding: 15px;
  border-radius: var(--admin-radius-card);
}

.coach-dashboard-layer-must {
  border-color: color-mix(in srgb, var(--admin-danger) 42%, var(--admin-border));
  background: color-mix(in srgb, var(--admin-card-bg) 94%, var(--admin-danger) 6%);
}

.coach-dashboard-layer-no-training {
  border-color: color-mix(in srgb, var(--admin-warning) 24%, var(--admin-border));
  background: color-mix(in srgb, var(--admin-card-bg) 94%, var(--admin-warning) 6%);
}

.coach-dashboard-layer-observe {
  border-color: color-mix(in srgb, var(--admin-muted) 18%, var(--admin-border));
  background: color-mix(in srgb, var(--admin-card-bg) 90%, var(--admin-surface));
}

.coach-dashboard-layer-tools {
  border-color: var(--admin-border);
  background: var(--admin-card-bg);
}

.coach-dashboard-section-head {
  margin-bottom: 12px;
}

.coach-dashboard-section-head h3 {
  font-size: 16px;
}

.coach-dashboard-section-head p {
  max-width: 760px;
  color: var(--admin-muted);
  font-weight: 600;
}

.coach-dashboard-card,
.coach-dashboard-tool-card,
.coach-review-card,
.dashboard-column,
.student-card,
.raw-record-card,
.normal-readonly-card,
.cycle-review-card,
.cycle-review-panel,
.cycle-review-note-panel,
.multi-cycle-panel,
.trend-detail-panel {
  border-radius: var(--admin-radius-card);
  box-shadow: none;
}

.coach-dashboard-card.is-handled {
  opacity: .72;
}

.coach-dashboard-handled-block {
  border-radius: var(--admin-radius-card);
}

.coach-dashboard-badge,
.coach-review-traffic-badge,
.coach-review-state-badge,
.raw-record-light-badge,
.raw-review-badge,
.normal-readonly-badge,
.raw-archive-badge,
.student-plan-view-badge,
.focus-student-badge,
.coach-followup-badge,
.workbench-muted-badge,
.traffic-debug-badge,
.tag-list span,
.user-flag,
.admin-status-pill {
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.coach-review-traffic-badge.red,
.raw-record-card.is-traffic-red .raw-record-light-badge,
.coach-dashboard-badge.red,
.coach-dashboard-badge.pain {
  background: color-mix(in srgb, var(--admin-danger-soft) 82%, var(--admin-card-bg));
  color: var(--admin-danger);
}

.coach-review-traffic-badge.yellow,
.raw-record-card.is-traffic-yellow .raw-record-light-badge,
.coach-dashboard-badge.yellow,
.coach-dashboard-badge.no-training,
.coach-dashboard-badge.review-pending,
.coach-dashboard-badge.data-quality {
  background: color-mix(in srgb, var(--admin-warning-soft) 82%, var(--admin-card-bg));
  color: var(--admin-warning);
}

.coach-review-traffic-badge.green,
.raw-record-card.is-traffic-green .raw-record-light-badge,
.coach-review-state-badge.reviewed,
.coach-dashboard-badge.reviewed,
.coach-dashboard-badge.normal-lead {
  background: color-mix(in srgb, var(--admin-success-soft) 82%, var(--admin-card-bg));
  color: var(--admin-success);
}

.coach-dashboard-badge.cycle-completed,
.coach-dashboard-badge.plan-adjust,
.coach-dashboard-badge.renewal,
.coach-review-traffic-badge.cycle-completed,
.coach-review-traffic-badge.renewal {
  background: color-mix(in srgb, var(--admin-purple-soft) 82%, var(--admin-card-bg));
  color: var(--admin-purple);
}

.plan-preview-table-wrap,
.normal-readonly-table-wrap,
.leaderboard-table-wrap,
.multi-cycle-table-wrap {
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-card);
  background: var(--admin-card-bg);
}

.plan-preview-table,
.normal-readonly-table,
.leaderboard-table,
.multi-cycle-table {
  font-size: 12px;
}

.plan-preview-table th,
.plan-preview-table td,
.normal-readonly-table th,
.normal-readonly-table td,
.leaderboard-table th,
.leaderboard-table td,
.multi-cycle-table th,
.multi-cycle-table td {
  padding: 10px 11px;
  border-bottom-color: var(--admin-border);
  vertical-align: middle;
}

.plan-preview-table th,
.normal-readonly-table th,
.leaderboard-table th,
.multi-cycle-table th {
  background: var(--admin-table-head-bg);
  color: var(--admin-text);
  font-weight: 800;
}

.normal-readonly-table tbody tr:hover,
.leaderboard-table tbody tr:hover {
  background: color-mix(in srgb, var(--admin-primary-soft) 72%, transparent);
}

.cycle-review-content,
.trend-detail-content,
.multi-cycle-content,
.user-full-profile-content {
  gap: 14px;
}

.cycle-review-plan-basis-row,
.cycle-review-metric,
.raw-field,
.operation-log-meta div,
.plan-backend-meta div,
.plan-current-summary div,
.trend-detail-field {
  border-radius: var(--admin-radius-card);
}

@media (max-width: 900px) {
  .is-logged-in .page {
    width: min(100% - 20px, 1360px);
    padding-top: 16px;
  }

  .admin-shell {
    gap: 14px;
  }

  .admin-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-nav-group-title {
    grid-column: 1 / -1;
  }
}

/* V0.9.24 follow-up: cleaner console header, lower navigation, text folding. */
#adminBuildBadge {
  position: static;
  display: grid;
  gap: 2px;
  width: 100%;
  margin: 0 0 10px;
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--admin-radius-card);
  background: rgba(255, 255, 255, 0.07);
  color: var(--admin-sidebar-text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  box-shadow: none;
}

#adminBuildBadge div + div {
  color: var(--admin-sidebar-muted);
  font-size: 11px;
  font-weight: 700;
}

.admin-sidebar-title {
  margin-bottom: 12px;
  padding: 0 2px 12px;
}

.admin-sidebar-title span {
  color: var(--admin-sidebar-muted);
}

.admin-sidebar-actions {
  margin-bottom: 0;
  padding-bottom: 18px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.18);
}

.admin-nav {
  margin-top: 24px;
}

.admin-nav-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0 8px;
  padding: 0 2px;
  color: color-mix(in srgb, var(--admin-accent) 72%, var(--admin-sidebar-text));
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.admin-nav-group-title:first-child {
  margin-top: 0;
}

.admin-nav-group-title::before {
  content: '';
  width: 4px;
  height: 14px;
  border-radius: 999px;
  background: currentColor;
  opacity: .82;
}

.admin-nav-item {
  color: color-mix(in srgb, var(--admin-sidebar-text) 74%, transparent);
  font-size: 13px;
  font-weight: 800;
}

.smart-search-panel {
  min-height: 132px;
  align-content: center;
}

.smart-search-field input {
  max-width: 520px;
}

.admin-content .panel + .panel,
.admin-section.panel {
  border-color: color-mix(in srgb, var(--admin-border) 92%, transparent);
}

.coach-dashboard-section,
.coach-review-column,
.dashboard-column,
.normal-readonly-filter-card,
.normal-conversion-filter-card,
.raw-record-group,
.cycle-review-selector-card,
.cycle-review-card,
.cycle-review-note-panel,
.multi-cycle-panel,
.trend-detail-panel,
.plan-current-day-card,
.plan-current-history-card,
.plan-preview-table-card,
.feedback-draft-evidence-grid section {
  border-style: dashed;
  background: color-mix(in srgb, var(--admin-card-bg) 78%, var(--admin-surface));
}

.plan-preview-table-card,
.plan-converter-output-card,
.plan-converter-input-card {
  border-style: solid;
  border-radius: 22px;
}

.coach-dashboard-card,
.coach-review-card,
.student-card,
.raw-record-card,
.normal-readonly-card,
.coach-dashboard-tool-card {
  border-style: solid;
  background: var(--admin-card-bg);
}

.coach-dashboard-card + .coach-dashboard-card,
.coach-review-card + .coach-review-card,
.raw-record-card + .raw-record-card,
.student-card + .student-card {
  margin-top: 2px;
}

.plan-current-summary div,
.coach-dashboard-meta-grid div,
.coach-dashboard-detail-grid div,
.coach-review-meta-grid div,
.raw-summary-grid div,
.trend-detail-field,
.cycle-review-metric,
.cycle-review-plan-basis-row,
.permission-current-grid div,
.plan-assign-confirm-details div {
  border-style: dashed;
  background: color-mix(in srgb, var(--admin-card-bg) 86%, var(--admin-surface));
}

.long-text-fold {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.long-text-fold summary {
  width: fit-content;
  cursor: pointer;
  list-style: none;
  user-select: none;
  padding: 3px 9px;
  border: 1px solid var(--admin-border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--admin-card-bg) 82%, var(--admin-surface));
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.long-text-fold summary::-webkit-details-marker {
  display: none;
}

.long-text-fold summary:hover {
  border-color: var(--admin-primary);
  color: var(--admin-primary);
}

.long-text-fold-body {
  padding: 9px 10px;
  border-left: 2px solid var(--admin-border);
  color: var(--admin-text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.65;
}

@media (max-width: 900px) {
  .admin-nav {
    margin-top: 18px;
  }

  .smart-search-panel {
    min-height: 0;
  }
}

/* V0.9.24 line refinement: solid feature cards, dashed field rows. */
.coach-dashboard-section,
.coach-review-column,
.dashboard-column,
.normal-readonly-filter-card,
.normal-conversion-filter-card,
.raw-record-group,
.cycle-review-selector-card,
.cycle-review-card,
.cycle-review-note-panel,
.multi-cycle-panel,
.trend-detail-panel,
.plan-current-day-card,
.plan-current-history-card,
.plan-preview-table-card,
.feedback-draft-evidence-grid section,
.coach-dashboard-card,
.coach-review-card,
.student-card,
.raw-record-card,
.normal-readonly-card,
.coach-dashboard-tool-card {
  border-style: solid;
}

.coach-dashboard-meta-grid,
.coach-dashboard-detail-grid,
.coach-review-meta-grid,
.raw-summary-grid,
.student-meta-grid,
.raw-field-grid,
.normal-readonly-field-grid,
.plan-current-summary,
.permission-current-grid,
.plan-assign-confirm-details,
.cycle-review-plan-basis-table,
.cycle-review-metric-grid,
.trend-detail-grid {
  gap: 0;
  border-top: 1px solid var(--admin-border);
}

.coach-dashboard-meta-grid div,
.coach-dashboard-detail-grid div,
.coach-review-meta-grid div,
.raw-summary-grid div,
.student-meta-grid > div,
.raw-field-grid > div,
.normal-readonly-field-grid > div,
.plan-current-summary div,
.permission-current-grid > div,
.plan-assign-confirm-details div,
.cycle-review-plan-basis-row,
.cycle-review-metric,
.trend-detail-field {
  padding: 9px 10px;
  border: 0;
  border-bottom: 1px dashed var(--admin-border);
  border-radius: 0;
  background: transparent;
}

.coach-dashboard-meta-grid div:nth-child(even),
.coach-dashboard-detail-grid div:nth-child(even),
.coach-review-meta-grid div:nth-child(even),
.raw-summary-grid div:nth-child(even),
.student-meta-grid > div:nth-child(even),
.raw-field-grid > div:nth-child(even),
.normal-readonly-field-grid > div:nth-child(even),
.permission-current-grid > div:nth-child(even),
.trend-detail-field:nth-child(even) {
  border-left: 1px dashed var(--admin-border);
}

.plan-current-summary div,
.cycle-review-metric,
.trend-detail-field {
  min-height: 0;
}

.raw-record-detail,
.coach-dashboard-detail,
.coach-dashboard-actions,
.coach-review-detail,
.raw-record-card-actions {
  border-top: 1px solid var(--admin-border);
}

.coach-dashboard-badges,
.coach-review-tags,
.tag-list,
.student-plan-view-badges {
  padding-top: 8px;
  border-top: 1px dashed var(--admin-border);
}

.metric-card,
.summary div,
.training-export-summary div,
.trend-student-summary div,
.plan-preview-summary div {
  border-style: solid;
}

@media (max-width: 900px) {
  .coach-dashboard-meta-grid div:nth-child(even),
  .coach-dashboard-detail-grid div:nth-child(even),
  .coach-review-meta-grid div:nth-child(even),
  .raw-summary-grid div:nth-child(even),
  .student-meta-grid > div:nth-child(even),
  .raw-field-grid > div:nth-child(even),
  .normal-readonly-field-grid > div:nth-child(even),
  .permission-current-grid > div:nth-child(even),
  .trend-detail-field:nth-child(even) {
    border-left: 0;
  }
}

/* V0.9.24 title alignment: align brand block with version card. */
.admin-sidebar-title {
  gap: 5px;
  margin: 0 0 14px;
  padding: 0 0 16px;
}

.admin-sidebar-title strong {
  font-size: 18px;
  line-height: 1.2;
}

.admin-sidebar-title span {
  font-size: 12px;
  line-height: 1.2;
}

/* V0.9.24 nav group title size tweak. */
.admin-nav-group-title {
  font-size: 14px;
  line-height: 1.25;
}

.admin-nav-group-title::before {
  height: 16px;
}


.user-cloud-cleanup-dialog {
  max-width: 760px;
}

.user-cloud-cleanup-warning {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--admin-danger) 42%, var(--admin-border));
  border-radius: 8px;
  background: var(--admin-danger-soft);
  color: var(--admin-danger);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.user-cloud-cleanup-preview {
  display: grid;
  gap: 12px;
}

.user-cloud-cleanup-summary-grid,
.user-cloud-cleanup-count-grid,
.user-cloud-cleanup-result {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.user-cloud-cleanup-summary-grid div,
.user-cloud-cleanup-count-grid div,
.user-cloud-cleanup-result div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-card-bg);
}

.user-cloud-cleanup-summary-grid strong,
.user-cloud-cleanup-count-grid strong,
.user-cloud-cleanup-result strong {
  overflow-wrap: anywhere;
}

.user-cloud-cleanup-actions {
  flex-wrap: wrap;
}

.user-management-fold {
  display: grid;
  margin-top: 14px;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--admin-card-bg) 88%, var(--admin-surface));
  overflow: hidden;
}

.user-management-fold-summary {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: var(--admin-text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
  list-style: none;
  user-select: none;
}

.user-management-fold-summary::-webkit-details-marker {
  display: none;
}

.user-management-fold-summary::after {
  content: '展开';
  flex: 0 0 auto;
  padding: 5px 12px;
  border: 1px solid color-mix(in srgb, var(--admin-primary) 30%, var(--admin-border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--admin-primary-soft) 52%, var(--admin-card-bg));
  color: var(--admin-primary);
  font-size: 12px;
  font-weight: 900;
}

.user-management-fold[open] .user-management-fold-summary {
  border-bottom: 1px solid var(--admin-border);
}

.user-management-fold[open] .user-management-fold-summary::after {
  content: '收起';
}

.user-management-fold-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.user-management-fold-panel > .user-danger-fold,
.user-management-fold-panel > .coach-alias-editor,
.user-management-fold-panel > .focus-student-panel,
.user-management-fold-panel > .coach-internal-note-panel,
.user-management-fold-panel > .workbench-mute-panel,
.user-management-fold-panel > .user-flags {
  margin-top: 0;
}

.user-danger-fold {
  display: grid;
  margin-top: 12px;
  border: 1px solid color-mix(in srgb, var(--admin-danger) 28%, var(--admin-border));
  border-radius: 8px;
  background: color-mix(in srgb, var(--admin-danger-soft) 42%, var(--admin-card-bg));
  overflow: hidden;
}

.user-danger-fold summary {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  color: var(--admin-danger);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  list-style: none;
  user-select: none;
}

.user-danger-fold summary::-webkit-details-marker {
  display: none;
}

.user-danger-fold[open] summary {
  border-bottom: 1px solid color-mix(in srgb, var(--admin-danger) 24%, var(--admin-border));
}

.user-danger-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: var(--admin-card-bg);
}

.user-danger-panel strong {
  color: var(--admin-danger);
  font-size: 14px;
  line-height: 1.35;
}

.user-danger-panel p {
  margin: 0;
  color: var(--admin-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.user-danger-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.user-activity-panel {
  display: grid;
  gap: 14px;
}

.user-activity-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-card-bg);
  color: var(--admin-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.user-activity-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.user-activity-filter-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-card-bg);
}

.user-activity-search-field {
  min-width: min(100%, 260px);
}

.user-activity-filter-card .status {
  align-self: center;
  min-height: 36px;
  display: flex;
  align-items: center;
}

.user-activity-table-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.user-activity-table-head h3 {
  margin: 0;
  color: var(--admin-text);
  font-size: 16px;
  line-height: 1.35;
}

.user-activity-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-card-bg);
}

.user-activity-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  font-size: 13px;
}

.user-activity-table th,
.user-activity-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--admin-border);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.user-activity-table th {
  color: var(--admin-muted);
  font-weight: 800;
  background: var(--admin-table-head-bg, color-mix(in srgb, var(--admin-card-bg) 82%, var(--admin-border)));
}

.user-activity-table tbody tr:last-child td {
  border-bottom: 0;
}

.user-activity-user-column {
  min-width: 220px;
  white-space: normal;
}

.user-activity-user-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.user-activity-user-cell strong {
  color: var(--admin-text);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.user-activity-user-cell span {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.user-activity-actions {
  display: flex;
  gap: 8px;
}

.user-activity-actions .small-button {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.2;
}

@media (max-width: 900px) {
  .admin-top-path,
  .admin-student-detail-head,
  .raw-enhanced-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-version-chip {
    width: fit-content;
    margin-left: 0;
  }

  .raw-enhanced-keyword-field {
    grid-column: auto;
  }

  .admin-student-review-item {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* V2.10 final override: keep Gemini canvas styles after legacy rules. */
:root {
  --admin-bg: #ffffff;
  --admin-bg-soft: #ffffff;
  --admin-card-bg: #ffffff;
  --admin-surface: #f4f5f7;
  --admin-border: #f1f1f4;
  --admin-border-strong: #d9dde3;
  --admin-text: #111111;
  --admin-muted: #666668;
  --admin-primary: #0d2e1f;
  --admin-primary-soft: #e8f4ee;
  --admin-primary-text: #ffffff;
  --admin-primary-hover: #164e35;
  --admin-accent: #e67e22;
  --admin-accent-soft: #fff2e5;
  --admin-success: #176c43;
  --admin-success-soft: #e8f8f5;
  --admin-danger: #b42318;
  --admin-danger-soft: #fae5e1;
  --admin-sidebar-bg: #0d2e1f;
  --admin-sidebar-text: #ffffff;
  --admin-sidebar-muted: rgba(255, 255, 255, 0.68);
  --admin-sidebar-active-bg: #e67e22;
  --admin-sidebar-active-text: #ffffff;
  --admin-table-head-bg: #f4f5f7;
  --admin-input-bg: #f4f5f7;
  --admin-secondary-button-bg: #f4f5f7;
  --admin-secondary-button-hover-bg: #e8eaee;
  --admin-secondary-button-text: #111111;
  --admin-page-gradient-start: #ffffff;
  --admin-page-gradient-end: #ffffff;
  --admin-shadow: none;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body {
  background: #ffffff;
  line-height: 1.6;
  overflow: hidden;
}

.page {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.admin-layout.admin-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 300px;
  gap: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
}

.admin-layout.admin-shell[hidden] {
  display: none;
}

.layout-sidebar.admin-sidebar {
  position: static;
  width: 240px;
  height: 100vh;
  min-height: 0;
  padding: 24px 16px;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  background: #0d2e1f;
  color: #ffffff;
}

.layout-canvas.admin-content {
  min-width: 0;
  height: 100vh;
  max-width: none;
  padding: 40px 48px;
  overflow-y: auto;
  background: #ffffff;
}

.layout-info-panel {
  display: block;
  width: 300px;
  height: 100vh;
  padding: 40px 24px;
  overflow-y: auto;
  border-left: 1px solid #f1f1f4;
  background: #fcfcfd;
}

.layout-canvas > .admin-section.panel,
.admin-content > .admin-section.panel {
  margin: 0 0 48px;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.admin-top-path {
  margin: 0 0 36px;
  padding: 0 0 16px;
  border: 0;
  border-bottom: 1px solid #f1f1f4;
  background: transparent;
  box-shadow: none;
}

.section-head {
  margin-bottom: 24px;
  padding-bottom: 0;
  border-bottom: 0;
}

.section-head h2 {
  color: #111111;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.admin-sidebar-title strong,
.admin-section h2,
.admin-section h3,
.admin-section h4,
.layout-info-panel h4,
.admin-top-path strong,
strong {
  letter-spacing: -0.02em;
}

.desc,
.section-head .desc,
p,
td,
th,
label,
.status {
  line-height: 1.6;
}

input,
select,
textarea,
.invite-code-create-form input,
.invite-code-create-form select,
.user-filter-card input,
.user-filter-card select,
.invite-code-filter-card input,
.invite-code-filter-card select,
.normal-readonly-filter-card input,
.normal-readonly-filter-card select,
.training-export-form input,
.training-export-form select,
.raw-form input,
.raw-form select,
.trend-student-form input,
.trend-student-form select,
.trend-filter-grid input,
.trend-filter-grid select,
.cycle-review-form input,
.cycle-review-form select,
.cycle-review-note-form select,
.cycle-review-note-form textarea,
.plan-assign-form input,
.plan-assign-form select,
.plan-student-form input,
.plan-student-form select,
.plan-confirm-form input,
.plan-revoke-form input,
.plan-converter-input-card textarea,
.raw-archive-reason-field textarea {
  border: 1px solid transparent;
  border-radius: 6px;
  background: #f4f5f7;
  color: #111111;
  font-family: inherit;
  box-shadow: none;
}

input,
select {
  min-height: 38px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #0d2e1f;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(13, 46, 31, 0.08);
  outline: none;
}

button {
  min-height: 38px;
  border-radius: 6px;
  border-color: transparent;
  background: #0d2e1f;
  color: #ffffff;
  font-family: inherit;
  font-weight: 650;
  box-shadow: none;
}

button:hover {
  background: #164e35;
}

button.secondary {
  border-color: transparent;
  background: #f4f5f7;
  color: #111111;
}

button.secondary:hover {
  background: #e8eaee;
}

.admin-nav-item {
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.72);
}

.admin-nav-item.active,
.admin-nav-item[aria-current="page"] {
  background: #e67e22;
  color: #ffffff;
}

.operation-log-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.operation-log-filter-grid .field {
  margin: 0;
}

.operation-log-table-wrap {
  overflow-x: auto;
}

.operation-log-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.operation-log-table th,
.operation-log-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #f1f1f4;
  text-align: left;
  vertical-align: top;
}

.operation-log-table th {
  color: #666668;
  background: #f4f5f7;
  font-size: 12px;
  font-weight: 750;
}

.operation-log-result {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e8f8f5;
  color: #176c43;
  font-size: 12px;
  font-weight: 750;
}

.operation-log-result.failed {
  background: #fae5e1;
  color: #b42318;
}

.operation-log-muted {
  color: #666668;
  font-size: 12px;
}

.info-panel-title {
  margin: 0 0 24px;
  color: #111111;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.info-card {
  margin: 0 0 28px;
  color: #666668;
  font-size: 13px;
  line-height: 1.6;
}

.info-card h4 {
  margin: 0 0 8px;
  color: #111111;
  font-size: 13px;
  font-weight: 700;
}

.info-card p {
  margin: 0;
}

@media (max-width: 1180px) {
  .admin-layout.admin-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .layout-sidebar.admin-sidebar {
    width: 220px;
  }

  .layout-info-panel {
    display: none;
  }
}

@media (max-width: 820px) {
  body {
    overflow: auto;
  }

  .admin-layout.admin-shell {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
  }

  .layout-sidebar.admin-sidebar,
  .layout-canvas.admin-content {
    width: 100%;
    height: auto;
    min-height: 0;
  }

  .layout-sidebar.admin-sidebar {
    padding: 18px 16px;
  }

  .layout-canvas.admin-content {
    padding: 28px 18px 40px;
    overflow: visible;
  }

  .admin-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .admin-nav-group-title {
    grid-column: 1 / -1;
  }

  .operation-log-filter-grid {
    grid-template-columns: 1fr;
  }
}

/* V2.10 fix1 absolute final layout override: sidebar + main canvas only. */
.admin-layout.admin-shell {
  grid-template-columns: 240px minmax(0, 1fr);
}

.layout-info-panel {
  display: none;
}

@media (max-width: 1180px) {
  .admin-layout.admin-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}
.coach-dashboard-debug-tools {
  margin: 12px 0 16px;
  padding: 10px 12px;
  border: 1px solid #d7dde8;
  border-radius: 8px;
  background: #f8fafc;
}

.coach-dashboard-debug-tools summary {
  cursor: pointer;
  font-weight: 700;
}

.inbox-bootstrap-tools {
  background: #ffffff;
}

.inbox-bootstrap-toolbar {
  margin-top: 10px;
}

.inbox-bootstrap-dryrun {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 36px;
}

.inbox-bootstrap-hint {
  max-width: 360px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.inbox-bootstrap-progress {
  margin-top: 10px;
}

.inbox-bootstrap-log {
  display: grid;
  gap: 6px;
  max-height: 220px;
  margin-top: 10px;
  overflow: auto;
  font-size: 12px;
}

.inbox-bootstrap-log-row {
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  color: #334155;
}

.inbox-bootstrap-log-row.is-error {
  border-color: #fecaca;
  background: #fff1f2;
  color: #991b1b;
}

.growth-lead-panel {
  margin-top: 24px;
}

.growth-lead-preview-list,
.coach-inbox-alert-preview {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.growth-lead-preview-row,
.coach-inbox-alert-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
}

.growth-lead-preview-row span,
.coach-inbox-alert-row span {
  min-width: 0;
  flex: 1;
}

/* V3.11.1.1 Monochrome dual-theme Coach Console UI refresh */
:root,
:root[data-admin-theme],
:root[data-admin-theme="dark"] {
  --bg: #050706;
  --panel: #0b0f0e;
  --panel-2: #111716;
  --panel-3: #171d1c;
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.2);
  --text: #f5f5f5;
  --muted: #b7c0bb;
  --subtle: #8c9792;
  --primary: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;
  --info: #3b82f6;
  --danger: #ef4444;
  --admin-bg: var(--bg);
  --admin-bg-soft: #080d0c;
  --admin-card-bg: var(--panel);
  --admin-card: var(--panel);
  --admin-surface: var(--panel-2);
  --admin-border: var(--border);
  --admin-border-strong: var(--border-strong);
  --admin-text: var(--text);
  --admin-muted: var(--muted);
  --admin-primary: var(--primary);
  --admin-primary-soft: rgba(239, 68, 68, 0.12);
  --admin-primary-text: #fff7f7;
  --admin-primary-hover: #f87171;
  --admin-accent: var(--info);
  --admin-accent-soft: rgba(59, 130, 246, 0.12);
  --admin-success: var(--success);
  --admin-success-soft: rgba(34, 197, 94, 0.12);
  --admin-warning: var(--warning);
  --admin-warning-soft: rgba(245, 158, 11, 0.13);
  --admin-danger: var(--danger);
  --admin-danger-soft: rgba(239, 68, 68, 0.14);
  --admin-purple: #8b5cf6;
  --admin-purple-soft: rgba(139, 92, 246, 0.12);
  --admin-sidebar-bg: #070a09;
  --admin-sidebar-text: var(--text);
  --admin-sidebar-muted: rgba(245, 245, 245, 0.72);
  --admin-sidebar-active-bg: rgba(239, 68, 68, 0.18);
  --admin-sidebar-active-text: #fff7f7;
  --admin-table-head-bg: var(--panel-3);
  --admin-input-bg: #0d1312;
  --admin-secondary-button-bg: #141a19;
  --admin-secondary-button-hover-bg: #1a2221;
  --admin-secondary-button-text: #edf2ef;
  --admin-danger-text: #ffd7d7;
  --admin-modal-backdrop: rgba(0, 0, 0, 0.72);
  --admin-page-gradient-start: var(--bg);
  --admin-page-gradient-end: var(--bg);
  --admin-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  --shell-divider: rgba(255, 255, 255, 0.04);
  --sidebar-action-border: rgba(255, 255, 255, 0.14);
  --sidebar-action-bg: rgba(255, 255, 255, 0.06);
  --sidebar-action-hover-border: rgba(255, 255, 255, 0.24);
  --sidebar-theme-bg: rgba(255, 255, 255, 0.07);
  --sidebar-theme-border: rgba(255, 255, 255, 0.14);
  --sidebar-theme-select-bg: #101615;
  --nav-group-text: rgba(245, 245, 245, 0.58);
  --nav-item-text: rgba(245, 245, 245, 0.8);
  --nav-item-quiet-text: rgba(245, 245, 245, 0.62);
  --nav-hover-border: rgba(255, 255, 255, 0.12);
  --nav-hover-bg: rgba(255, 255, 255, 0.07);
  --nav-active-border: rgba(255, 255, 255, 0.18);
  --nav-active-bg: linear-gradient(90deg, rgba(239, 68, 68, 0.18), rgba(59, 130, 246, 0.1));
  --nav-active-shadow: inset 3px 0 0 var(--primary), 0 12px 26px rgba(0, 0, 0, 0.18);
  --build-details-bg: rgba(255, 255, 255, 0.05);
  --build-details-border: rgba(255, 255, 255, 0.12);
  --build-details-text: rgba(245, 245, 245, 0.64);
  --build-details-summary: rgba(245, 245, 245, 0.82);
  --topbar-bg: rgba(5, 7, 6, 0.92);
  --input-border: rgba(255, 255, 255, 0.16);
  --input-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --placeholder-text: rgba(183, 192, 187, 0.68);
  --button-primary-border: rgba(239, 68, 68, 0.56);
  --button-primary-hover-border: rgba(248, 113, 113, 0.72);
  --button-primary-shadow: 0 10px 24px rgba(239, 68, 68, 0.16);
  --button-secondary-border: rgba(255, 255, 255, 0.17);
  --button-secondary-hover-border: rgba(59, 130, 246, 0.34);
  --button-disabled-border: rgba(255, 255, 255, 0.12);
  --button-disabled-bg: #101615;
  --button-disabled-text: rgba(183, 192, 187, 0.58);
  --empty-border: rgba(255, 255, 255, 0.16);
  --empty-bg: #0f1413;
  --card-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  --table-wrap-bg: #0a0f0e;
  --table-cell-border: rgba(255, 255, 255, 0.11);
  --table-head-text: rgba(245, 245, 245, 0.78);
  --row-hover-bg: rgba(59, 130, 246, 0.06);
  --code-bg: #0a0f0e;
  --code-text: #e6eeea;
  --debug-bg: rgba(255, 255, 255, 0.05);
  --debug-text: rgba(245, 245, 245, 0.7);
  --badge-info-border: rgba(59, 130, 246, 0.32);
  --badge-info-bg: rgba(59, 130, 246, 0.13);
  --badge-info-text: #bfdbfe;
  --badge-danger-border: rgba(239, 68, 68, 0.36);
  --badge-danger-bg: rgba(239, 68, 68, 0.13);
  --badge-danger-text: #fecaca;
  --badge-warning-border: rgba(245, 158, 11, 0.38);
  --badge-warning-bg: rgba(245, 158, 11, 0.13);
  --badge-warning-text: #fcd34d;
  --badge-success-border: rgba(34, 197, 94, 0.34);
  --badge-success-bg: rgba(34, 197, 94, 0.13);
  --badge-success-text: #bbf7d0;
  --rest-card-bg: #0f1413;
  --rest-card-border: rgba(255, 255, 255, 0.15);
  --rest-card-text: var(--text);
  --rest-card-muted: var(--muted);
  --rest-chip-bg: rgba(148, 163, 184, 0.14);
  --rest-chip-border: rgba(148, 163, 184, 0.28);
  --rest-chip-text: #d4dadd;
  color-scheme: dark;
}

:root[data-admin-theme="light"] {
  --bg: #f8faf9;
  --panel: #ffffff;
  --panel-2: #f2f5f3;
  --border: rgba(17, 24, 39, 0.12);
  --text: #111827;
  --muted: #5f6b66;
  --primary: #dc2626;
  --success: #15803d;
  --warning: #b45309;
  --info: #2563eb;
  --danger: #dc2626;
  --admin-bg: var(--bg);
  --admin-bg-soft: #f3f6f5;
  --admin-card-bg: var(--panel);
  --admin-card: var(--panel);
  --admin-surface: var(--panel-2);
  --admin-border: var(--border);
  --admin-border-strong: rgba(17, 24, 39, 0.18);
  --admin-text: var(--text);
  --admin-muted: var(--muted);
  --admin-primary: var(--primary);
  --admin-primary-soft: rgba(220, 38, 38, 0.1);
  --admin-primary-text: #fff7f7;
  --admin-primary-hover: #b91c1c;
  --admin-accent: var(--info);
  --admin-accent-soft: rgba(37, 99, 235, 0.1);
  --admin-success: var(--success);
  --admin-success-soft: rgba(21, 128, 61, 0.1);
  --admin-warning: var(--warning);
  --admin-warning-soft: rgba(180, 83, 9, 0.12);
  --admin-danger: var(--danger);
  --admin-danger-soft: rgba(220, 38, 38, 0.1);
  --admin-purple: #6d28d9;
  --admin-purple-soft: rgba(109, 40, 217, 0.1);
  --admin-sidebar-bg: #ffffff;
  --admin-sidebar-text: var(--text);
  --admin-sidebar-muted: #64706b;
  --admin-sidebar-active-bg: rgba(220, 38, 38, 0.08);
  --admin-sidebar-active-text: #111827;
  --admin-table-head-bg: #eef2f1;
  --admin-input-bg: #ffffff;
  --admin-secondary-button-bg: #ffffff;
  --admin-secondary-button-hover-bg: #eef2f1;
  --admin-secondary-button-text: #111827;
  --admin-danger-text: #b91c1c;
  --admin-modal-backdrop: rgba(17, 24, 39, 0.48);
  --admin-page-gradient-start: var(--bg);
  --admin-page-gradient-end: var(--bg);
  --admin-shadow: 0 18px 42px rgba(17, 24, 39, 0.08);
  --shell-divider: rgba(17, 24, 39, 0.08);
  --sidebar-action-border: rgba(17, 24, 39, 0.12);
  --sidebar-action-bg: #f7faf9;
  --sidebar-action-hover-border: rgba(37, 99, 235, 0.28);
  --sidebar-theme-bg: #f7faf9;
  --sidebar-theme-border: rgba(17, 24, 39, 0.12);
  --sidebar-theme-select-bg: #ffffff;
  --nav-group-text: #7a8580;
  --nav-item-text: #3f4a45;
  --nav-item-quiet-text: #72807a;
  --nav-hover-border: rgba(17, 24, 39, 0.1);
  --nav-hover-bg: rgba(37, 99, 235, 0.05);
  --nav-active-border: rgba(220, 38, 38, 0.2);
  --nav-active-bg: linear-gradient(90deg, rgba(220, 38, 38, 0.09), rgba(37, 99, 235, 0.06));
  --nav-active-shadow: inset 3px 0 0 var(--primary), 0 12px 24px rgba(17, 24, 39, 0.08);
  --build-details-bg: #f7faf9;
  --build-details-border: rgba(17, 24, 39, 0.1);
  --build-details-text: #6b766f;
  --build-details-summary: #35413b;
  --topbar-bg: rgba(255, 255, 255, 0.92);
  --input-border: rgba(17, 24, 39, 0.16);
  --input-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  --placeholder-text: #89938e;
  --button-primary-border: rgba(220, 38, 38, 0.56);
  --button-primary-hover-border: rgba(185, 28, 28, 0.72);
  --button-primary-shadow: 0 10px 24px rgba(220, 38, 38, 0.12);
  --button-secondary-border: rgba(17, 24, 39, 0.14);
  --button-secondary-hover-border: rgba(37, 99, 235, 0.32);
  --button-disabled-border: rgba(17, 24, 39, 0.08);
  --button-disabled-bg: #f3f4f6;
  --button-disabled-text: #9ca3af;
  --empty-border: rgba(17, 24, 39, 0.16);
  --empty-bg: #f8fafc;
  --card-shadow: 0 14px 34px rgba(17, 24, 39, 0.08);
  --table-wrap-bg: #ffffff;
  --table-cell-border: rgba(17, 24, 39, 0.08);
  --table-head-text: #4b5563;
  --row-hover-bg: rgba(37, 99, 235, 0.05);
  --code-bg: #f8fafc;
  --code-text: #1f2937;
  --debug-bg: #f8fafc;
  --debug-text: #6b7280;
  --badge-info-border: rgba(37, 99, 235, 0.24);
  --badge-info-bg: rgba(37, 99, 235, 0.08);
  --badge-info-text: #1d4ed8;
  --badge-danger-border: rgba(220, 38, 38, 0.28);
  --badge-danger-bg: rgba(220, 38, 38, 0.08);
  --badge-danger-text: #b91c1c;
  --badge-warning-border: rgba(180, 83, 9, 0.28);
  --badge-warning-bg: rgba(180, 83, 9, 0.09);
  --badge-warning-text: #92400e;
  --badge-success-border: rgba(21, 128, 61, 0.26);
  --badge-success-bg: rgba(21, 128, 61, 0.08);
  --badge-success-text: #166534;
  --rest-card-bg: #f3f6f5;
  --rest-card-border: rgba(17, 24, 39, 0.14);
  --rest-card-text: var(--text);
  --rest-card-muted: #5f6b66;
  --rest-chip-bg: #eef2f1;
  --rest-chip-border: rgba(17, 24, 39, 0.12);
  --rest-chip-text: #475569;
  color-scheme: light;
}

* {
  box-sizing: border-box;
  letter-spacing: 0 !important;
}

html,
body {
  background: var(--bg);
  color: var(--text);
}

body {
  min-width: 320px;
  -webkit-font-smoothing: antialiased;
}

.page,
.admin-layout.admin-shell {
  background: var(--bg);
}

.admin-layout.admin-shell {
  grid-template-columns: 240px minmax(0, 1fr);
}

.layout-sidebar.admin-sidebar,
.admin-sidebar {
  display: flex;
  flex-direction: column;
  width: 240px;
  padding: 18px 14px;
  border-right: 1px solid var(--border);
  background: var(--admin-sidebar-bg);
  box-shadow: inset -1px 0 0 var(--shell-divider);
}

.admin-sidebar-title {
  position: relative;
  margin: 0 0 14px;
  padding: 8px 8px 16px;
  border-bottom: 1px solid var(--border);
}

.admin-sidebar-title strong {
  display: block;
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
}

.admin-sidebar-title span {
  display: inline-flex;
  margin-top: 5px;
  color: var(--admin-sidebar-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.admin-sidebar-title::after {
  content: "Admin Online";
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 4px 9px;
  border: 1px solid var(--badge-success-border);
  border-radius: 999px;
  background: var(--badge-success-bg);
  color: var(--badge-success-text);
  font-size: 11px;
  font-weight: 700;
}

.admin-sidebar-actions {
  order: 3;
  margin: 12px 6px 0;
}

.admin-sidebar-actions button {
  width: 100%;
  min-height: 34px;
  border-color: var(--sidebar-action-border);
  background: var(--sidebar-action-bg);
  color: var(--admin-sidebar-muted);
}

.admin-sidebar-actions button:hover {
  border-color: var(--sidebar-action-hover-border);
  color: var(--text);
}

.admin-sidebar .admin-theme-switch {
  display: grid;
  gap: 7px;
  margin: 0 6px 12px;
  padding: 10px;
  border: 1px solid var(--sidebar-theme-border);
  border-radius: 8px;
  background: var(--sidebar-theme-bg);
}

.admin-sidebar .admin-theme-switch span {
  color: var(--admin-sidebar-muted);
  font-size: 11px;
  font-weight: 800;
}

.admin-sidebar .admin-theme-switch select {
  width: 100%;
  max-width: none;
  min-height: 34px;
  border-color: var(--input-border);
  background: var(--sidebar-theme-select-bg);
  color: var(--text);
  font-weight: 800;
}

.admin-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
  padding: 0 4px 8px;
}

.admin-nav-group-title {
  margin: 14px 4px 5px;
  padding: 0;
  color: var(--nav-group-text);
  font-size: 11px;
  font-weight: 800;
}

.admin-nav-group-title:first-child {
  margin-top: 0;
}

.admin-nav-group-title::before {
  display: none;
}

.admin-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 34px;
  margin: 0;
  padding: 8px 10px 8px 24px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--nav-item-text);
  font-size: 13px;
  font-weight: 650;
  box-shadow: none;
  text-align: left;
}

.admin-nav-item::before {
  content: "";
  position: absolute;
  left: 10px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.75);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.25);
}

.admin-nav-item--quiet {
  color: var(--nav-item-quiet-text);
}

.admin-nav-item--quiet::before {
  background: rgba(140, 151, 146, 0.6);
  box-shadow: none;
}

.admin-nav-item:hover {
  border-color: var(--nav-hover-border);
  background: var(--nav-hover-bg);
  color: var(--text);
  transform: none;
}

.admin-nav-item.is-active,
.admin-nav-item.active,
.admin-nav-item[aria-current="page"] {
  border-color: var(--nav-active-border);
  background: var(--nav-active-bg);
  color: var(--admin-sidebar-active-text);
  box-shadow: var(--nav-active-shadow);
}

.admin-nav-item.is-active::before,
.admin-nav-item.active::before,
.admin-nav-item[aria-current="page"]::before {
  background: var(--primary);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
}

.admin-build-details {
  order: 2;
  margin: 12px 6px 0;
  padding: 8px 10px;
  border: 1px solid var(--build-details-border);
  border-radius: 8px;
  background: var(--build-details-bg);
  color: var(--build-details-text);
  font-size: 11px;
  line-height: 1.55;
}

.admin-build-details summary {
  cursor: pointer;
  color: var(--build-details-summary);
  font-weight: 750;
}

.layout-canvas.admin-content,
.admin-content {
  height: 100vh;
  padding: 24px 34px 44px;
  overflow-y: auto;
  background: var(--bg);
}

.admin-top-path {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin: -24px -34px 22px;
  padding: 14px 34px;
  border-bottom: 1px solid var(--border);
  background: var(--topbar-bg);
  backdrop-filter: blur(14px);
}

.admin-top-path .label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-top-path strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 850;
}

.admin-version-chip {
  margin-left: auto;
  padding: 5px 10px;
  border: 1px solid var(--badge-info-border);
  border-radius: 999px;
  background: var(--badge-info-bg);
  color: var(--badge-info-text);
  font-size: 12px;
  font-weight: 800;
}

.admin-section.panel,
.layout-canvas > .admin-section.panel,
.admin-content > .admin-section.panel {
  max-width: 1480px;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.section-head {
  align-items: flex-start;
  gap: 16px;
  margin: 0 0 18px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--border);
}

.section-head h2,
.admin-section h2 {
  margin: 0;
  color: var(--text);
  font-size: 26px;
  font-weight: 860;
  line-height: 1.15;
}

.section-head h3,
.admin-section h3,
.admin-section h4 {
  color: var(--text);
}

.section-head .desc,
.desc,
.hint,
.empty,
.operation-log-muted {
  color: var(--muted);
}

.section-head .desc {
  max-width: 680px;
  margin-top: 7px;
  font-size: 13px;
}

.system-settings-theme-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.status,
.dashboard-status,
.smart-search-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--badge-info-border);
  border-radius: 999px;
  background: var(--badge-info-bg);
  color: var(--badge-info-text);
  font-size: 12px;
  font-weight: 700;
}

.status[data-status-type="success"],
.plan-revoke-actions .status[data-status-type="success"],
.plan-adjustment-status.is-success {
  border-color: var(--badge-success-border);
  background: var(--badge-success-bg);
  color: var(--badge-success-text);
}

.status[data-status-type="error"],
.plan-revoke-actions .status[data-status-type="error"],
.plan-adjustment-status.is-error {
  border-color: var(--badge-danger-border);
  background: var(--badge-danger-bg);
  color: var(--badge-danger-text);
}

input,
select,
textarea,
.invite-code-create-form input,
.user-filter-card input,
.user-filter-card select,
.invite-code-filter-card input,
.invite-code-filter-card select,
.normal-readonly-filter-card input,
.normal-readonly-filter-card select,
.training-export-form input,
.raw-form input,
.trend-student-form input,
.trend-filter-grid input,
.cycle-review-form input,
.plan-assign-form input,
.plan-assign-form select,
.plan-student-form input,
.plan-student-form select,
.plan-confirm-form input,
.plan-revoke-form input,
.plan-converter-input-card textarea,
.plan-insert-position-field select,
.plan-adjustment-type-field select,
.plan-adjustment-title-field input,
.plan-adjustment-text-field textarea,
.ai-draft-settings-grid input,
.offline-course-form-grid input {
  border: 1px solid var(--input-border);
  background: var(--admin-input-bg);
  color: var(--text);
  box-shadow: var(--input-shadow);
}

input::placeholder,
textarea::placeholder {
  color: var(--placeholder-text);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
  outline: none;
}

.field span,
.label {
  color: var(--muted);
  font-weight: 750;
}

button {
  min-height: 36px;
  border: 1px solid var(--button-primary-border);
  border-radius: 8px;
  background: var(--primary);
  color: var(--admin-primary-text);
  box-shadow: var(--button-primary-shadow);
}

button:hover {
  border-color: var(--button-primary-hover-border);
  background: var(--admin-primary-hover);
  transform: translateY(-1px);
}

button.secondary {
  border-color: var(--button-secondary-border);
  background: var(--admin-secondary-button-bg);
  color: var(--admin-secondary-button-text);
  box-shadow: none;
}

button.secondary:hover {
  border-color: var(--button-secondary-hover-border);
  background: var(--admin-secondary-button-hover-bg);
  color: var(--text);
}

button.danger {
  border-color: var(--badge-danger-border);
  background: var(--badge-danger-bg);
  color: var(--badge-danger-text);
  box-shadow: none;
}

button.danger:hover {
  border-color: var(--danger);
  background: var(--admin-danger-soft);
}

button:disabled {
  border-color: var(--button-disabled-border);
  background: var(--button-disabled-bg);
  color: var(--button-disabled-text);
  box-shadow: none;
  transform: none;
}

.metric-card,
.status-panel,
.info-card,
.system-settings-card,
.offline-course-list-card,
.offline-course-admin-card,
.invite-code-create-card,
.user-filter-card,
.invite-code-filter-card,
.user-category-stats-card,
.user-card,
.invite-code-card,
.operation-log-card,
.coach-dashboard-section,
.coach-dashboard-card,
.coach-dashboard-tool-card,
.coach-review-card,
.student-card,
.raw-record-card,
.normal-readonly-card,
.normal-readonly-filter-card,
.normal-readonly-summary-card,
.normal-readonly-user-list-card,
.normal-readonly-detail-card,
.normal-conversion-panel,
.leaderboard-filter-card,
.leaderboard-table-wrap,
.user-activity-filter-card,
.user-activity-table-wrap,
.trend-card,
.cycle-review-card,
.cycle-report-section,
.cycle-report-saved-card,
.plan-assign-card,
.plan-current-card,
.plan-converter-card,
.plan-converter-input-card,
.plan-converter-output-card,
.plan-message-card,
.plan-preview-card,
.plan-preview-table-card,
.plan-backend-card,
.plan-current-summary div,
.plan-current-day-card,
.plan-current-history-card,
.student-plan-history-card,
.normal-manual-plan-summary div,
.normal-manual-plan-day,
.normal-manual-plan-exercise,
.normal-manual-plan-raw,
.plan-insert-preview,
.plan-adjustment-preview-day,
.plan-assign-confirm-details div,
.coach-dashboard-debug-tools {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--card-shadow);
}

.metric-card,
.plan-current-summary div,
.plan-preview-summary div,
.normal-conversion-summary-grid div,
.trend-summary-grid .metric-card {
  background: var(--panel-2);
}

.metric-card strong,
.plan-current-summary strong,
.plan-preview-summary strong,
.plan-backend-meta strong,
.normal-manual-plan-summary strong,
.plan-assign-confirm-details strong,
.normal-conversion-summary-grid strong,
.trend-summary-grid strong {
  color: var(--text);
}

.metric-card small,
.plan-backend-meta span,
.normal-manual-plan-summary span,
.coach-dashboard-card-head p,
.coach-dashboard-section-head p,
.normal-readonly-card-head p,
.operation-log-card-head p,
.plan-current-day-card p,
.plan-current-history-card p,
.normal-manual-plan-day p,
.normal-manual-plan-exercise p,
.student-plan-history-card p {
  color: var(--muted);
}

.plan-day-backfill-reason,
.plan-insert-position-preview,
.plan-adjustment-status,
.plan-adjustment-preview-day ul,
.normal-manual-plan-set-row,
.cycle-report-html-preview-meta {
  color: var(--muted);
}

.normal-manual-plan-set-row {
  border: 1px solid var(--border);
  background: var(--panel-2);
}

.plan-insert-preview summary,
.normal-manual-plan-day h4,
.normal-manual-plan-exercise h5,
.plan-adjustment-preview-day h5 {
  color: var(--text);
}

.plan-insert-position-field select,
.plan-adjustment-type-field select,
.plan-adjustment-title-field input,
.plan-adjustment-text-field textarea {
  background: var(--admin-input-bg);
  color: var(--text);
}

.empty {
  margin: 0;
  padding: 14px;
  border: 1px dashed var(--empty-border);
  border-radius: 8px;
  background: var(--empty-bg);
}

.admin-status-pill,
.coach-dashboard-badge,
.coach-review-traffic-badge,
.coach-review-state-badge,
.raw-record-light-badge,
.raw-review-badge,
.normal-readonly-badge,
.raw-archive-badge,
.student-plan-view-badge,
.focus-student-badge,
.coach-followup-badge,
.workbench-muted-badge,
.traffic-debug-badge,
.cycle-report-visibility-badge,
.invite-code-status-pill {
  border: 1px solid var(--badge-info-border);
  border-radius: 999px;
  background: var(--badge-info-bg);
  color: var(--badge-info-text);
}

.coach-review-traffic-badge.red,
.raw-record-card.is-traffic-red .raw-record-light-badge,
.coach-dashboard-badge.red,
.coach-dashboard-badge.pain,
.metric-card.danger {
  border-color: var(--badge-danger-border);
  background: var(--badge-danger-bg);
  color: var(--badge-danger-text);
}

.coach-review-traffic-badge.yellow,
.raw-record-card.is-traffic-yellow .raw-record-light-badge,
.coach-dashboard-badge.yellow,
.coach-dashboard-badge.no-training,
.coach-dashboard-badge.review-pending,
.coach-dashboard-badge.data-quality,
.metric-card.warning {
  border-color: var(--badge-warning-border);
  background: var(--badge-warning-bg);
  color: var(--badge-warning-text);
}

.coach-review-traffic-badge.green,
.raw-record-card.is-traffic-green .raw-record-light-badge,
.coach-review-state-badge.reviewed,
.coach-dashboard-badge.reviewed,
.coach-dashboard-badge.normal-lead,
.admin-status-pill.is-vip,
.admin-status-pill.is-student {
  border-color: var(--badge-success-border);
  background: var(--badge-success-bg);
  color: var(--badge-success-text);
}

.plan-preview-table-wrap,
.normal-readonly-table-wrap,
.leaderboard-table-wrap,
.multi-cycle-table-wrap,
.operation-log-table-wrap,
.user-activity-table-wrap,
.plan-converter-output,
.plan-backend-preview {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--table-wrap-bg);
}

table,
.plan-preview-table,
.normal-readonly-table,
.leaderboard-table,
.multi-cycle-table,
.operation-log-table,
.user-activity-table {
  color: var(--text);
}

th,
td,
.plan-preview-table th,
.plan-preview-table td,
.normal-readonly-table th,
.normal-readonly-table td,
.leaderboard-table th,
.leaderboard-table td,
.multi-cycle-table th,
.multi-cycle-table td,
.operation-log-table th,
.operation-log-table td,
.user-activity-table th,
.user-activity-table td {
  border-bottom-color: var(--table-cell-border);
}

th,
.plan-preview-table th,
.normal-readonly-table th,
.leaderboard-table th,
.multi-cycle-table th,
.operation-log-table th,
.user-activity-table th {
  background: var(--admin-table-head-bg);
  color: var(--table-head-text);
}

tbody tr:hover,
.normal-readonly-table tbody tr:hover,
.leaderboard-table tbody tr:hover,
.user-activity-table tbody tr:hover {
  background: var(--row-hover-bg);
}

#adminSectionPlanManager {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

#adminSectionPlanManager[hidden] {
  display: none;
}

#adminSectionPlanManager > .section-head {
  order: 0;
}

#planCycleUpdateContext {
  order: 1;
}

#adminSectionPlanManager > .plan-student-card {
  order: 2;
}

#adminSectionPlanManager > .plan-current-card {
  order: 3;
}

#adminSectionPlanManager > .plan-converter-card {
  order: 4;
}

#adminSectionPlanManager > .plan-confirm-card {
  order: 5;
}

#adminSectionPlanManager > .plan-message-grid {
  order: 6;
}

#adminSectionPlanManager > .plan-list-card {
  order: 7;
}

.plan-assign-card,
.plan-current-card,
.plan-converter-card,
.plan-preview-card,
.plan-message-card {
  padding: 18px;
}

.plan-assign-head,
.plan-current-head,
.normal-conversion-head,
.multi-cycle-head,
.cycle-report-html-preview-head {
  gap: 14px;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.plan-assign-head .desc,
.plan-current-head .desc {
  max-width: 640px;
  color: var(--muted);
  font-size: 12px;
}

.plan-student-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) auto minmax(240px, 1.1fr);
  gap: 12px;
  align-items: end;
}

.plan-student-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.plan-student-summary[hidden] {
  display: none;
}

.plan-student-summary div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--badge-info-border);
  border-radius: 8px;
  background: var(--badge-info-bg);
}

.plan-student-summary strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-current-head-actions,
.plan-current-actions,
.plan-assign-actions,
.plan-revoke-actions,
.plan-converter-actions,
.plan-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.plan-confirm-actions button {
  flex: 1 1 180px;
}

.plan-current-head-actions .danger,
.plan-revoke-form .danger,
.plan-confirm-actions .danger {
  border-style: solid;
}

.plan-revoke-form {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--badge-danger-border);
  border-radius: 8px;
  background: var(--badge-danger-bg);
}

.plan-current-result {
  margin-top: 12px;
}

.plan-current-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
}

.plan-current-summary div {
  min-height: 76px;
  padding: 12px;
}

.plan-current-summary .label,
.plan-preview-summary .label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
}

.student-plan-view-day-card,
.plan-current-history-card,
.student-plan-history-card,
.plan-backend-card {
  box-shadow: none;
}

.student-plan-view-day-card.is-completed {
  border-color: var(--badge-success-border);
  background: var(--badge-success-bg);
}

.student-plan-view-day-card.is-completed:not(.is-dragging) {
  opacity: 1;
}

.student-plan-view-day-card.is-future-day {
  border-color: var(--badge-info-border);
  background: var(--badge-info-bg);
}

.student-plan-view-day-card.is-incomplete-day {
  border-color: var(--badge-warning-border);
  background: var(--badge-warning-bg);
}

.student-plan-view-day-card.is-unknown-day,
.student-plan-view-day-card.is-muted-day:not(.rest-day) {
  border-color: var(--border);
  background: var(--panel-2);
}

.student-plan-view-day-card.is-completed:not(.rest-day) {
  border-color: var(--badge-success-border);
  background: var(--badge-success-bg);
}

.student-plan-view-day-card.rest-day,
.student-plan-view-day-card.rest-day.is-completed,
.student-plan-view-day-card.rest-day.is-future-day,
.student-plan-view-day-card.rest-day.is-incomplete-day,
.student-plan-view-day-card.rest-day.is-muted-day,
.plan-backend-card.rest-day,
.normal-manual-plan-day.is-rest-day {
  border-color: var(--rest-card-border);
  background: var(--rest-card-bg);
  color: var(--rest-card-text);
  opacity: 1;
}

.student-plan-view-day-card.rest-day {
  border-style: solid;
}

.student-plan-view-day-card.rest-day p,
.student-plan-view-day-card.rest-day .empty,
.plan-backend-card.rest-day .plan-backend-meta span,
.normal-manual-plan-day.is-rest-day p {
  color: var(--rest-card-muted);
}

.student-plan-view-day-card.rest-day .empty {
  border-color: var(--rest-chip-border);
  background: var(--rest-chip-bg);
}

.student-plan-view-badge.rest,
.student-plan-view-badge.muted {
  border-color: var(--rest-chip-border);
  background: var(--rest-chip-bg);
  color: var(--rest-chip-text);
}

.student-plan-view-badge.done {
  border-color: var(--badge-success-border);
  background: var(--badge-success-bg);
  color: var(--badge-success-text);
}

.student-plan-view-badge.pending {
  border-color: var(--badge-warning-border);
  background: var(--badge-warning-bg);
  color: var(--badge-warning-text);
}

.student-plan-view-badge.future {
  border-color: var(--badge-info-border);
  background: var(--badge-info-bg);
  color: var(--badge-info-text);
}

.student-plan-view-badge.adjustment,
.student-plan-view-badge.adjustment-soft,
.student-plan-view-day-card.is-adjustment-day {
  border-color: rgba(139, 92, 246, 0.34);
  background: var(--admin-purple-soft);
  color: #ddd6fe;
}

:root[data-admin-theme="light"] .student-plan-view-badge.adjustment,
:root[data-admin-theme="light"] .student-plan-view-badge.adjustment-soft,
:root[data-admin-theme="light"] .student-plan-view-day-card.is-adjustment-day {
  color: #6d28d9;
}

.plan-current-warning {
  border-color: var(--badge-warning-border);
  background: var(--badge-warning-bg);
  color: var(--badge-warning-text);
}

.plan-converter-grid {
  grid-template-columns: minmax(360px, 1fr) minmax(320px, 0.82fr);
  gap: 14px;
}

.plan-converter-input-card,
.plan-converter-output-card,
.plan-preview-table-card {
  box-shadow: none;
}

.plan-converter-input-card textarea {
  min-height: 300px;
  resize: vertical;
}

.plan-preview-summary {
  grid-template-columns: repeat(5, minmax(130px, 1fr));
}

.plan-preview-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.plan-message-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.plan-message-card h3 {
  text-transform: uppercase;
}

.plan-message-card:first-child h3 {
  color: var(--badge-warning-text);
}

.plan-message-card:nth-child(2) h3 {
  color: var(--badge-danger-text);
}

.plan-collapsible-head,
.plan-converter-output-head {
  border-bottom-color: var(--border);
  background: transparent;
}

.plan-revoke-modal-backdrop {
  background: var(--admin-modal-backdrop);
}

.plan-revoke-dialog,
.admin-inline-confirm-dialog {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
}

.coach-dashboard-debug-tools {
  border-style: dashed;
  background: var(--debug-bg);
  box-shadow: none;
}

.coach-dashboard-debug-tools summary {
  color: var(--debug-text);
}

.login-view {
  min-height: 100vh;
  background: var(--bg);
}

.login-panel,
#loginStatusPanel {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
}

.login-copy h1 {
  color: var(--text);
}

.result,
pre,
code {
  border-color: var(--border);
  background: var(--code-bg);
  color: var(--code-text);
}

.v2-test-workbench-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.v2-test-lane {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
}

.v2-test-lane-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.v2-test-lane-head h3,
.v2-test-block h4,
.v2-test-fact-card h4 {
  margin: 0 0 6px;
}

.v2-test-source-pill {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--muted);
  background: var(--code-bg);
}

.v2-test-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}

.v2-cycle-import-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.v2-test-fact-card,
.v2-test-block,
.v2-test-json-box {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-soft);
  padding: 12px;
}

.v2-test-fact-card,
.v2-test-diagnostic {
  margin-bottom: 14px;
}

.v2-test-detail-grid {
  display: grid;
  gap: 12px;
}

.v2-test-summary {
  margin: 12px 0;
}

.v2-test-kv-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.v2-test-kv-list div {
  display: grid;
  grid-template-columns: minmax(120px, 0.42fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.v2-test-kv-list dt {
  color: var(--muted);
  font-size: 12px;
}

.v2-test-kv-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.v2-test-diagnostic-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
}

.v2-test-json-box {
  margin-top: 12px;
}

.v2-test-json-box pre {
  max-height: 320px;
  overflow: auto;
}

.v2-route-plan-panel,
.v2-baseline-freeze-panel,
.v2-workbench-user-panel,
.v2-switchboard-panel,
.v2-route-config-panel,
.v2-mini-compat-panel,
.v2-mini-compat-write-panel,
.v2-pre-mini-audit-panel,
.v2-whitelist-e2e-audit-panel,
.v2-whitelist-plan-bridge-panel,
.v2-read-exit-panel,
.v2-readiness-audit-panel,
.v2-training-save-panel,
.v2-feedback-panel,
.v2-admin-plan-panel,
.v2-my-plan-panel,
.v2-user-lane-panel {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
}

.v2-route-plan-head,
.v2-baseline-freeze-head,
.v2-workbench-user-head,
.v2-switchboard-head,
.v2-route-config-head,
.v2-mini-compat-head,
.v2-mini-compat-write-head,
.v2-pre-mini-audit-head,
.v2-whitelist-e2e-audit-head,
.v2-whitelist-plan-bridge-head,
.v2-read-exit-head,
.v2-readiness-audit-head,
.v2-training-save-head,
.v2-feedback-head,
.v2-admin-plan-head,
.v2-my-plan-head,
.v2-user-lane-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.v2-route-plan-head h3,
.v2-baseline-freeze-head h3,
.v2-workbench-user-head h3,
.v2-switchboard-head h3,
.v2-route-config-head h3,
.v2-mini-compat-head h3,
.v2-mini-compat-write-head h3,
.v2-pre-mini-audit-head h3,
.v2-whitelist-e2e-audit-head h3,
.v2-whitelist-plan-bridge-head h3,
.v2-read-exit-head h3,
.v2-readiness-audit-head h3,
.v2-training-save-head h3,
.v2-feedback-head h3,
.v2-admin-plan-head h3,
.v2-my-plan-head h3,
.v2-user-lane-head h3 {
  margin: 0 0 6px;
}

.v2-route-plan-grid,
.v2-baseline-freeze-grid,
.v2-workbench-user-grid,
.v2-switchboard-grid,
.v2-route-config-grid,
.v2-mini-compat-grid,
.v2-mini-compat-results,
.v2-mini-compat-write-grid,
.v2-mini-compat-write-results,
.v2-pre-mini-audit-grid,
.v2-whitelist-e2e-audit-grid,
.v2-whitelist-plan-bridge-grid,
.v2-read-exit-grid,
.v2-read-exit-results,
.v2-readiness-audit-grid,
.v2-training-save-grid,
.v2-feedback-grid,
.v2-admin-plan-grid,
.v2-my-plan-grid,
.v2-user-lane-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.v2-switchboard-table-wrap {
  overflow-x: auto;
}

.v2-workbench-user-panel {
  border-color: color-mix(in srgb, var(--admin-primary) 22%, var(--admin-success) 16%, var(--border));
}

.v2-baseline-freeze-notice-panel {
  margin-top: 18px;
  border: 1px solid color-mix(in srgb, var(--admin-primary) 28%, var(--admin-success) 20%, var(--border));
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 86%, var(--admin-primary) 8%);
  padding: 14px 16px;
}

.v2-baseline-freeze-notice-panel strong {
  display: block;
  margin-bottom: 6px;
}

.v2-baseline-freeze-notice-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.v2-workbench-user-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.v2-workbench-user-results {
  display: grid;
  gap: 8px;
}

.v2-workbench-user-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px;
}

.v2-workbench-user-result strong,
.v2-workbench-user-result small {
  display: block;
}

.v2-workbench-user-result small {
  color: var(--muted);
  margin-top: 3px;
}

.v2-baseline-freeze-panel {
  border-color: color-mix(in srgb, var(--admin-primary) 28%, var(--admin-success) 20%, var(--border));
}

.v2-switchboard-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 13px;
}

.v2-switchboard-table th,
.v2-switchboard-table td {
  border-bottom: 1px solid var(--border);
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

.v2-switchboard-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.v2-switchboard-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.45;
}

.v2-switchboard-status {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 7px;
  background: var(--code-bg);
}

.v2-user-lane-panel {
  border-color: color-mix(in srgb, var(--admin-primary) 24%, var(--border));
}

.v2-training-save-panel {
  border-color: color-mix(in srgb, var(--admin-success) 24%, var(--border));
}

.v2-feedback-panel {
  border-color: color-mix(in srgb, var(--admin-warning) 28%, var(--border));
}

.v2-admin-plan-panel {
  border-color: color-mix(in srgb, var(--admin-primary) 30%, var(--border));
}

.v2-my-plan-panel {
  border-color: color-mix(in srgb, var(--admin-success) 30%, var(--border));
}

.v2-read-exit-panel {
  border-color: color-mix(in srgb, var(--admin-primary) 18%, var(--admin-success) 18%, var(--border));
}

.v2-route-config-panel {
  border-color: color-mix(in srgb, var(--admin-primary) 26%, var(--border));
}

.v2-mini-compat-panel {
  border-color: color-mix(in srgb, var(--admin-success) 22%, var(--admin-primary) 16%, var(--border));
}

.v2-mini-compat-write-panel {
  border-color: color-mix(in srgb, var(--admin-danger) 20%, var(--admin-success) 18%, var(--border));
}

.v2-pre-mini-audit-panel {
  border-color: color-mix(in srgb, var(--admin-warning) 22%, var(--admin-success) 18%, var(--border));
}

.v2-whitelist-e2e-audit-panel {
  border-color: color-mix(in srgb, var(--admin-danger) 20%, var(--admin-primary) 18%, var(--border));
}

.v2-whitelist-plan-bridge-panel {
  border-color: color-mix(in srgb, var(--admin-success) 24%, var(--admin-primary) 18%, var(--border));
}

.v2-plan-bridge-candidates {
  display: grid;
  gap: 10px;
}

.v2-plan-bridge-candidate {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
}

.v2-plan-bridge-candidate.is-usable {
  border-color: color-mix(in srgb, var(--admin-success) 40%, var(--border));
}

.v2-plan-bridge-candidate.is-blocked {
  border-color: color-mix(in srgb, var(--admin-warning) 32%, var(--border));
}

.v2-plan-bridge-candidate-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.v2-plan-bridge-candidate-head span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.v2-readiness-audit-panel {
  border-color: color-mix(in srgb, var(--admin-warning) 24%, var(--admin-primary) 16%, var(--border));
}

@media (max-width: 1200px) {
  .admin-layout.admin-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .layout-sidebar.admin-sidebar,
  .admin-sidebar {
    width: 220px;
  }

  .layout-canvas.admin-content,
  .admin-content {
    padding: 22px 24px 40px;
  }

  .admin-top-path {
    margin: -22px -24px 20px;
    padding: 13px 24px;
  }

  .plan-current-summary,
  .plan-preview-summary,
  .plan-student-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v2-test-workbench-grid {
    grid-template-columns: 1fr;
  }

  .v2-route-plan-grid,
  .v2-baseline-freeze-grid,
  .v2-workbench-user-grid,
  .v2-switchboard-grid,
  .v2-route-config-grid,
  .v2-mini-compat-grid,
  .v2-mini-compat-results,
  .v2-mini-compat-write-grid,
  .v2-mini-compat-write-results,
  .v2-pre-mini-audit-grid,
  .v2-whitelist-e2e-audit-grid,
  .v2-whitelist-plan-bridge-grid,
  .v2-read-exit-grid,
  .v2-read-exit-results,
  .v2-readiness-audit-grid,
  .v2-training-save-grid,
  .v2-feedback-grid,
  .v2-admin-plan-grid,
  .v2-my-plan-grid,
  .v2-user-lane-grid {
    grid-template-columns: 1fr;
  }

  .plan-converter-grid,
  .plan-preview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  body {
    overflow: auto;
  }

  .admin-layout.admin-shell {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
  }

  .layout-sidebar.admin-sidebar,
  .admin-sidebar,
  .layout-canvas.admin-content,
  .admin-content {
    width: 100%;
    height: auto;
  }

  .admin-sidebar {
    max-height: none;
  }

  .admin-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }

  .admin-nav-group-title {
    grid-column: 1 / -1;
  }

  .admin-top-path {
    position: static;
    flex-wrap: wrap;
    margin: 0 0 18px;
    padding: 0 0 14px;
    background: transparent;
    backdrop-filter: none;
  }

  .admin-version-chip {
    margin-left: 0;
  }

  .plan-student-form,
  .plan-confirm-form,
  .plan-revoke-form,
  .operation-log-filter-grid {
    grid-template-columns: 1fr;
  }

  .plan-current-summary,
  .plan-preview-summary,
  .plan-student-summary,
  .plan-message-grid {
    grid-template-columns: 1fr;
  }
}
