:root {
  --top-blue: #4f86cf;
  --deep-blue: #1f66c2;
  --link-blue: #0b58bd;
  --side-blue: #2f70c9;
  --cyan: #31c9d3;
  --orange: #ff9f0a;
  --bg: #f3f5f9;
  --panel: #ffffff;
  --ink: #10233f;
  --text: #26384e;
  --muted: #7a8797;
  --line: #d8e2ef;
  --line-blue: #1f66c2;
  --success: #0c7a5b;
  --warning: #ad6200;
  --danger: #bd2b22;
  --success-bg: #e8f7f1;
  --warning-bg: #fff3d8;
  --danger-bg: #ffefed;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
}

body::before {
  content: "新华资产管理股份有限公司";
  position: fixed;
  inset: 78px 0 0 0;
  z-index: -1;
  pointer-events: none;
  color: rgba(31, 102, 194, 0.045);
  font-size: 14px;
  line-height: 80px;
  letter-spacing: 0;
  transform: rotate(-26deg);
  transform-origin: 44% 28%;
  white-space: pre;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 150px,
      rgba(31, 102, 194, 0.028) 150px 151px,
      transparent 151px 300px
    );
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.portal-shell {
  min-height: 100vh;
}

.portal-topbar {
  display: grid;
  grid-template-columns: minmax(220px, auto) minmax(220px, 230px) minmax(360px, 1fr);
  align-items: center;
  gap: 22px;
  height: 70px;
  padding: 0 18px;
  color: #ffffff;
  background: var(--top-blue);
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 170px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 22px;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
}

.brand-name {
  font-size: 16px;
  white-space: nowrap;
}

.brand-divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.52);
}

.brand-subtitle,
.today {
  font-weight: 700;
  white-space: nowrap;
}

.global-search {
  display: grid;
  grid-template-columns: 1fr 38px;
  width: 230px;
  height: 36px;
  overflow: hidden;
  background: #ffffff;
  border-radius: 14px;
}

.global-search input {
  width: 100%;
  min-width: 0;
  padding: 0 12px;
  border: 0;
  outline: 0;
  color: #555;
}

.global-search button {
  color: #ffffff;
  background: var(--cyan);
  border: 0;
  font-size: 24px;
  line-height: 1;
}

.top-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  min-width: 0;
  font-weight: 700;
}

.top-links a,
.top-links span,
.top-links button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  white-space: nowrap;
  word-break: keep-all;
  line-height: 1;
}

.top-links a:first-child::before {
  content: "⌂";
  margin-right: 7px;
  color: #1b65c4;
  font-size: 18px;
}

.portal-layout {
  display: grid;
  grid-template-columns: 190px minmax(620px, 1fr) 178px;
  gap: 12px;
  min-height: calc(100vh - 70px);
}

.portal-sidebar {
  background: #ffffff;
  border-right: 1px solid #e6edf6;
}

.menu-search {
  display: flex;
  align-items: center;
  height: 31px;
  margin: 5px 5px 10px;
  padding: 0 10px;
  color: #666;
  border: 1px solid #969da8;
  border-radius: 8px;
  font-size: 13px;
}

.menu-search::before {
  content: "⌕";
  margin-right: 5px;
  color: #7f8792;
}

.menu-list {
  display: grid;
  gap: 1px;
}

.menu-list a {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  min-height: 40px;
  padding: 0 7px 0 3px;
  color: #2b3440;
  font-size: 14px;
}

.menu-list a:hover,
.menu-list a.is-active {
  color: var(--deep-blue);
  background: #eef5ff;
}

.menu-icon {
  display: block;
  width: 16px;
  height: 16px;
  background: var(--side-blue);
  border-radius: 2px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.22);
}

.portal-main {
  min-width: 0;
  padding: 16px 0 14px;
}

.chat-panel {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 100px);
  background: var(--panel);
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(18, 50, 91, 0.04);
}

.module-tabs {
  display: flex;
  align-items: end;
  height: 36px;
  border-bottom: 1px solid var(--line-blue);
}

.module-tabs span {
  display: inline-flex;
  align-items: center;
  height: 35px;
  padding: 0 22px;
  color: #111;
  font-size: 15px;
  white-space: nowrap;
}

.module-tabs .tab-active {
  position: relative;
  color: #ffffff;
  background: var(--deep-blue);
  font-weight: 700;
}

.module-tabs .tab-active::after {
  content: "";
  position: absolute;
  top: 0;
  right: -12px;
  border-top: 35px solid var(--deep-blue);
  border-right: 12px solid transparent;
}

