:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: #1c2540;
  background: #f5f7fb;
  font-size: 14px;
  line-height: 1.6;
  font-synthesis: none;
  --primary: #6056db;
  --muted: #758097;
  --line: #e7eaf2;
  --danger: #b93846;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #b4adfb;
  outline-offset: 3px;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 26px;
  letter-spacing: -0.7px;
  line-height: 1.3;
}
h2 {
  font-size: 17px;
}
h3 {
  font-size: 14px;
}
.muted,
.sub {
  color: var(--muted);
}
.sub {
  font-size: 12px;
}
.mono {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.2px;
}
.initial {
  padding: 15vh 24px;
  text-align: center;
}
.skip {
  position: fixed;
  top: -100px;
  z-index: 99;
  background: white;
  padding: 12px;
}
.skip:focus {
  top: 0;
}
.layout {
  min-height: 100vh;
}
.sidebar {
  width: 232px;
  position: fixed;
  inset: 0 auto 0 0;
  background: white;
  border-right: 1px solid var(--line);
  padding: 30px 18px;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 0 12px 35px;
}
.mark {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--primary);
  color: white;
  font-size: 25px;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px #6056db25;
}
.brand strong {
  display: block;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.4px;
}
.brand small {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--muted);
}
.nav-label {
  font-size: 11px;
  color: #949cb1;
  margin: 4px 16px 12px;
  letter-spacing: 1px;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 16px;
  border-radius: 10px;
  color: #67728c;
  margin-bottom: 6px;
  font-weight: 550;
}
.nav a:hover {
  background: #f7f6ff;
  text-decoration: none;
}
.nav a.active {
  background: #efedff;
  color: #5b50cf;
}
.nav-icon {
  width: 20px;
  font-size: 19px;
  text-align: center;
  font-weight: 400;
  line-height: 1;
}
.sidebar-foot {
  margin-top: auto;
  padding: 28px 12px 0;
  font-size: 12px;
  color: var(--muted);
}
.sidebar-foot strong {
  font-size: 12px;
  color: #586379;
  font-weight: 500;
}
.main {
  margin-left: 232px;
}
.topbar {
  height: 78px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: #ffffffba;
  padding: 0 36px;
  gap: 16px;
}
.topbar-left,
.topbar-right,
.row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-left {
  color: var(--muted);
  font-size: 13px;
}
.avatar {
  border-radius: 50%;
  width: 30px;
  height: 30px;
  background: #ebe9ff;
  color: #6358d1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 650;
}
.admin-name {
  font-size: 12px;
}
.mobile-menu {
  display: none;
}
.content {
  padding: 32px 36px 52px;
  max-width: 1600px;
  margin: 0 auto;
}
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
.page-head p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}
.eyebrow {
  font-size: 11px;
  color: var(--primary);
  font-weight: 650;
  letter-spacing: 1.5px;
  margin-bottom: 9px;
}
.btn {
  border: 1px solid #dde1ed;
  border-radius: 8px;
  background: white;
  color: #4c5670;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 8px 14px;
  font-weight: 550;
  gap: 6px;
  white-space: nowrap;
  min-height: 38px;
}
.btn:hover {
  background: #f8f9fd;
  text-decoration: none;
}
.btn.primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 3px 7px #6056db15;
}
.btn.primary:hover {
  background: #5349c5;
}
.btn.danger {
  color: var(--danger);
  border-color: #eccdd2;
}
.btn.small {
  padding: 5px 10px;
  min-height: 30px;
  font-size: 12px;
}
.btn.ghost {
  border-color: transparent;
  background: transparent;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}
