:root {
  --bg: #eef7ff;
  --page: #f8fbff;
  --sidebar: #ffffff;
  --card: rgba(255, 255, 255, 0.92);
  --card-solid: #ffffff;
  --line: #dce8f5;
  --text: #16243d;
  --muted: #7b8aa0;
  --blue: #1677ff;
  --blue-soft: #eaf4ff;
  --red: #b2291f;
  --gold: #b98238;
  --shadow: 0 18px 50px rgba(32, 82, 140, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 78% 12%, rgba(69, 169, 255, 0.24), transparent 30%),
    linear-gradient(135deg, #eaf7ff 0%, #f8fbff 42%, #fff8ee 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

[v-cloak] {
  display: none;
}

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

button,
.secondary {
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid rgba(22, 119, 255, 0.2);
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(180deg, #2990ff, #126de2);
  box-shadow: 0 8px 18px rgba(22, 119, 255, 0.18);
  cursor: pointer;
  text-decoration: none;
}

button.secondary,
.secondary {
  color: #245077;
  background: #fff;
  box-shadow: none;
}

button.text-button {
  min-height: auto;
  padding: 0;
  color: var(--blue);
  border: 0;
  background: transparent;
  box-shadow: none;
}

input,
select,
textarea {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid #d9e4ef;
  border-radius: 10px;
  color: var(--text);
  background: #fff;
  outline: none;
}

textarea {
  min-height: 78px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(22, 119, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.09);
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  font-size: 26px;
  letter-spacing: 0.04em;
}

h2 {
  margin-top: 4px;
  font-size: 28px;
}

h3 {
  font-size: 20px;
}

h4 {
  margin: 24px 0 12px;
  font-size: 16px;
}

.admin-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
  padding: 18px;
  gap: 18px;
}

.sidebar {
  position: sticky;
  top: 18px;
  height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid rgba(22, 119, 255, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 18px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(145deg, #1677ff, #6bc8ff);
}

.brand strong,
.sidebar-card strong {
  display: block;
  font-size: 15px;
}

.brand small,
.sidebar-card small,
.muted,
.timeline small {
  color: var(--muted);
}

.menu {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.menu button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  width: 100%;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 14px;
  color: #59627c;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.menu button:hover {
  color: #3150d4;
  background: rgba(78, 116, 255, 0.07);
  transform: translateX(2px);
}

.menu button.active {
  color: #fff;
  background: linear-gradient(135deg, #5b7cff 0%, #2f63f4 100%);
  border-color: transparent;
  box-shadow: 0 14px 28px rgba(63, 102, 248, 0.28);
  transform: none;
}

.menu-icon {
  display: grid;
  place-items: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  color: currentColor;
  font-size: 0;
  line-height: 0;
}

.menu-icon::before {
  content: "";
  width: 19px;
  height: 19px;
  background: currentColor;
  -webkit-mask: var(--menu-icon) center / contain no-repeat;
  mask: var(--menu-icon) center / contain no-repeat;
}

.menu-dashboard {
  --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h7v7H4zM13 4h7v7h-7zM4 13h7v7H4zM13 13h7v7h-7z'/%3E%3C/svg%3E");
}

.menu-users {
  --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm-8 9a8 8 0 0 1 16 0z'/%3E%3C/svg%3E");
}

.menu-testRecords {
  --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 3h9l4 4v14H7a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3Zm8 2v4h4zM8 11h8v2H8zm0 4h6v2H8z'/%3E%3C/svg%3E");
}

.menu-atlas {
  --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5.5A2.5 2.5 0 0 1 6.5 3H20v15H7a3 3 0 0 0-3 3zm3 13.5h13v2H7a1 1 0 1 1 0-2Zm2-12h7v2H9zm0 4h7v2H9z'/%3E%3C/svg%3E");
}

.menu-settings {
  --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19.4 13.5a7.8 7.8 0 0 0 .1-1.5 7.8 7.8 0 0 0-.1-1.5l2-1.5-2-3.5-2.4 1a7.2 7.2 0 0 0-2.6-1.5L14 2h-4l-.4 2.5A7.2 7.2 0 0 0 7 6L4.6 5 2.6 8.5l2 1.5a7.8 7.8 0 0 0-.1 1.5 7.8 7.8 0 0 0 .1 1.5l-2 1.5 2 3.5 2.4-1a7.2 7.2 0 0 0 2.6 1.5L10 22h4l.4-2.5A7.2 7.2 0 0 0 17 18l2.4 1 2-3.5zM12 15.5a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7Z'/%3E%3C/svg%3E");
}

.menu-analytics {
  --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 19h16v2H4zm1-8h3v6H5zm5-6h3v12h-3zm5 4h3v8h-3z'/%3E%3C/svg%3E");
}

.menu-permissions {
  --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2 4 5v6c0 5 3.4 9.7 8 11 4.6-1.3 8-6 8-11V5zm1 6v5h4v2h-6V8z'/%3E%3C/svg%3E");
}

.menu-logs {
  --menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 3h8l4 4v14H7a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2Zm7 1.5V8h3.5zM8 11h8v2H8zm0 4h8v2H8z'/%3E%3C/svg%3E");
}

.sidebar-card {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: auto;
  padding: 12px;
  border-radius: 16px;
  background: #f4f9ff;
}

.avatar-dot {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #d8a15c, #9b5c21);
}

.main {
  min-width: 0;
  padding: 2px 0 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 16px 20px;
  border: 1px solid rgba(22, 119, 255, 0.06);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topbar-actions,
.button-group,
.panel-head,
.inline-fields,
.upload-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.panel-head {
  justify-content: space-between;
  margin-bottom: 18px;
}

.global-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 280px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #dbe7f3;
  border-radius: 999px;
  background: #fff;
}

.global-search input {
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.message {
  position: sticky;
  top: 10px;
  z-index: 5;
  margin-bottom: 14px;
  padding: 12px 16px;
  border-radius: 14px;
  color: #146b38;
  background: #eaf8ef;
  box-shadow: 0 8px 24px rgba(20, 107, 56, 0.08);
}

.message.error {
  color: #a8241c;
  background: #fff0ed;
}

.page {
  display: grid;
  gap: 18px;
}

.hero-card,
.panel,
.stat-card,
.atlas-card {
  border: 1px solid rgba(22, 119, 255, 0.08);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.hero-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 142px;
  padding: 26px;
  background:
    radial-gradient(circle at 86% 36%, rgba(22, 119, 255, 0.2), transparent 24%),
    linear-gradient(135deg, #ffffff 0%, #eff8ff 58%, #fff 100%);
}

.hero-card p:not(.eyebrow) {
  margin-top: 8px;
  color: var(--muted);
}

.panel {
  padding: 20px;
}

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

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

.stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 86px;
  padding: 16px;
}

.stat-card strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.stat-card input {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 700;
}

.stat-icon {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: #fff;
  font-weight: 800;
}

.blue { background: #1677ff; }
.green { background: #18a058; }
.purple { background: #7c5cff; }
.orange { background: #f08a24; }
.cyan { background: #20a7c9; }
.violet { background: #9d6bff; }

.data-table {
  display: grid;
  gap: 8px;
  overflow-x: auto;
}

.data-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 8px;
  align-items: center;
  min-width: 620px;
  padding: 10px;
  border: 1px solid #e4edf7;
  border-radius: 12px;
  background: rgba(249, 252, 255, 0.8);
}

.data-row.head {
  color: #68829a;
  font-size: 13px;
  font-weight: 700;
  background: #f2f8ff;
}

.users-row {
  grid-template-columns: 1.3fr 1fr 1.2fr 0.9fr 0.6fr 0.6fr 0.7fr 0.9fr;
  min-width: 1040px;
}

.filter-row {
  grid-template-columns: 0.7fr 1fr 1.7fr 1.4fr 1.4fr;
  min-width: 980px;
}

.category-row {
  grid-template-columns: 0.7fr 1fr 1.4fr 1.4fr;
  min-width: 760px;
}

.feature-row {
  grid-template-columns: 0.8fr 1fr 2fr;
  min-width: 680px;
}

.account-row {
  grid-template-columns: 1fr 1fr 1fr 0.7fr;
  min-width: 680px;
}

.logs-row {
  grid-template-columns: 1.1fr 0.8fr 0.8fr 1.6fr 0.9fr 0.6fr;
  min-width: 980px;
}

.filter-panel,
.table-panel {
  border: 1px solid rgba(22, 119, 255, 0.08);
  border-radius: 22px;
  background: var(--card-solid);
  box-shadow: var(--shadow);
}

.filter-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr)) auto;
  gap: 14px;
  align-items: end;
}

.filter-grid label,
.detail-grid label {
  display: grid;
  gap: 7px;
  color: #40576f;
  font-size: 13px;
  font-weight: 700;
}

.filter-actions,
.batch-actions,
.pagination {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-actions {
  justify-content: flex-end;
  min-width: 168px;
}

.batch-actions {
  padding-top: 14px;
  border-top: 1px dashed #dce8f5;
}

.table-panel {
  padding: 18px;
  overflow: hidden;
}

.table-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  color: #65768b;
}

.table-summary strong {
  color: var(--text);
  font-size: 17px;
}

.management-table {
  display: grid;
  gap: 0;
  overflow-x: auto;
  border: 1px solid #e5edf7;
  border-radius: 14px;
  background: #fff;
}

.management-row {
  display: grid;
  align-items: center;
  gap: 12px;
  min-width: 1120px;
  padding: 14px 16px;
  border-bottom: 1px solid #edf2f7;
  color: #536579;
}

.management-row:last-child {
  border-bottom: 0;
}

.management-row.head {
  color: #2f4156;
  font-weight: 800;
  background: #eaf4ff;
}

.management-row input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  padding: 0;
  border-radius: 4px;
}

.user-table .management-row {
  grid-template-columns: 38px 1.2fr 1.05fr 1fr 0.72fr 0.72fr 0.72fr 1.08fr 0.6fr;
}

.atlas-filter-grid {
  grid-template-columns: repeat(3, minmax(180px, 1fr)) auto;
}

.record-filter-grid {
  grid-template-columns: repeat(6, minmax(140px, 1fr)) auto;
}

.record-table .management-row {
  grid-template-columns: 38px 1fr 1.05fr 1.1fr 0.85fr 1.15fr 0.6fr 0.7fr 0.7fr 0.55fr;
  min-width: 1220px;
}

.atlas-table .management-row {
  grid-template-columns: 38px 92px 0.85fr 1fr 1.1fr 1.1fr 1.5fr 0.9fr;
  min-width: 1160px;
}

.table-thumb {
  width: 72px;
  height: 56px;
  object-fit: contain;
  border: 1px solid #edf2f7;
  border-radius: 10px;
  background: #fff8ed;
}

.tag-cell {
  color: #9b6a2f;
}

.text-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

button.text-button.danger {
  color: #d03050;
}

.atlas-editor-modal {
  width: min(860px, 100%);
}

.atlas-editor-grid .wide {
  grid-column: 1 / -1;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #edf2f7;
}

.strong {
  color: var(--text);
  font-weight: 800;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-style: normal;
  font-weight: 700;
}

.status-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status-dot.green {
  color: #22a833;
  background: transparent;
}

.status-dot.red {
  color: #ff3b4f;
  background: transparent;
}

.pagination {
  justify-content: center;
  margin-top: 18px;
}

.pagination button {
  min-width: 38px;
  padding: 0 12px;
}

.pagination button.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(180deg, #2990ff, #126de2);
}

.pagination select {
  width: auto;
  min-width: 106px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12, 25, 42, 0.42);
}

.user-detail-modal {
  width: min(720px, 100%);
  padding: 22px;
  border: 1px solid rgba(22, 119, 255, 0.12);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(13, 41, 77, 0.22);
}

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

.detail-grid .wide {
  grid-column: 1 / -1;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}

.pill.green {
  color: #15803d;
  background: #e9f8ef;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 10px;
  align-items: start;
}

.timeline-item > span {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--blue);
}

.timeline strong,
.timeline small {
  display: block;
}

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

.atlas-card {
  display: grid;
  grid-template-columns: 108px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
}

.atlas-card img {
  width: 108px;
  height: 88px;
  object-fit: contain;
  border-radius: 14px;
  background: #fff8ed;
}

.atlas-card strong,
.atlas-card small,
.atlas-card p {
  display: block;
}

.tag-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag-line span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #8d5b25;
  background: #fff2dc;
  font-size: 12px;
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px;
  border-radius: 14px;
  background: #f3f8fe;
}

.settings-tabs button {
  color: #526a84;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.settings-tabs button.active {
  color: #fff;
  background: linear-gradient(180deg, #b93026, #941e17);
}

.settings-body {
  padding-top: 4px;
}

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

.form-grid label,
.mini-list label,
.inline-fields label,
.upload-box label {
  display: grid;
  gap: 6px;
  color: #4c6075;
  font-size: 13px;
  font-weight: 700;
}

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

.inline-fields {
  align-items: end;
  margin-bottom: 14px;
}

.inline-fields label {
  min-width: 260px;
}

.upload-box {
  align-items: end;
  margin-top: 14px;
}

.upload-box label {
  width: 260px;
}

.upload-result {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  background: #f7fbff;
}

.upload-result code {
  word-break: break-all;
  color: #0f5fb5;
}

.upload-result img {
  max-width: 260px;
  max-height: 180px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
}

.trend-card {
  margin-top: 20px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff, #fff);
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  height: 150px;
  margin-top: 18px;
}

.bars span {
  position: relative;
  flex: 1;
  min-height: 12px;
  border-radius: 12px 12px 4px 4px;
  background: linear-gradient(180deg, #61b7ff, #1677ff);
}

.bars b {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  color: #526a84;
  font-size: 12px;
}

.role-card {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #e4edf7;
  border-radius: 14px;
  background: #fbfdff;
}

.role-head {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 10px;
}

@media (max-width: 1180px) {
  .admin-shell {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .brand div,
  .menu button span:last-child,
  .sidebar-card div {
    display: none;
  }

  .menu button {
    justify-content: center;
  }

  .stat-grid,
  .card-list,
  .grid.two,
  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .admin-shell {
    display: block;
    padding: 10px;
  }

  .sidebar {
    position: static;
    height: auto;
    margin-bottom: 12px;
  }

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

  .topbar,
  .hero-card,
  .panel-head,
  .topbar-actions,
  .inline-fields,
  .upload-box {
    align-items: stretch;
    flex-direction: column;
  }

  .global-search,
  .upload-box label,
  .inline-fields label {
    width: 100%;
  }

  .stat-grid,
  .card-list,
  .grid.two,
  .form-grid,
  .mini-list,
  .filter-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }
}