.module-tabs button {
  margin-left: auto;
  margin-right: 12px;
  color: #111;
  background: transparent;
  border: 0;
  font-size: 13px;
}

.query-summary {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 43px;
  padding: 0 22px;
  color: #26384e;
  border-bottom: 1px solid #eef2f7;
}

.query-summary strong {
  color: #ff4b00;
}

.mail-icon {
  position: relative;
  width: 28px;
  height: 18px;
  background: var(--orange);
  border-radius: 2px;
}

.mail-icon::before,
.mail-icon::after {
  content: "";
  position: absolute;
  top: 0;
  width: 16px;
  height: 16px;
  border-bottom: 2px solid #ffffff;
}

.mail-icon::before {
  left: 1px;
  transform: rotate(32deg);
}

.mail-icon::after {
  right: 1px;
  transform: rotate(-32deg);
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 26px 16px;
}

.message {
  display: flex;
  margin-bottom: 14px;
}

.message.user {
  justify-content: flex-end;
}

.bubble {
  max-width: min(760px, 92%);
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.bot .bubble {
  background: #f8fbff;
  border: 1px solid #dce8f7;
}

.user .bubble {
  color: #0b407c;
  background: #dceeff;
  border: 1px solid #a9d0f9;
}

.assistant-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: #65758a;
  font-size: 12px;
}

.thinking-tag,
.status-tag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 12px;
  white-space: nowrap;
}

.thinking-tag {
  color: #3a5d89;
  background: #edf5ff;
  border: 1px solid #cbdff6;
}

.status-tag.success {
  color: var(--success);
  background: var(--success-bg);
  border: 1px solid #b8e3d4;
}

.status-tag.warning {
  color: var(--warning);
  background: var(--warning-bg);
  border: 1px solid #f2d492;
}

.status-tag.danger {
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid #f4c8c1;
}

.answer-card h3 {
  margin: 0 0 4px;
  color: #071d3c;
  font-size: 16px;
  line-height: 1.35;
}

.answer-card .subline {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

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

.field-row {
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid #d8e2ef;
  border-radius: 4px;
}

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

.field-name {
  color: #31445d;
  font-size: 13px;
  font-weight: 700;
}

.field-value {
  color: #0b2344;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
}

.field-value.muted {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.field-value.warning {
  color: var(--warning);
  font-size: 15px;
}

.value-date {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.field-notice {
  margin: 7px 0 0;
  color: var(--warning);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.source-details {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.source-details summary {
  width: fit-content;
  color: var(--link-blue);
  cursor: pointer;
}

.source-table {
  width: 100%;
  margin-top: 8px;
  border-collapse: collapse;
  table-layout: fixed;
}

.source-table th,
.source-table td {
  padding: 7px 8px;
  border: 1px solid #d8e2ef;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.source-table th {
  color: #29466a;
  background: #f0f6ff;
  font-weight: 700;
}

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

.ghost-button,
.product-choice,
.field-choice,
.quick-prompts button {
  color: #0d4e9a;
  background: #ffffff;
  border: 1px solid #aacbf1;
  border-radius: 4px;
}

.ghost-button {
  padding: 6px 10px;
  font-size: 12px;
}

.ghost-button:hover,
.product-choice:hover,
.field-choice:hover,
.quick-prompts button:hover {
  color: #ffffff;
  background: var(--deep-blue);
  border-color: var(--deep-blue);
}

.choice-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.product-choice {
  padding: 9px 10px;
  text-align: left;
}

.product-choice strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
}

.product-choice:hover strong,
.product-choice:hover span {
  color: #ffffff;
}

.product-choice span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.field-selection-prompt {
  margin: 2px 0 10px;
  color: #31445d;
}

.field-option-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.field-choice {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
}

.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 26px 12px;
}

.quick-prompts button {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 12px;
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  gap: 9px;
  padding: 10px 26px 14px;
  border-top: 1px solid #edf2f8;
  background: #ffffff;
}

.composer input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 9px 11px;
  color: var(--ink);
  border: 1px solid #b9c6d7;
  border-radius: 4px;
  outline: none;
}

.composer input:focus {
  border-color: var(--deep-blue);
  box-shadow: 0 0 0 2px rgba(31, 102, 194, 0.16);
}

.composer button {
  color: #ffffff;
  background: var(--deep-blue);
  border: 1px solid #1858aa;
  border-radius: 4px;
  font-weight: 700;
}

.portal-right {
  min-width: 0;
  padding: 24px 0 14px;
}

.right-module {
  margin-bottom: 16px;
  background: #ffffff;
  border: 1px solid #e4ebf5;
}

.right-module h2 {
  display: inline-flex;
  align-items: center;
  min-height: 37px;
  margin: -1px 0 8px -1px;
  padding: 0 15px;
  color: #ffffff;
  background: var(--deep-blue);
  font-size: 16px;
  font-weight: 700;
  position: relative;
}

.right-module h2::after {
  content: "";
  position: absolute;
  top: 0;
  right: -12px;
  border-top: 37px solid var(--deep-blue);
  border-right: 12px solid transparent;
}

.right-module ul {
  margin: 0;
  padding: 0 12px 12px 24px;
  list-style: disc;
}

.right-module li {
  margin: 8px 0;
  color: #1b3351;
}

.mini-search {
  height: 28px;
  margin: 0 8px 8px;
  padding: 5px 8px;
  color: #777;
  border: 1px solid #ccd7e4;
  font-size: 12px;
}

.compact-list {
  padding-left: 18px;
}

.feedback-list {
  display: grid;
  gap: 8px;
  padding: 0 8px 10px;
}

.feedback-item {
  padding: 8px;
  background: #f8fbff;
  border: 1px solid #d8e2ef;
  border-radius: 4px;
}

.feedback-item strong {
  display: block;
  margin-bottom: 4px;
  color: #1b3351;
  font-size: 12px;
}

.feedback-item p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.empty-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100vw - 36px));
  padding: 10px 12px;
  color: #0f4936;
  background: #e4f6ef;
  border: 1px solid #b9e2d1;
  border-radius: 4px;
  box-shadow: 0 6px 20px rgba(14, 39, 76, 0.14);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.admin-page {
  padding: 16px 20px 24px;
}

