:root {
  --admin-blue: #4b73dd;
  --admin-blue-dark: #4167cf;
  --admin-sidebar: #f6f7fb;
  --admin-border: #e7e9f0;
  --text: #101827;
  --muted: #6b7280;
  --green: #15b99a;
  --red: #f45d55;
  --nav-blue: #173fb3;
  --page-bg: #f7f8fb;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--text);
  background: var(--page-bg);
}

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

button {
  cursor: pointer;
}

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

.site-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 75% 28%, rgba(42, 98, 216, 0.08), transparent 32%),
    #fbfbfd;
}

.public-header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: min(1720px, calc(100vw - 80px));
  margin: 18px auto 0;
  padding: 0 4px;
}

.public-brand {
  display: grid;
  grid-template-columns: 52px auto 24px;
  gap: 10px;
  align-items: center;
}

.coin-logo {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  background: #ff9344;
}

.brand-notice {
  display: block;
  margin-bottom: 2px;
  color: #111827;
  font-size: 16px;
  line-height: 1.15;
}

.brand-domain {
  display: block;
  color: #35a6df;
  font-size: 28px;
  line-height: 1;
}

.verified-mark {
  position: relative;
  display: inline-block;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #33d395;
}

.verified-mark::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  width: 10px;
  height: 6px;
  border-left: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(-45deg);
}

.dot-menu {
  display: grid;
  grid-template-columns: repeat(2, 7px);
  gap: 6px;
  width: 42px;
  height: 42px;
  margin-top: 12px;
  align-content: center;
  justify-content: center;
  border: 0;
  background: transparent;
}

.dot-menu span {
  width: 6px;
  height: 6px;
  border: 2px solid #14336e;
  border-radius: 50%;
}

.menu-panel {
  position: absolute;
  top: 58px;
  right: 0;
  z-index: 5;
  display: none;
  min-width: 180px;
  padding: 8px;
  border: 1px solid #e7ebf3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
}

.menu-panel.is-open {
  display: block;
}

.menu-panel a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  color: #1f2937;
  font-size: 14px;
}

.menu-panel a:hover {
  background: #f5f7fb;
}

.public-main {
  width: min(1240px, calc(100vw - 80px));
  margin: 84px auto 56px;
}

.simple-main {
  width: min(980px, calc(100vw - 40px));
  margin: 56px auto;
}

.simple-nav-board {
  display: block;
  min-height: 0;
  padding: 54px 44px;
  border-radius: 30px;
}

.simple-link-grid {
  grid-template-columns: repeat(5, minmax(96px, 1fr));
  gap: 34px 26px;
}

.nav-board {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 34px;
  min-height: 640px;
  padding: 76px 70px 56px;
  border-radius: 0 36px 36px 36px;
  background: #fff;
  box-shadow: 0 24px 75px rgba(41, 73, 132, 0.08);
}

.category-tabs {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 58px;
}

.category-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 18px;
  border: 0;
  border-radius: 5px;
  color: #626a77;
  background: transparent;
  font-size: 21px;
  font-weight: 700;
  white-space: nowrap;
}

.category-tab.active {
  color: #fff;
  background: #173fb3;
  box-shadow: 0 12px 24px rgba(23, 63, 179, 0.18);
}

.nav-content {
  min-width: 0;
}

.nav-notice {
  min-height: 28px;
  margin: 0 0 28px;
  color: #6b7280;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(100px, 1fr));
  gap: 34px 32px;
  align-items: start;
}

.link-item {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: #0f172a;
  font-size: 19px;
  font-weight: 700;
  text-align: center;
}

.link-item:hover .nav-icon-tile {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(19, 38, 79, 0.16);
}

.nav-icon-tile {
  position: relative;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 9px 22px rgba(16, 24, 40, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.nav-icon-tile::before {
  content: "";
  position: absolute;
  inset: -18px;
  background:
    radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.72), transparent 26%),
    radial-gradient(circle at 85% 80%, rgba(255, 255, 255, 0.22), transparent 34%);
}

.nav-icon-tile span {
  position: relative;
  z-index: 1;
}

.nav-icon-tile.light {
  color: #111827;
}

.quick-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.quick-card {
  display: flex;
  gap: 14px;
  align-items: center;
  min-height: 82px;
  padding: 18px;
  border: 1px solid #eef1f7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(41, 73, 132, 0.05);
}

.quick-card-icon {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: #ffae3b;
  font-size: 20px;
  font-weight: 700;
}

.quick-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
}

