:root {
  --bg-1: #f4f7fb;
  --bg-2: #e8effa;
  --surface: #ffffff;
  --surface-soft: #f9fbfe;
  --border: #d9e2ef;
  --text: #1f2a37;
  --text-muted: #5f6f84;
  --brand: #0b6e6e;
  --brand-strong: #075757;
  --accent: #f59e0b;
  --danger: #d94848;
  --ok: #1f9d72;
  --shadow: 0 14px 40px rgba(31, 42, 55, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  color: var(--text);
  font-family: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei UI", sans-serif;
  background:
    radial-gradient(circle at 8% 10%, rgba(11, 110, 110, 0.14), transparent 36%),
    radial-gradient(circle at 86% 2%, rgba(245, 158, 11, 0.16), transparent 30%),
    linear-gradient(145deg, var(--bg-1) 0%, var(--bg-2) 100%);
}

.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.5;
}

.page-hidden {
  display: none !important;
}

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

.login-card {
  width: min(520px, 100%);
  padding: 34px 28px;
  display: grid;
  justify-items: center;
  text-align: center;
}

.auth-head {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.auth-head h2 {
  margin: 0;
}

.brand-logo {
  display: block;
  object-fit: cover;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(203, 184, 126, 0.34);
  box-shadow: 0 8px 24px rgba(31, 42, 55, 0.1);
}

.auth-logo {
  width: 86px;
  height: 86px;
}

.auth-form {
  width: min(360px, 100%);
  margin: 0 auto;
  justify-items: stretch;
  text-align: center;
}

.auth-form label {
  width: 100%;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.auth-form input,
.auth-form button {
  width: 100%;
}

.auth-method-tabs {
  width: min(360px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #eef2f7;
}

.auth-method-tabs button {
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
}

.auth-method-tabs button:hover,
.auth-method-tabs button.active {
  background: #fff;
  color: var(--brand-strong);
  box-shadow: 0 1px 4px rgba(31, 42, 55, 0.1);
}

.verification-code-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  gap: 8px;
}

.auth-form .verification-code-row button,
.verification-code-row .send-code-button {
  width: 116px;
  min-height: 42px;
  padding-inline: 8px;
  white-space: nowrap;
}

.send-code-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.auth-view {
  display: none;
  width: 100%;
}

.auth-view.active {
  display: grid;
  justify-items: center;
}

.auth-switch {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 13px;
}

.client-download-button {
  width: min(360px, 100%);
  margin-top: 14px;
  border: 1px solid #b7c7da;
  border-radius: 8px;
  padding: 10px 12px;
  background: #eef4fb;
  color: #314155;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.client-download-button:hover {
  border-color: #83c7bf;
  background: #e2ecf8;
  color: var(--brand-strong);
}

.text-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
}

.text-link:hover {
  background: transparent;
  color: var(--brand-strong);
  text-decoration: underline;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 18px;
  max-width: 1480px;
  margin: 0 auto;
  padding: 18px;
  align-items: start;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 14px;
}

.table-inline-form {
  display: grid;
  gap: 8px;
  min-width: 260px;
}

.report-config-card {
  display: grid;
  gap: 10px;
  min-width: 300px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f8fd 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.report-config-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
  align-items: end;
}

.field-stack {
  display: grid;
  gap: 6px;
}

.field-stack-compact {
  min-width: 0;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

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

.table-inline-row input[type="email"],
.table-inline-row input[type="time"] {
  padding: 7px 9px;
}

.table-mini-input {
  min-width: 180px;
}

.table-time-input {
  width: 120px;
}

.report-config-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.table-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
}

.report-toggle {
  font-weight: 600;
  color: var(--text);
}

.report-config-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.table-action-stack {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

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

.cell-note {
  color: var(--text-muted);
  font-size: 12px;
}

.sidebar {
  position: sticky;
  top: 18px;
  min-height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.sidebar-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px 14px;
  border-bottom: 1px dashed var(--border);
}

.sidebar-logo {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
}

.sidebar-brand strong,
.sidebar-brand span {
  display: block;
}

.sidebar-brand strong {
  font-size: 15px;
  line-height: 1.3;
}

.sidebar-brand span {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
}

.nav-item:hover {
  background: var(--surface-soft);
  border-color: var(--border);
}

.nav-item.active {
  background: #e6f5f3;
  border-color: #b5e3de;
  color: #0d6158;
  font-weight: 600;
}

.sidebar-footer {
  border-top: 1px dashed var(--border);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.main-area {
  display: grid;
  gap: 14px;
}

.topbar {
  display: none;
}

.topbar h2 {
  margin: 0;
  font-size: 22px;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar-user-label {
  color: var(--text-muted);
  font-size: 12px;
}

.topbar-user-name {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 10px;
  color: var(--text);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #83c7bf;
  box-shadow: 0 0 0 3px rgba(11, 110, 110, 0.14);
}

input[readonly] {
  background: #f0f3f8;
  color: var(--text-muted);
  cursor: default;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
}

button:hover {
  background: var(--brand-strong);
}

button.ghost {
  background: #eaf0f8;
  color: #314155;
}

button.ghost:hover {
  background: #dbe6f3;
}

button.danger {
  background: var(--danger);
}

button.danger:hover {
  background: #c93f3f;
}

.link-btn {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 999px;
  border: 1px solid rgba(49, 65, 85, 0.08);
}

button.ghost.link-btn {
  background: #eef4fb;
}

button.ghost.link-btn:hover {
  background: #e2ecf8;
}

.panel {
  display: none;
}

.panel.active {
  display: block !important;
}

.card h3 {
  margin: 0;
  font-size: 16px;
}

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

.overview-metrics-card {
  margin-bottom: 12px;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.card-title-row-tight {
  margin-bottom: 14px;
}

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

.stat-card {
  border: 1px solid #edf2f9;
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 14px;
  min-height: 112px;
}

.stat-card-wide {
  grid-column: span 2;
}

.stat-label {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.stat-value {
  margin: 10px 0 0;
  font-size: 26px;
  font-weight: 700;
}

.stat-note {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

.dashboard-secondary {
  margin-bottom: 12px;
}

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

.upload-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  padding: 8px 10px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  flex-wrap: wrap;
}

.upload-select {
  width: auto;
  min-width: 90px;
  padding: 6px 8px;
  font-size: 13px;
}

.upload-filename {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-status {
  font-size: 12px;
  color: var(--ok);
}

.upload-status.is-error {
  color: var(--danger);
}

.graph-layout {
  display: grid;
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.graph-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-content: start;
  min-width: 0;
  width: 100%;
}

.graph-column-side {
  padding-right: 0;
}

.graph-column-main {
  padding-left: 0;
  min-width: 0;
}

.graph-column > .card {
  width: 100%;
  min-width: 0;
}

.graph-column .card h3 {
  margin-bottom: 12px;
}

.graph-column .card .card-title-row h3 {
  margin-bottom: 0;
}

.graph-stat-row {
  margin-bottom: 10px;
}

.graph-focus-chip {
  pointer-events: none;
  padding: 6px 10px;
}

.graph-column-main .card {
  min-width: 0;
}

#graphChart {
  min-height: 450px;
  overflow: hidden;
}

#graphSummaryBox,
#graphChart,
#panel-graph .table-wrap {
  width: 100%;
}

.graph-column .table-wrap table {
  min-width: 100%;
}

.graph-type-row {
  margin-top: 10px;
}

@media (max-width: 1180px) {
  .graph-layout {
    grid-template-columns: 1fr;
  }
}

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

.chip-row.compact {
  margin: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  margin: 0 4px 4px 0;
  background: #eaf7f4;
  color: #0f6c60;
}

.tag.warn {
  background: #fff5df;
  color: #946200;
}

.tag.muted {
  background: #eef2f8;
  color: #5d6b7d;
}

.tag.is-active {
  background: var(--brand);
  color: #fff;
}

/* ---- Category Tab Bar ---- */
.category-tab-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 14px 0;
}

.category-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px 14px;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
  min-height: 82px;
  font-family: inherit;
}

.category-tab:hover {
  border-color: #a5dbd4;
  background: #f4fcfa;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(11, 110, 110, 0.10);
}

.category-tab.is-active {
  background: linear-gradient(135deg, #0b6e6e 0%, #0d7f7f 100%);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 10px 28px rgba(11, 110, 110, 0.26);
  transform: translateY(-1px);
}

.category-tab-index {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  opacity: 0.55;
}

.category-tab.is-active .category-tab-index {
  opacity: 0.75;
}

.category-tab-label {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

/* Responsive: 2x2 on narrow screens */
@media (max-width: 860px) {
  .category-tab-bar {
    grid-template-columns: repeat(2, 1fr);
  }

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

button.tag {
  border: 0;
  cursor: pointer;
}

button.tag:hover {
  background: #dcefe9;
  color: #0f6c60;
}

button.tag.is-active:hover {
  background: var(--brand-strong);
  color: #fff;
}

.session-box {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 14px;
  min-height: 124px;
  background: var(--surface-soft);
}

.session-user {
  font-size: 18px;
  font-weight: 700;
}

.session-meta {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 6px;
}

.card-inline-actions {
  margin-top: 16px;
}

.dashboard-ranking {
  margin-top: 12px;
}

.rank-badge {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #e6f5f3;
  color: #0d6158;
  font-weight: 700;
}

.token-total-cell {
  display: grid;
  min-width: 150px;
  gap: 6px;
}

.token-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eef6;
}

.token-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.form-grid {
  display: grid;
  gap: 8px;
}

.compact-form {
  margin-bottom: 12px;
}

.form-grid label {
  font-size: 12px;
  color: var(--text-muted);
}

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

.table-tools {
  margin-bottom: 8px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.table-wrap-scroll {
  max-height: 560px;
  overflow-y: scroll;
  overflow-x: auto;
}

.table-wrap-scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.table-wrap-scroll::-webkit-scrollbar-track {
  background: #f0f3f8;
  border-radius: 8px;
}

.table-wrap-scroll::-webkit-scrollbar-thumb {
  background: #c4cdd9;
  border-radius: 8px;
}

.table-wrap-scroll::-webkit-scrollbar-thumb:hover {
  background: #a0abb8;
}

.short-scroll {
  max-height: 420px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

th,
td {
  border-bottom: 1px solid #edf2f9;
  padding: 10px;
  text-align: left;
  font-size: 13px;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7faff;
  color: #4b5a6c;
  font-weight: 600;
}

.placeholder {
  color: var(--text-muted);
  text-align: center;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 13px;
}

.checklist-box {
  display: grid;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--surface-soft);
  max-height: 220px;
  overflow: auto;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.check-item input {
  width: auto;
  margin-top: 2px;
}

.check-item span {
  font-size: 13px;
}

.check-item small {
  display: block;
  color: var(--text-muted);
  margin-top: 2px;
}

.product-list {
  min-height: 460px;
  max-height: 460px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 10px;
  display: grid;
  gap: 10px;
}

.product-item {
  border: 1px solid #e5ebf4;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.product-item-main strong {
  display: block;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
}

.product-item {
  cursor: pointer;
  transition: all 0.2s ease;
}

.product-item:hover {
  border-color: var(--brand);
  background: #f5fcfa;
}

.product-actions {
  flex: 0 0 auto;
}

.product-file-list {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.product-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  font-size: 13px;
}

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

.notice-empty {
  padding: 40px 0;
}

.notice-item {
  border: 1px solid #e5ebf4;
  border-radius: 12px;
  background: var(--surface-soft);
  overflow: hidden;
}

.notice-summary {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  padding: 14px;
  display: grid;
  gap: 8px;
  justify-items: start;
  text-align: left;
}

.notice-summary:hover {
  background: #eef5ff;
}

.notice-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.notice-title {
  font-weight: 600;
}

.notice-event {
  font-size: 13px;
  color: var(--text-muted);
}

.notice-detail {
  font-size: 13px;
  color: var(--text);
}

.notice-link {
  color: var(--brand);
  font-size: 12px;
}

.notice-meta {
  color: var(--text-muted);
  font-size: 12px;
}

.notice-status {
  font-size: 12px;
  white-space: nowrap;
  color: #38506d;
  background: #eaf0f8;
  border-radius: 999px;
  padding: 3px 8px;
}

.notice-body {
  border-top: 1px solid #e5ebf4;
  padding: 12px 14px 14px;
}

.notice-body pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 12px;
  color: #233345;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 0 12px 12px;
  }

  .sidebar {
    position: static;
    min-height: auto;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
  }

  .sidebar-main {
    gap: 12px;
  }

  .nav {
    grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  }

  .main-area {
    padding-top: 0;
  }

  .stats-grid,
  .grid-two {
    grid-template-columns: 1fr;
  }

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

  .report-config-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .app-shell {
    gap: 12px;
  }

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

  .sidebar-footer {
    border-top: 0;
    padding-top: 0;
  }

  .graph-column .table-wrap table,
  table {
    min-width: 560px;
  }

  .report-config-card {
    min-width: 260px;
  }
}

.modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
}

.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(10, 16, 24, 0.42);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100vw - 24px));
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.slim-modal {
  width: min(560px, calc(100vw - 24px));
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  min-width: 200px;
  max-width: 420px;
  background: #1f2a37;
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: all 0.25s ease;
  z-index: 80;
}

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

.fade-in {
  animation: enterUp 0.45s ease both;
}

.delay-1 {
  animation-delay: 0.04s;
}

.delay-2 {
  animation-delay: 0.08s;
}

.delay-3 {
  animation-delay: 0.08s;
}

.delay-4 {
  animation-delay: 0.16s;
}

@keyframes enterUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding-top: 0;
  }

  .sidebar {
    position: static;
    min-height: auto;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
  }

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

  }

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

  .stat-card-wide {
    grid-column: span 1;
  }

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

  .topbar-user {
    justify-content: space-between;
  }

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

  .pager {
    flex-wrap: wrap;
  }
}