.admin-hero,
.admin-card {
  background: #ffffff;
  border: 1px solid #dbe5f1;
  border-radius: 5px;
  box-shadow: 0 1px 2px rgba(18, 50, 91, 0.04);
}

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 18px 20px;
}

.admin-hero h1 {
  margin: 0 0 6px;
  color: #0b2344;
  font-size: 22px;
}

.admin-hero p,
.admin-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.admin-status {
  padding: 8px 12px;
  color: var(--success);
  background: var(--success-bg);
  border: 1px solid #b8e3d4;
  border-radius: 4px;
  white-space: nowrap;
}

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

.admin-card {
  padding: 16px;
}

.model-admin-card {
  grid-column: span 2;
}

.bot-config-head {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.bot-config-head h2 {
  margin: 0 0 3px;
  padding: 0;
  border-bottom: 0;
}

.bot-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #ffffff;
  background: linear-gradient(135deg, #6aa1e6, #1f66c2);
  border-radius: 8px;
  font-weight: 700;
}

.model-badge {
  padding: 8px 12px;
  color: #0b407c;
  background: #eef6ff;
  border: 1px solid #bdd9fb;
  border-radius: 4px;
  white-space: nowrap;
}

.admin-card h2 {
  margin: 0 0 14px;
  padding-bottom: 8px;
  color: #0b2344;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.stat-grid div {
  padding: 14px 12px;
  background: #f6faff;
  border: 1px solid #d8e8fb;
  border-radius: 4px;
}

.stat-grid strong {
  display: block;
  color: var(--deep-blue);
  font-size: 26px;
  line-height: 1.1;
}

.stat-grid span {
  color: var(--muted);
  font-size: 13px;
}

.upload-history {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e0e8f2;
}

.upload-history h3 {
  margin: 0 0 10px;
  color: #0b2344;
  font-size: 15px;
}

.upload-history-list {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.upload-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 4px;
  padding: 10px 12px;
  background: #f8fbff;
  border: 1px solid #d8e8fb;
  border-radius: 4px;
}

.upload-history-details {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.upload-history-row strong {
  display: block;
  color: #10233f;
  font-size: 13px;
}

.upload-history-row span,
.upload-history-row p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.history-delete-button {
  min-height: 28px;
  padding: 0 9px;
  color: #b42318;
  background: #fff4f2;
  border: 1px solid #f2b8b5;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.history-delete-button:hover {
  background: #ffe7e4;
}

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

.model-form {
  gap: 14px;
}

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

.form-row:has(label:nth-child(3)) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.admin-form label {
  display: grid;
  gap: 6px;
  color: #34465d;
  font-weight: 700;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  min-height: 36px;
  padding: 7px 9px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #b9c6d7;
  border-radius: 4px;
  outline: none;
}

.admin-form textarea {
  min-height: auto;
  resize: vertical;
  line-height: 1.6;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
  border-color: var(--deep-blue);
  box-shadow: 0 0 0 2px rgba(31, 102, 194, 0.16);
}

.admin-form button,
.secondary-button {
  min-height: 36px;
  padding: 0 14px;
  color: #ffffff;
  background: var(--deep-blue);
  border: 1px solid #1858aa;
  border-radius: 4px;
  font-weight: 700;
}

.admin-form button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.secondary-button {
  color: #0d4e9a;
  background: #ffffff;
  border-color: #aacbf1;
}

.upload-status {
  margin: 0;
  padding: 10px 12px;
  color: #49637f;
  background: #f6faff;
  border: 1px solid #d8e8fb;
  border-radius: 4px;
  line-height: 1.6;
}

.upload-status.is-loading {
  color: #0d4e9a;
  background: #eef6ff;
}

.upload-status.is-success {
  color: #0b6845;
  background: #ecfdf3;
  border-color: #b7e4cb;
}

.upload-status.is-warning {
  color: #875500;
  background: #fff8e5;
  border-color: #f5d58b;
}

.upload-status.is-error {
  color: #b42318;
  background: #fff4f2;
  border-color: #f2b8b5;
}

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

.checkbox-line {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
}

.checkbox-line input {
  min-height: auto;
}

.inline-form {
  grid-template-columns: minmax(0, 1fr) 80px;
  margin-bottom: 12px;
}

.json-preview {
  min-height: 180px;
  max-height: 360px;
  overflow: auto;
  margin: 0;
  padding: 12px;
  color: #10233f;
  background: #f6faff;
  border: 1px solid #d8e8fb;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.admin-feedback {
  display: grid;
  gap: 8px;
}

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

.debug-layout h3 {
  margin: 0 0 8px;
  color: #0b2344;
  font-size: 15px;
}

.feedback-row {
  padding: 10px;
  background: #f8fbff;
  border: 1px solid #d8e2ef;
  border-radius: 4px;
}

.feedback-row strong {
  display: block;
  margin-bottom: 4px;
  color: #1b3351;
}

.feedback-row p {
  margin: 0 0 3px;
  color: var(--muted);
}

@media (max-width: 1120px) {
  .portal-layout {
    grid-template-columns: 170px minmax(0, 1fr);
  }

  .portal-right {
    display: none;
  }

  .portal-topbar {
    grid-template-columns: auto auto minmax(180px, 230px);
  }

  .top-links {
    display: none;
  }
}

@media (max-width: 760px) {
  .portal-topbar {
    grid-template-columns: 1fr;
    gap: 7px;
    height: auto;
    padding: 10px;
  }

  .today,
  .global-search {
    width: 100%;
  }

  .portal-layout {
    grid-template-columns: 1fr;
  }

  .portal-sidebar {
    display: none;
  }

  .portal-main {
    padding: 8px;
  }

  .chat-panel {
    min-height: calc(100vh - 136px);
  }

  .module-tabs span {
    padding: 0 14px;
  }

  .query-summary {
    align-items: flex-start;
    padding: 10px 14px;
  }

  .messages,
  .quick-prompts,
  .composer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .bubble {
    max-width: 100%;
  }

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

  .composer button {
    min-height: 38px;
  }

  .admin-page {
    padding: 8px;
  }

  .admin-hero,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .stat-grid,
  .inline-form,
  .form-row,
  .checkbox-grid,
  .debug-layout {
    grid-template-columns: 1fr;
  }

  .model-admin-card {
    grid-column: span 1;
  }

  .bot-config-head {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .model-badge {
    grid-column: 1 / -1;
    width: fit-content;
  }
}

body.assistant-home {
  --nci-blue: #1f66c2;
  --nci-blue-dark: #164f9d;
  --nci-blue-soft: #eaf3ff;
  --nci-blue-line: #c9ddf7;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-solid: #ffffff;
  --surface-muted: #f6f9fd;
  --ink-strong: #10233f;
  --ink-body: #26384e;
  --ink-muted: #6e7f94;
  --accent-cyan: #27c2cf;
  --accent-amber: #f5a623;
  min-height: 100vh;
  overflow: hidden;
  color: var(--ink-body);
  background:
    linear-gradient(180deg, rgba(31, 102, 194, 0.12), rgba(31, 102, 194, 0) 240px),
    #eef4fb;
  font-family: "SF Pro Text", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

body.assistant-home::before {
  display: none;
}

.assistant-home button,
.assistant-home input {
  font: inherit;
}

.assistant-shell {
  display: grid;
  grid-template-rows: 56px minmax(0, 1fr);
  gap: 14px;
  min-height: 100vh;
  padding: 14px 18px 18px;
}

.assistant-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 4px;
}

.assistant-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
}

.brand-symbol {
  display: grid;
  place-items: center;
  width: 42px;
  height: 32px;
  color: #ffffff;
  background: var(--nci-blue);
  border-radius: 8px;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(31, 102, 194, 0.24);
}

.brand-copy {
  display: grid;
  gap: 1px;
  color: var(--ink-strong);
}

.brand-copy strong {
  font-size: 15px;
  line-height: 1.2;
}

.brand-copy span {
  color: var(--ink-muted);
  font-size: 12px;
}

.assistant-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(201, 221, 247, 0.82);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(16, 35, 63, 0.08);
  backdrop-filter: blur(18px);
}

.assistant-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  color: var(--ink-muted);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.assistant-nav a:hover,
.assistant-nav a.is-active {
  color: #ffffff;
  background: var(--nci-blue);
}

.assistant-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: 14px;
  width: 100%;
  max-width: 1280px;
  min-height: 0;
  margin: 0 auto;
}