.quick-card p {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
}

.public-footer {
  width: min(1240px, calc(100vw - 80px));
  margin: 0 auto 40px;
  color: #6b7280;
  font-size: 13px;
}

.list-page .public-main {
  margin-top: 54px;
}

.content-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.content-item {
  display: flex;
  min-height: 116px;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid #eef1f7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(41, 73, 132, 0.05);
}

.content-icon {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: #173fb3;
  font-weight: 800;
}

.content-icon.light {
  color: #111827;
}

.content-body h1 {
  margin: 0 0 18px;
  font-size: 26px;
}

.content-body h2 {
  margin: 0 0 8px;
  font-size: 17px;
}

.content-body p {
  margin: 0;
  color: #6b7280;
  line-height: 1.6;
}

.admin-page {
  min-width: 1160px;
  min-height: 100vh;
  background: #eef1f6;
  color: #111827;
  font-size: 12px;
}

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

.admin-shell.sidebar-collapsed .admin-logo,
.admin-shell.sidebar-collapsed .admin-sidebar {
  width: 56px;
}

.admin-shell.sidebar-collapsed .admin-main {
  margin-left: 56px;
}

.admin-shell.sidebar-collapsed .admin-user {
  justify-content: center;
  padding: 10px 0;
}

.admin-shell.sidebar-collapsed .admin-user-text,
.admin-shell.sidebar-collapsed .admin-search-side,
.admin-shell.sidebar-collapsed .side-label,
.admin-shell.sidebar-collapsed .side-caret,
.admin-shell.sidebar-collapsed .side-children {
  display: none;
}

.admin-shell.sidebar-collapsed .side-item,
.admin-shell.sidebar-collapsed .side-subitem {
  justify-content: center;
  padding: 0;
}

.admin-shell.sidebar-collapsed .side-icon {
  width: 56px;
}

.admin-topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  display: flex;
  height: 40px;
  color: #fff;
  background: var(--admin-blue);
  box-shadow: 0 1px 2px rgba(30, 54, 102, 0.18);
}

.admin-logo {
  display: grid;
  width: 184px;
  place-items: center;
  background: var(--admin-blue-dark);
  font-size: 16px;
  font-weight: 700;
  transition: width 0.18s ease;
}

.admin-collapse {
  display: grid;
  width: 44px;
  place-items: center;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 18px;
}

.admin-top-title {
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-weight: 700;
  background: rgba(43, 81, 174, 0.26);
}

.admin-top-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  padding: 0 14px;
  white-space: nowrap;
}

.admin-top-actions a,
.admin-top-actions button {
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.avatar {
  display: inline-grid;
  width: 20px;
  height: 20px;
  margin-right: 6px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  color: #91a0bd;
}

.admin-sidebar {
  position: fixed;
  top: 40px;
  bottom: 0;
  left: 0;
  z-index: 10;
  width: 184px;
  overflow-y: auto;
  background: var(--admin-sidebar);
  border-right: 1px solid #e8ebf2;
  transition: width 0.18s ease;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
}

.admin-user-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: #ddd;
  color: #aaa;
  font-size: 24px;
}

.online {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  color: #2f3a49;
}

.online::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2ec9a4;
}

.admin-search-side {
  position: relative;
  padding: 7px 8px 13px;
}

.admin-search-side input {
  width: 100%;
  height: 30px;
  padding: 0 28px 0 10px;
  border: 1px solid #d5d9e3;
  background: #fff;
  color: #475569;
}

.admin-search-side span {
  position: absolute;
  top: 14px;
  right: 17px;
  color: #8992a3;
}

.side-nav {
  padding: 0;
}

.side-item,
.side-subitem {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 41px;
  padding: 0 13px;
  border: 0;
  color: #4b5563;
  background: transparent;
  text-align: left;
}

.side-item:hover,
.side-subitem:hover,
.side-item.active,
.side-subitem.active {
  background: #f0f0f3;
  color: #111827;
  font-weight: 700;
}

.side-item.active::before,
.side-subitem.active::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: var(--admin-blue);
}

.side-icon {
  display: inline-grid;
  width: 21px;
  place-items: center;
  color: #444;
}

.side-caret {
  margin-left: auto;
  color: #6b7280;
}

.side-children {
  display: none;
  padding: 2px 0 8px;
}

.side-children.is-open {
  display: block;
}

.side-subitem {
  padding-left: 31px;
  min-height: 40px;
}

.admin-main {
  margin-left: 184px;
  padding: 52px 12px 32px;
  transition: margin-left 0.18s ease;
}