/* Knowledge graph styles */
.graph-chart-preview {
  width: 100%;
  height: 320px;
  margin: 10px 0 0;
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    radial-gradient(circle at top, rgba(26, 163, 122, 0.06), transparent 46%),
    linear-gradient(180deg, #f9fcfb 0%, #f2f7f5 100%);
}

.graph-full-shell {
  min-height: 100vh;
  padding: 28px;
}

.graph-full-page {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.graph-full-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 12px;
  z-index: 5;
  padding: 10px 0;
  background: linear-gradient(180deg, rgba(248, 251, 249, 0.96), rgba(248, 251, 249, 0.82));
  backdrop-filter: blur(8px);
}

.graph-full-topbar h1 {
  margin: 0;
  font-size: 30px;
}

.graph-full-topbar p {
  margin: 6px 0 0;
}

.graph-full-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.graph-full-chart {
  width: 100%;
  height: 72vh;
  min-height: 560px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background:
    radial-gradient(circle at top, rgba(39, 125, 161, 0.08), transparent 42%),
    linear-gradient(180deg, #fbfdff 0%, #f3f7fb 100%);
}

@media (max-width: 900px) {
  .graph-full-shell {
    padding: 16px;
  }

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

  .graph-full-chart {
    min-height: 420px;
    height: 60vh;
  }
}