.conversation-panel,
.assistant-side {
  min-height: 0;
  background: var(--surface);
  border: 1px solid rgba(201, 221, 247, 0.86);
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(16, 35, 63, 0.12);
  backdrop-filter: blur(20px);
}

.conversation-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.conversation-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 16px;
  background:
    linear-gradient(90deg, rgba(31, 102, 194, 0.08), rgba(39, 194, 207, 0.06)),
    rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid rgba(201, 221, 247, 0.7);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--nci-blue);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.conversation-head h1 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 28px;
  line-height: 1.15;
  font-weight: 800;
}

.conversation-head p:last-child {
  margin: 8px 0 0;
  color: var(--ink-muted);
  line-height: 1.7;
}

.connection-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  color: #0b6b50;
  background: #e8f7f1;
  border: 1px solid #b8e3d4;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.connection-pill span {
  width: 8px;
  height: 8px;
  background: #0aa071;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(10, 160, 113, 0.12);
}

.notice-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 24px;
  color: var(--ink-body);
  background: #ffffff;
  border-bottom: 1px solid rgba(201, 221, 247, 0.72);
}

.notice-strip p {
  margin: 0;
  line-height: 1.6;
}

.notice-strip strong {
  margin-left: auto;
  color: var(--accent-amber);
  white-space: nowrap;
}