.admin-panel {
  min-height: 188px;
  padding: 12px;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03);
}

.admin-settings-head {
  padding: 12px 14px 0;
  background: #e9eef4;
}

.admin-settings-head h2 {
  margin: 0 0 4px;
  font-size: 13px;
}

.admin-settings-head p {
  margin: 0;
  font-size: 12px;
}

.settings-tab {
  display: inline-flex;
  align-items: center;
  height: 34px;
  margin-top: 17px;
  padding: 0 14px;
  color: #6b7280;
  background: #fff;
}

.settings-form {
  padding: 14px 12px 22px;
  background: #fff;
}

.form-table {
  width: 100%;
  border-collapse: collapse;
}

.form-table th,
.form-table td {
  padding: 7px;
  border-bottom: 1px solid #f0f1f4;
  text-align: left;
  vertical-align: top;
}

.form-table th {
  width: 300px;
  color: #111827;
  font-weight: 700;
  background: #f7f7f8;
}

.form-table tr:nth-child(2n) th,
.form-table tr:nth-child(2n) td {
  background: #fafafa;
}

.admin-input,
.admin-select,
.admin-textarea {
  width: min(900px, 100%);
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid #cfd6e2;
  background: #fff;
  color: #1f2937;
  outline: none;
}

.color-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  width: min(900px, 100%);
}

.color-input {
  width: 42px;
  padding: 2px;
}

.admin-textarea {
  min-height: 84px;
  resize: vertical;
}

.button-row {
  display: flex;
  gap: 6px;
  padding: 6px 0 0 307px;
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: 2px;
  color: #fff;
  background: #3f4d6d;
  font-size: 12px;
  font-weight: 700;
}

.admin-btn.green {
  background: #11c3a3;
}

.admin-btn.mint {
  background: #55c9b8;
}

.admin-btn.red {
  background: #fb695f;
}

.admin-btn.gray {
  color: #3f4857;
  border: 1px solid #d4d9e3;
  background: #fff;
}

.table-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 8px 0;
}

.table-tools {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}

.table-tools input {
  width: 148px;
  height: 26px;
  padding: 0 9px;
  border: 1px solid #cfd6e2;
}

