@font-face {
  font-family: InterLocal;
  src: url("../assets/fonts/inter-latin.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: Barlow;
  src: url("../assets/fonts/barlow-condensed-500-latin.woff2") format("woff2");
  font-display: swap;
}
:root {
  --ink: #34343c;
  --muted: #908e94;
  --line: #e7e3de;
  --paper: #f5f3ef;
  --orange: #ed7658;
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: InterLocal, "PingFang SC", "Microsoft YaHei", sans-serif;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
.admin-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 70% 10%, #eadff4, transparent 34%),
    radial-gradient(circle at 15% 80%, #f6d9cc, transparent 32%), #f5f3ef;
}
.login-card {
  width: min(430px, 100%);
  padding: 38px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 28px 80px rgba(37, 34, 43, 0.13);
}
.login-card > span,
main > header span {
  color: #9a77a8;
  font: 600 10px Barlow;
  letter-spacing: 0.16em;
}
.login-card h1 {
  margin: 10px 0 7px;
  font-size: 28px;
}
.login-card p {
  margin: 0 0 25px;
  color: var(--muted);
  font-size: 12px;
}
.login-card form {
  display: grid;
  gap: 14px;
}
.login-card label {
  display: grid;
  gap: 7px;
  color: #6e6b72;
  font-size: 11px;
  font-weight: 600;
}
.login-card input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  background: #fff;
  font-size: 16px;
  touch-action: manipulation;
}
.login-card input:focus {
  border-color: #d7967e;
  box-shadow: 0 0 0 3px rgba(237, 118, 88, 0.09);
}
.login-card button {
  height: 46px;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: #373a4e;
  font-size: 12px;
  font-weight: 700;
}
.login-card small {
  display: block;
  margin-top: 15px;
  color: #aaa7ad;
  text-align: center;
  font-size: 10px;
}
.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
}
aside {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 25px 18px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #fff;
}
aside > a {
  padding: 0 9px 24px;
  display: grid;
  color: var(--ink);
  text-decoration: none;
}
aside > a b {
  font: 600 23px Barlow;
  letter-spacing: 0.06em;
}
aside > a small {
  color: #a78aaf;
  font: 600 8px Barlow;
  letter-spacing: 0.18em;
}
aside nav {
  display: grid;
  gap: 4px;
}
aside nav button,
.logout {
  height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  color: #77747b;
  background: transparent;
  text-align: left;
  font-size: 11px;
}
.is-active {
  color: #fff !important;
  background: #393d52 !important;
}
.logout {
  margin-top: auto;
  color: #b96558;
}
main {
  min-width: 0;
  padding: 0 32px 40px;
}
main > header {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
main > header h1 {
  margin: 4px 0 0;
  font-size: 22px;
}
#adminName {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #393d52;
  font-size: 12px;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.metric {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.metric span {
  color: var(--muted);
  font-size: 10px;
}
.metric strong {
  margin-top: 9px;
  display: block;
  font: 600 28px Barlow;
}
.panel {
  margin-top: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}
.panel > header {
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
}
.panel h2 {
  margin: 0;
  font-size: 14px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}
th,
td {
  padding: 12px 15px;
  border-bottom: 1px solid #efede9;
  text-align: left;
  font-size: 10px;
}
th {
  color: #929096;
  background: #faf9f7;
  font-weight: 600;
}
td small {
  color: #99969c;
}
.badge {
  padding: 4px 7px;
  border-radius: 7px;
  color: #7b705e;
  background: #f1ece3;
  font-size: 8px;
}
.badge.active,
.badge.approved,
.badge.paid,
.badge.published {
  color: #3f7f61;
  background: #e8f5ed;
}
.badge.disabled,
.badge.rejected,
.badge.cancelled {
  color: #a45f55;
  background: #faeae6;
}
.badge.pending,
.badge.reviewing,
.badge.submitted {
  color: #98723e;
  background: #fff1d9;
}
.wrap-cell {
  min-width: 220px;
  max-width: 340px;
  white-space: normal;
  line-height: 1.55;
}
.actions {
  display: flex;
  gap: 5px;
}
.actions button {
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #69666d;
  background: #fff;
  font-size: 8px;
}
.actions .primary {
  border-color: var(--orange);
  color: #fff;
  background: var(--orange);
}
.empty,
.loading {
  padding: 80px;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
}
.admin-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  padding: 11px 15px;
  border-radius: 10px;
  color: #fff;
  background: #34384d;
  font-size: 10px;
  opacity: 0;
  transform: translateY(10px);
  transition: 0.2s;
}
.admin-toast.is-visible {
  opacity: 1;
  transform: none;
}
@media (max-width: 800px) {
  .admin-shell {
    display: block;
  }
  aside {
    position: static;
    width: 100%;
    height: auto;
    padding: 12px;
    display: block;
  }
  aside > a {
    padding: 5px 8px 12px;
  }
  aside nav {
    display: flex;
    overflow: auto;
  }
  aside nav button {
    flex: 0 0 auto;
  }
  .logout {
    position: absolute;
    right: 12px;
    top: 14px;
  }
  main {
    padding: 0 12px 30px;
  }
  main > header {
    height: 72px;
  }
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  th,
  td {
    padding: 11px 10px;
  }
  .login-card {
    padding: 25px;
  }
}