.notice-icon {
  position: relative;
  flex: 0 0 auto;
  width: 26px;
  height: 18px;
  background: var(--accent-amber);
  border-radius: 5px;
}

.notice-icon::before,
.notice-icon::after {
  content: "";
  position: absolute;
  top: 2px;
  width: 14px;
  height: 12px;
  border-bottom: 2px solid #ffffff;
}

.notice-icon::before {
  left: 2px;
  transform: rotate(32deg);
}

.notice-icon::after {
  right: 2px;
  transform: rotate(-32deg);
}

.assistant-home .messages {
  flex: 1;
  min-height: 280px;
  overflow-y: auto;
  padding: 20px 24px;
  background:
    linear-gradient(180deg, rgba(246, 249, 253, 0.4), rgba(255, 255, 255, 0.8)),
    #ffffff;
}

.assistant-home .message {
  display: flex;
  margin-bottom: 14px;
}

.assistant-home .message.user {
  justify-content: flex-end;
}

.assistant-home .bubble {
  max-width: min(780px, 90%);
  padding: 13px 14px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.72;
  overflow-wrap: anywhere;
}

.assistant-home .bot .bubble {
  color: var(--ink-body);
  background: #ffffff;
  border: 1px solid var(--nci-blue-line);
  box-shadow: 0 10px 28px rgba(16, 35, 63, 0.07);
}

.assistant-home .user .bubble {
  color: #ffffff;
  background: var(--nci-blue);
  border: 1px solid var(--nci-blue-dark);
  box-shadow: 0 10px 24px rgba(31, 102, 194, 0.2);
}

.assistant-home .assistant-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 700;
}

.assistant-home .thinking-tag,
.assistant-home .status-tag {
  min-height: 22px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
}

.assistant-home .thinking-tag {
  color: var(--nci-blue);
  background: var(--nci-blue-soft);
  border: 1px solid var(--nci-blue-line);
}

.assistant-home .answer-card h3 {
  margin: 0 0 5px;
  color: var(--ink-strong);
  font-size: 17px;
}

.assistant-home .subline {
  margin-bottom: 12px;
  color: var(--ink-muted);
}

.assistant-home .field-list {
  display: grid;
  gap: 10px;
}