.card {
  padding: 22px 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
}
.card-label {
  color: #707a91;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.card-symbol {
  color: #9e97e8;
}
.card-value {
  font-size: 32px;
  line-height: 1.25;
  font-weight: 650;
  margin: 12px 0 7px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.7px;
}
.card-note {
  font-size: 12px;
  color: var(--muted);
}
.card-note a {
  font-weight: 500;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  overflow: hidden;
  margin-bottom: 24px;
}
.panel-head {
  padding: 19px 23px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.panel-head small {
  color: var(--muted);
}
.panel-body {
  padding: 23px;
}
.two-col {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 22px;
}
.summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}
.summary-strip span {
  font-size: 12px;
  color: var(--muted);
}
.summary-strip strong {
  font-size: 18px;
  margin-left: 8px;
  color: #313b53;
  font-variant-numeric: tabular-nums;
}
.filters {
  padding: 19px 22px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #647088;
  font-size: 12px;
  min-width: 125px;
}
.field.wide {
  flex: 1;
  min-width: 190px;
}
.field input,
.field select {
  width: 100%;
  max-width: 100%;
  border: 1px solid #dfe4ef;
  border-radius: 7px;
  height: 38px;
  padding: 0 11px;
  color: #303b54;
  background: white;
  min-width: 0;
}
.field input::placeholder {
  color: #a0a8b9;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
}
th {
  font-size: 11px;
  font-weight: 550;
  letter-spacing: 0.2px;
  color: #8891a6;
  background: #fbfcfe;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 16px 22px;
  border-bottom: 1px solid #eff1f6;
  font-size: 13px;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fcfcff;
}
.cell-title {
  display: block;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 550;
  color: #36415e;
}
.cell-sub {
  display: block;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.badge {
  font-size: 11px;
  border-radius: 5px;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  background: #eff1f6;
  color: #758097;
  font-weight: 550;
}
.badge:before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.badge.ok {
  background: #e9f7f1;
  color: #288769;
}
.badge.danger {
  background: #ffedef;
  color: #bf4e60;
}
.badge.warn {
  background: #fff5e4;
  color: #ad7b26;
}
.badge.purple {
  background: #f0edff;
  color: #7663c9;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-top: 1px solid var(--line);
  padding: 16px 22px;
  font-size: 12px;
  color: var(--muted);
}
.empty {
  padding: 58px 24px;
  text-align: center;
  color: var(--muted);
}
.empty strong {
  display: block;
  color: #667087;
  margin-bottom: 5px;
  font-size: 14px;
}
.empty-icon {
  font-size: 27px;
  color: #beb9e5;
  margin-bottom: 10px;
}
.notice {
  padding: 14px 18px;
  background: #f0edff;
  border: 1px solid #e3dffc;
  border-radius: 9px;
  color: #756998;
  font-size: 13px;
  margin-bottom: 20px;
}
.notice.error {
  color: #a43c4c;
  background: #fff0f2;
  border-color: #f4d7dd;
}
.flash:empty {
  display: none;
}
.flash {
  margin-bottom: 20px;
}
.flash .notice {
  margin: 0;
}
.detail-grid {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 18px;
  font-size: 13px;
}
.detail-grid dt {
  color: var(--muted);
}
.detail-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.detail-grid dd .btn {
  white-space: normal;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 24px 0;
}
.detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.activity {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
}
.activity strong {
  display: block;
  font-size: 23px;
  font-weight: 650;
}
.activity span {
  font-size: 12px;
  color: var(--muted);
}
.error-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border-radius: 8px;
  background: #fff4f5;
  color: #aa4b5a;
  padding: 16px;
  font-size: 13px;
}
.settings-form {
  max-width: 580px;
}
.settings-form .field {
  margin-bottom: 20px;
  gap: 8px;
}
.settings-form small {
  color: var(--muted);
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.check input {
  accent-color: var(--primary);
  width: 17px;
  height: 17px;
}
.session {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.session:last-child {
  border-bottom: 0;
}
.device {
  font-size: 12px;
  overflow-wrap: anywhere;
  max-width: 700px;
}
.audit-detail {
  max-width: 400px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 11px;
  color: var(--muted);
}
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 36px 20px;
  background:
    radial-gradient(ellipse at 50% 0, #ece9ff, transparent 65%), #f5f7fb;
}
.login-card {
  width: 100%;
  max-width: 450px;
  padding: 40px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 16px 70px #25294d08;
}
.login-card .brand {
  padding: 0 0 35px;
}
.login-card h1 {
  font-size: 25px;
  margin-bottom: 12px;
}
.login-card p {
  font-size: 13px;
  color: var(--muted);
}
.login-card .btn {
  width: 100%;
  margin-top: 25px;
}
.login-foot {
  font-size: 11px;
  color: #9299ab;
  text-align: center;
  margin-top: 28px;
}
.login-code {
  margin: 23px 0 12px;
  padding: 15px;
  background: #f6f5ff;
  border: 1px solid #e7e3ff;
  border-radius: 10px;
  text-align: center;
}
.login-code strong {
  display: block;
  font-size: 33px;
  letter-spacing: 7px;
  color: #5c51bd;
}
.login-code span {
  font-size: 11px;
  color: var(--muted);
}
.login-message {
  font-size: 12px;
  margin-top: 20px;
  color: var(--muted);
  text-align: center;
}
.loading {
  padding: 70px 20px;
  text-align: center;
  color: var(--muted);
}
.loading:before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  border: 2px solid #e2defb;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 14px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (min-width: 1600px) {
  .content {
    padding-top: 40px;
  }
  .cards {
    gap: 24px;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 205px;
  }
  .main {
    margin-left: 205px;
  }
  .content {
    padding: 26px 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .cards {
    gap: 12px;
  }
  .card {
    padding: 19px;
  }
  .card-value {
    font-size: 28px;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 780px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s;
    box-shadow: 15px 0 50px #1c25401a;
    width: 235px;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main {
    margin-left: 0;
  }
  .topbar {
    height: 66px;
    padding: 0 18px;
  }
  .mobile-menu {
    display: inline-flex;
  }
  .content {
    padding: 24px 18px;
  }
  .admin-name {
    display: none;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .page-head {
    gap: 10px;
    margin-bottom: 20px;
  }
  h1 {
    font-size: 23px;
  }
  .card {
    padding: 18px;
  }
  .card-value {
    font-size: 28px;
  }
  .panel-head {
    padding: 17px 18px;
  }
  .filters {
    padding: 17px;
    gap: 10px;
  }
  .field {
    min-width: 130px;
    flex: 1;
  }
  .filters .btn {
    flex-shrink: 0;
  }
  .panel-body {
    padding: 18px;
  }
  .detail-grid {
    grid-template-columns: 105px minmax(0, 1fr);
    gap: 15px;
  }
  .topbar-left {
    font-size: 12px;
  }
  .topbar-right {
    gap: 5px;
  }
  td,
  th {
    padding-left: 18px;
    padding-right: 18px;
  }
  .session {
    padding: 18px;
    align-items: flex-start;
  }
  .login-card {
    padding: 30px;
  }
  .pagination {
    padding: 15px 18px;
  }
  .summary-strip {
    gap: 15px;
    padding: 17px;
  }
  .summary-strip strong {
    font-size: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