.tool-square {
  display: grid;
  width: 32px;
  height: 26px;
  place-items: center;
  border: 1px solid #d7dce6;
  background: #fff;
  color: #111827;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.data-table th,
.data-table td {
  height: 40px;
  padding: 6px 10px;
  border: 1px solid #eff1f5;
  text-align: center;
  vertical-align: middle;
  word-break: break-word;
}

.data-table th {
  height: 38px;
  color: #111827;
  background: #fff;
  font-weight: 700;
}

.data-table tbody tr:nth-child(2n + 1) {
  background: #f7f7f8;
}

.data-table tbody tr:hover {
  background: #f1f4fa;
}

.check-col {
  width: 36px;
}

.order-col {
  width: 86px;
}

.action-col {
  width: 170px;
}

.url-pill,
.url-edit {
  display: inline-flex;
  align-items: center;
  width: min(260px, 100%);
  height: 26px;
  border: 1px solid #d7dde8;
  background: #fff;
}

.url-pill span {
  display: block;
  max-width: 210px;
  padding: 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.url-pill b,
.url-edit a {
  display: grid;
  width: 26px;
  height: 24px;
  place-items: center;
  border-left: 1px solid #e2e6ef;
  color: #172033;
}

.inline-input {
  width: 100%;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid #d7dde8;
  background: #fff;
  color: #111827;
  outline: none;
}

.inline-input:focus {
  border-color: var(--admin-blue);
  box-shadow: 0 0 0 2px rgba(75, 115, 221, 0.12);
}

.inline-url {
  min-width: 0;
  border: 0;
}

.inline-order {
  width: 70px;
  text-align: center;
}

.inline-textarea {
  min-height: 28px;
  resize: vertical;
}

.inline-icon-cell {
  display: inline-grid;
  grid-template-columns: 24px minmax(42px, 72px);
  gap: 5px;
  align-items: center;
}

.nav-icon-editor {
  grid-template-columns: 24px 54px 26px;
}

.inline-icon-text {
  min-width: 42px;
  padding-left: 5px;
  padding-right: 5px;
  text-align: center;
}

.inline-color {
  width: 26px;
  height: 26px;
  padding: 1px;
  border: 1px solid #d7dde8;
  background: #fff;
}

.mini-icon {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 4px;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.mini-icon.light {
  color: #111827;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 22px;
  padding: 0 8px;
  border-radius: 3px;
  color: #0f766e;
  background: #dff8f2;
  border: 0;
  font-weight: 700;
}

.status-pill.disabled {
  color: #9f1239;
  background: #ffe4e6;
}

.row-actions {
  display: inline-flex;
  gap: 4px;
}

.icon-btn {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 0;
  border-radius: 2px;
  color: #fff;
  font-size: 11px;
  line-height: 1;
}

.icon-btn.move {
  background: #34425f;
}

.icon-btn.edit {
  background: #15b99a;
}

.icon-btn.delete {
  background: #f05249;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 8px;
  color: #1f2937;
}

.pager {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pager button,
.pager input,
.page-size {
  height: 27px;
  border: 1px solid #d4d9e3;
  background: #fff;
  color: #374151;
}

.pager button {
  padding: 0 10px;
}

.pager button.active {
  border-color: #3f4d6d;
  color: #fff;
  background: #3f4d6d;
}

.pager input {
  width: 42px;
  padding: 0 5px;
}

.empty-state {
  padding: 70px 20px;
  color: #6b7280;
  text-align: center;
  background: #fff;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.28);
}

.modal {
  width: min(720px, calc(100vw - 32px));
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.25);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 42px;
  padding: 0 14px;
  color: #fff;
  background: var(--admin-blue);
}

.modal-head h3 {
  margin: 0;
  font-size: 14px;
}

.modal-close {
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 18px;
}

.modal-body {
  padding: 16px;
}

.modal-grid {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
}

.modal-grid label {
  color: #374151;
  font-weight: 700;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background: #eef1f6;
}

.login-box {
  width: 360px;
  padding: 28px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.14);
}

.login-box h1 {
  margin: 0;
  color: var(--admin-blue);
  font-size: 28px;
}

.login-box p {
  margin: 8px 0 22px;
  color: #6b7280;
}

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

.login-form input {
  height: 38px;
  padding: 0 12px;
  border: 1px solid #cfd6e2;
  border-radius: 4px;
  outline: none;
}

.login-form button {
  height: 38px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  background: var(--admin-blue);
  font-weight: 700;
}

.login-message {
  min-height: 18px;
  color: #e11d48;
}

@media (max-width: 900px) {
  .site-page {
    background: #fff;
  }

  .public-header {
    width: calc(100vw - 44px);
    margin-top: 18px;
  }

  .public-brand {
    grid-template-columns: 44px auto 22px;
    gap: 9px;
  }

  .coin-logo {
    width: 44px;
    height: 44px;
    font-size: 26px;
  }

  .brand-notice {
    font-size: 15px;
  }

  .brand-domain {
    font-size: 23px;
  }

  .public-main {
    width: 100%;
    margin: 48px 0 34px;
    padding: 0 20px;
  }

  .simple-main {
    width: 100%;
    margin: 28px 0;
    padding: 0 14px;
  }

  .nav-board {
    display: block;
    min-height: 0;
    padding: 26px 24px 34px;
    border-radius: 30px 30px 0 0;
    box-shadow: 0 -18px 55px rgba(39, 57, 105, 0.08);
  }

  .simple-nav-board {
    padding: 28px 12px 36px;
    border-radius: 24px;
  }

  .category-tabs {
    flex-direction: row;
    gap: 14px;
    padding: 0 0 26px;
    overflow-x: auto;
  }

  .category-tab {
    flex: 0 0 auto;
    min-width: 126px;
    min-height: 58px;
    font-size: 19px;
  }

  .nav-notice {
    margin-bottom: 24px;
  }

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

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

  .link-item {
    min-width: 0;
    font-size: clamp(13px, 4vw, 18px);
  }

  .nav-icon-tile {
    width: clamp(48px, 14vw, 60px);
    height: clamp(48px, 14vw, 60px);
    border-radius: 11px;
  }

  .quick-cards {
    grid-template-columns: 1fr;
  }

  .content-list {
    grid-template-columns: 1fr;
  }

  .public-footer {
    width: calc(100vw - 40px);
  }
}

@media (max-width: 430px) {
  .public-main {
    padding: 0;
  }

  .nav-board {
    padding: 24px 18px 32px;
  }

  .category-tabs {
    padding-left: 14px;
    padding-right: 14px;
  }

  .link-grid {
    padding: 0 10px;
  }

  .quick-cards {
    padding: 0 18px;
  }
}