.assistant-home .field-row {
  padding: 12px;
  background: var(--surface-muted);
  border: 1px solid #dbe8f7;
  border-radius: 8px;
}

.assistant-home .field-heading {
  margin-bottom: 8px;
}

.assistant-home .field-name {
  color: #304761;
}

.assistant-home .field-value {
  color: var(--ink-strong);
  font-size: 22px;
  font-weight: 800;
}

.assistant-home .source-details summary {
  color: var(--nci-blue);
  font-weight: 700;
}

.assistant-home .source-table th {
  background: var(--nci-blue-soft);
}

.chat-dock {
  padding: 12px 24px 18px;
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid rgba(201, 221, 247, 0.72);
}

.assistant-home .quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 0 10px;
}

.assistant-home .quick-prompts button,
.assistant-home .ghost-button,
.assistant-home .product-choice,
.assistant-home .field-choice {
  color: var(--nci-blue);
  background: #ffffff;
  border: 1px solid #b9d2f4;
  border-radius: 8px;
  font-weight: 700;
}

.assistant-home .quick-prompts button {
  min-height: 32px;
  padding: 0 11px;
  font-size: 12px;
}

.assistant-home .quick-prompts button:hover,
.assistant-home .ghost-button:hover,
.assistant-home .product-choice:hover,
.assistant-home .field-choice:hover {
  color: #ffffff;
  background: var(--nci-blue);
  border-color: var(--nci-blue);
}

.assistant-home .composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  gap: 10px;
  padding: 0;
  border-top: 0;
  background: transparent;
}

.assistant-home .composer input {
  min-height: 44px;
  padding: 0 14px;
  color: var(--ink-strong);
  background: #ffffff;
  border: 1px solid #b8c9dd;
  border-radius: 8px;
  outline: none;
}

.assistant-home .composer input:focus {
  border-color: var(--nci-blue);
  box-shadow: 0 0 0 4px rgba(31, 102, 194, 0.14);
}

.assistant-home .composer button {
  min-height: 44px;
  color: #ffffff;
  background: var(--nci-blue);
  border: 1px solid var(--nci-blue-dark);
  border-radius: 8px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(31, 102, 194, 0.22);
}

.assistant-home .composer button:hover {
  background: var(--nci-blue-dark);
}

.assistant-side {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px;
  overflow-y: auto;
}

.side-section {
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(201, 221, 247, 0.78);
  border-radius: 8px;
}

.side-section h2 {
  margin: 0 0 12px;
  color: var(--ink-strong);
  font-size: 15px;
}

.field-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.field-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  color: var(--nci-blue);
  background: var(--nci-blue-soft);
  border: 1px solid var(--nci-blue-line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-list {
  display: grid;
  gap: 9px;
  margin: 0;
}

.status-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid #e4edf8;
}

.status-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.status-list dt,
.status-list dd {
  margin: 0;
  font-size: 13px;
}

.status-list dt {
  color: var(--ink-muted);
}

.status-list dd {
  color: var(--ink-strong);
  font-weight: 800;
  text-align: right;
}

.assistant-home .feedback-list {
  gap: 8px;
  padding: 0;
}

.assistant-home .feedback-item {
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--nci-blue-line);
  border-radius: 8px;
}

.assistant-home .feedback-item p {
  margin: 0;
}

.assistant-home .empty-note {
  color: var(--ink-muted);
}

.assistant-home .toast {
  right: 22px;
  bottom: 22px;
  color: #0b4b38;
  background: #e8f7f1;
  border-color: #b8e3d4;
  border-radius: 8px;
}

@media (max-width: 980px) {
  body.assistant-home {
    overflow: auto;
  }

  .assistant-shell {
    min-height: 100vh;
    padding: 12px;
  }

  .assistant-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .assistant-nav {
    width: 100%;
    overflow-x: auto;
  }

  .assistant-workspace {
    grid-template-columns: 1fr;
  }

  .assistant-side {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .assistant-shell {
    grid-template-rows: auto minmax(0, 1fr);
    padding: 8px;
  }

  .assistant-nav a {
    padding: 0 11px;
  }

  .conversation-head {
    flex-direction: column;
    padding: 18px 16px 14px;
  }

  .conversation-head h1 {
    font-size: 24px;
  }

  .notice-strip {
    align-items: flex-start;
    padding: 10px 16px;
  }

  .notice-strip strong {
    margin-left: 0;
  }

  .assistant-home .messages {
    padding: 16px;
  }

  .assistant-home .bubble {
    max-width: 100%;
  }

  .chat-dock {
    padding: 10px 16px 14px;
  }

  .assistant-home .composer {
    grid-template-columns: 1fr;
  }

  .assistant-home .composer button {
    width: 100%;
  }

  .assistant-side {
    grid-template-columns: 1fr;
  }
}

/* Front-page layout correction: keep the glass feel, but do not crop the header/tabs. */
body.assistant-home {
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(211, 226, 247, 0.92), rgba(238, 244, 251, 0.88) 210px),
    #eef4fb;
}

.assistant-shell {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  height: 100vh;
  min-height: 0;
  padding: 6px 12px 12px;
}

.assistant-topbar {
  min-height: 64px;
  padding: 0 16px;
  background: linear-gradient(180deg, rgba(235, 243, 255, 0.9), rgba(215, 228, 246, 0.86));
  border: 1px solid rgba(185, 210, 244, 0.72);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(16, 35, 63, 0.08);
  backdrop-filter: blur(16px);
}

.assistant-brand {
  min-width: 0;
}

.brand-symbol {
  width: 40px;
  height: 32px;
  border-radius: 8px;
  box-shadow: none;
}

.brand-copy strong {
  color: #123050;
  font-size: 15px;
}

.brand-copy span {
  color: #49637f;
}

.assistant-nav {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 3px;
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(185, 210, 244, 0.75);
  box-shadow: none;
  overflow: visible;
}

.assistant-nav a {
  min-height: 30px;
  padding: 0 13px;
  color: #24476d;
}

.assistant-workspace {
  height: 100%;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 10px;
}

.conversation-panel,
.assistant-side {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(185, 210, 244, 0.82);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(16, 35, 63, 0.1);
}

.product-tabs {
  display: flex;
  align-items: flex-end;
  min-height: 43px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.76);
  border-bottom: 1px solid var(--nci-blue);
}

.product-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 20px;
  color: #1d2d44;
  border-radius: 8px 8px 0 0;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.product-tabs a.is-active {
  color: #ffffff;
  background: var(--nci-blue);
}

.product-tabs a:last-child {
  margin-left: auto;
  padding-inline: 14px;
}

.notice-strip {
  min-height: 42px;
  padding: 9px 22px;
}

.notice-strip p {
  flex: 1 1 280px;
  min-width: 0;
}

.assistant-home .messages {
  min-height: 0;
  padding: 18px 24px;
}

.chat-dock {
  flex: 0 0 auto;
  padding: 10px 24px 14px;
}

.assistant-side {
  padding: 12px;
}

@media (max-width: 980px) {
  body.assistant-home {
    overflow: auto;
  }

  .assistant-shell {
    height: auto;
    min-height: 100vh;
    padding: 6px 10px 12px;
  }

  .assistant-topbar {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px;
  }

  .assistant-nav {
    width: auto;
    margin-left: auto;
    overflow: visible;
  }

  .assistant-workspace {
    height: auto;
    grid-template-columns: 1fr;
  }

  .conversation-panel {
    min-height: calc(100vh - 96px);
  }

  .assistant-side {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .assistant-shell {
    grid-template-rows: auto minmax(0, 1fr);
    padding: 6px;
  }

  .assistant-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .assistant-nav {
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
  }

  .assistant-nav a {
    padding: 0 12px;
  }

  .product-tabs {
    overflow-x: auto;
    padding: 0 8px;
  }

  .product-tabs a {
    min-height: 38px;
    padding: 0 14px;
  }

  .product-tabs a:last-child {
    margin-left: 0;
  }

  .notice-strip {
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
  }

  .notice-strip strong {
    flex-basis: 100%;
    margin-left: 36px;
  }

  .assistant-home .messages {
    padding: 14px 12px;
  }

  .chat-dock {
    padding: 10px 12px 12px;
  }

  .assistant-side {
    grid-template-columns: 1fr;
  }
}

/* Hide the auxiliary side panel on the front-page prototype. */
.assistant-workspace {
  grid-template-columns: minmax(0, 1fr);
}

.assistant-brand {
  gap: 0;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: 278px;
  height: 34px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.08),
    0 8px 18px rgba(31, 102, 194, 0.14);
}

.assistant-nav button,
.link-button {
  border: 0;
  background: transparent;
  color: #24476d;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.assistant-nav button {
  min-height: 30px;
  padding: 0 13px;
  border-radius: 7px;
}

.assistant-nav button:hover,
.link-button:hover {
  color: var(--nci-blue);
}

.login-page {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(211, 226, 247, 0.92), rgba(238, 244, 251, 0.88) 240px),
    #eef4fb;
  color: #123050;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(420px, 100%);
  padding: 28px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(185, 210, 244, 0.82);
  border-radius: 12px;
  box-shadow: 0 18px 46px rgba(16, 35, 63, 0.12);
}

.login-logo {
  display: block;
  width: 278px;
  height: 34px;
  object-fit: cover;
  border-radius: 8px;
}

.login-copy h1 {
  margin: 24px 0 8px;
  font-size: 24px;
}

.login-copy p,
.login-message {
  color: #49637f;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.login-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.login-form input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(185, 210, 244, 0.9);
  border-radius: 8px;
  font: inherit;
}

.login-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 0 18px;
  color: #ffffff;
  background: #8cc5d7;
  border: 0;
  border-radius: 4px;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(31, 102, 194, 0.14);
}

.login-form button:hover {
  background: #79b8cd;
}

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

.admin-section-head h2 {
  margin: 0 0 6px;
}

.activity-card {
  margin-bottom: 14px;
  padding: 28px 34px 24px;
}

.activity-card h2 {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  color: #172033;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.activity-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.activity-subtitle,
.activity-axis-title,
.activity-footnote,
.activity-actions {
  margin: 0;
  color: #6b7280;
}

.activity-subtitle {
  font-size: 15px;
}

.activity-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  white-space: nowrap;
}

.activity-actions .secondary-button {
  min-height: 38px;
  padding: 0 17px;
  color: #1f73e8;
  border-color: #2f80ed;
  font-size: 15px;
  cursor: pointer;
}

.activity-actions .secondary-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.activity-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(92px, 1fr));
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid #d3dbe7;
  border-radius: 5px;
}

.activity-tabs button {
  min-height: 42px;
  padding: 0 22px;
  color: #374151;
  background: #ffffff;
  border: 0;
  border-right: 1px solid #d3dbe7;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.activity-tabs button:last-child {
  border-right: 0;
}

.activity-tabs button.is-active {
  color: #1f73e8;
  background: #eef5ff;
  box-shadow: inset 0 0 0 1px #b9d3fb;
}

.activity-tabs button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.activity-tabs button:focus-visible,
.activity-actions button:focus-visible {
  outline: 2px solid #1f73e8;
  outline-offset: -2px;
}

.activity-chart-region {
  margin-top: 28px;
}

.activity-axis-title {
  margin-bottom: 6px;
  font-size: 14px;
}

.activity-chart-shell {
  position: relative;
  width: 100%;
}

.activity-chart-shell canvas {
  display: block;
  width: 100%;
  height: 380px;
}

.activity-tooltip {
  position: absolute;
  z-index: 3;
  display: grid;
  gap: 5px;
  min-width: 126px;
  padding: 12px 14px;
  color: #344054;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #d9e0ea;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(22, 41, 70, 0.16);
  pointer-events: none;
}

.activity-tooltip[hidden] {
  display: none;
}

.activity-tooltip strong {
  color: #172033;
  font-size: 14px;
}

.activity-tooltip span {
  font-size: 13px;
}

.activity-footnote {
  margin-top: 10px;
  font-size: 13px;
}

.summary-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-shortcut {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  text-decoration: none;
}

.compact-preview {
  max-height: 180px;
}

.user-create-form {
  margin-bottom: 18px;
}

.user-list {
  display: grid;
  gap: 10px;
}

.user-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(120px, 1fr) 120px 88px minmax(120px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(185, 210, 244, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.user-row strong,
.user-row span {
  display: block;
}

.user-row span {
  margin-top: 4px;
  color: #617892;
  font-size: 12px;
}

.user-row input,
.user-row select {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(185, 210, 244, 0.9);
  border-radius: 7px;
  font: inherit;
}

.compact-checkbox {
  align-items: center;
  gap: 6px;
}

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

.danger-button {
  min-height: 34px;
  padding: 0 12px;
  color: #b42318;
  background: #fff4f2;
  border: 1px solid #f2b8b5;
  border-radius: 4px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.danger-button:hover {
  background: #ffe7e4;
}

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

  .user-row {
    grid-template-columns: 1fr 1fr;
  }

  .row-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .summary-stat-grid,
  .user-row {
    grid-template-columns: 1fr;
  }

  .admin-section-head {
    display: grid;
  }

  .activity-card {
    padding: 20px 16px;
  }

  .activity-card h2 {
    font-size: 23px;
  }

  .activity-card-head,
  .activity-actions {
    display: grid;
    gap: 10px;
  }

  .activity-actions {
    justify-items: start;
    white-space: normal;
  }

  .activity-tabs {
    display: grid;
    width: 100%;
  }

  .activity-chart-shell canvas {
    height: 300px;
  }
}
