/* ==========================================================================
   山西绿色生资 · 资料管理后台
   ========================================================================== */

:root {
  --a-green-950: #0b2d52;
  --a-green-900: #103d6b;
  --a-green-800: #154a7d;
  --a-green-700: #1b5e9e;
  --a-green-600: #2270b8;
  --a-green-100: #e7f0f9;
  --a-green-50: #f2f7fc;
  --a-gold: #c0392b;
  --a-gold-soft: #fbecea;
  --a-ink: #1d2b3a;
  --a-ink-2: #3f4e5e;
  --a-muted: #6b7785;
  --a-muted-2: #8a96a3;
  --a-line: #dbe3ec;
  --a-line-strong: #c9d5e2;
  --a-bg: #f4f6f8;
  --a-card: #fff;
  --a-danger: #b3261e;
  --a-warning: #9a6a1f;
  --a-radius: 8px;
  --a-shadow: 0 1px 2px rgba(11, 45, 82, 0.04);
  --a-sans: "Microsoft YaHei", "PingFang SC", "HarmonyOS Sans SC", "Noto Sans SC", system-ui, sans-serif;
  --a-serif: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Songti SC", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--a-sans);
  font-size: 14px;
  line-height: 1.65;
  color: var(--a-ink);
  background: var(--a-bg);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

svg {
  display: block;
}

:focus-visible {
  outline: 2px solid var(--a-green-600);
  outline-offset: 2px;
}

::selection {
  background: var(--a-green-100);
}

[hidden] {
  display: none !important;
}

/* --------------------------------- 登录 --------------------------------- */

.login {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  min-height: 100vh;
  background: #f5f6f8;
}

.login__art {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 54px 58px 42px;
  background: linear-gradient(150deg, #0b2d52 0%, #123f6d 52%, #1a558c 100%);
  color: rgba(255, 255, 255, 0.62);
}

.login__rings {
  position: absolute;
  right: -180px;
  top: -160px;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 80px rgba(255, 255, 255, 0.025), 0 0 0 160px rgba(255, 255, 255, 0.015),
    0 0 0 240px rgba(255, 255, 255, 0.008);
}

.login__art::after {
  content: "";
  position: absolute;
  left: -60px;
  bottom: -160px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  border: 1px solid rgba(194, 162, 90, 0.16);
}

.login__brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: #fff;
  width: fit-content;
}

.login__brand svg {
  width: 48px;
  height: 48px;
}

.login__logo {
  display: grid !important;
  place-items: center;
  width: 52px;
  height: 48px;
  padding: 3px;
  background: #fff;
  border-radius: 4px;
  flex: none;
}

.login__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login__brand span {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.login__brand strong {
  font-family: var(--a-serif);
  font-size: 22px;
  letter-spacing: 0.14em;
}

.login__brand em {
  margin-top: 3px;
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.48);
}

.login__copy {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 60px;
}

.login__eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--a-gold);
}

.login__copy h1 {
  margin-top: 20px;
  font-family: var(--a-serif);
  font-size: clamp(34px, 3.4vw, 50px);
  font-weight: 700;
  line-height: 1.42;
  color: #fff;
  letter-spacing: 0.01em;
}

.login__copy h1 span {
  color: #a9c9e8;
}

.login__copy > p:last-child {
  max-width: 26em;
  margin-top: 22px;
  font-size: 13.5px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.5);
}

.login__features {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 34px;
}

.login__features li {
  position: relative;
  padding-left: 16px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.login__features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--a-gold);
}

.login__org {
  position: relative;
  z-index: 1;
  margin-top: 46px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.35);
}

.login__panel {
  display: grid;
  place-items: center;
  padding: 48px 32px;
  background: radial-gradient(circle at 100% 0%, #eef4ea 0%, transparent 45%), #fbfbf8;
}

.login__form-wrap {
  width: min(382px, 100%);
}

.login__kicker {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--a-green-600);
}

.login__form-wrap h2 {
  margin-top: 12px;
  font-family: var(--a-serif);
  font-size: 30px;
  font-weight: 700;
  color: var(--a-green-950);
  letter-spacing: 0.01em;
}

.login__sub {
  margin-top: 6px;
  font-size: 13px;
  color: var(--a-muted);
}

.login__form {
  margin-top: 32px;
}

.afield {
  display: block;
  margin-bottom: 18px;
}

.afield > span {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 500;
  color: var(--a-ink-2);
}

.afield input,
.afield select,
.afield textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--a-line-strong);
  border-radius: 9px;
  background: #fff;
  font-size: 13.5px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.afield input::placeholder,
.afield textarea::placeholder {
  color: var(--a-muted-2);
}

.afield input:focus,
.afield select:focus,
.afield textarea:focus {
  outline: none;
  border-color: var(--a-green-600);
  box-shadow: 0 0 0 4px rgba(23, 133, 90, 0.1);
}

.afield textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.7;
}

.afield__pw {
  position: relative;
}

.afield__pw input {
  padding-right: 58px;
}

.pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  padding: 5px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 11.5px;
  color: var(--a-muted);
}

.pw-toggle:hover {
  background: var(--a-green-50);
  color: var(--a-green-700);
}

.login__error {
  min-height: 20px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--a-danger);
}

.login__hint {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding: 12px 15px;
  border: 1px dashed var(--a-line-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  color: var(--a-muted);
}

.login__hint strong {
  flex: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--a-green-700);
}

.login__hint span {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  color: var(--a-ink-2);
}

.login__foot {
  margin-top: 34px;
  font-size: 11px;
  color: var(--a-muted-2);
}

.login__foot a {
  color: var(--a-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------------------------------- 框架 --------------------------------- */

.admin {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  width: 246px;
  height: 100vh;
  flex: none;
  padding: 22px 16px 16px;
  background: linear-gradient(180deg, #0b2d52 0%, #103d6b 60%, #0b2d52 100%);
  color: rgba(255, 255, 255, 0.55);
  z-index: 45;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 8px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
}

.side-brand svg {
  width: 40px;
  height: 40px;
  flex: none;
}

.side-logo {
  display: grid !important;
  place-items: center;
  width: 40px;
  height: 38px;
  padding: 2px;
  background: #fff;
  border-radius: 3px;
  flex: none;
}

.side-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.side-brand span {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.side-brand strong {
  font-family: var(--a-serif);
  font-size: 18px;
  letter-spacing: 0.13em;
}

.side-brand em {
  margin-top: 3px;
  font-style: normal;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.4);
}

.side-nav {
  flex: 1;
  margin-top: 16px;
  overflow-y: auto;
}

.side-nav__label {
  padding: 16px 12px 6px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.28);
}

.side-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  height: 42px;
  padding: 0 12px;
  margin: 2px 0;
  border-radius: 9px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.62);
  transition: background 0.18s ease, color 0.18s ease;
}

.side-nav a svg {
  width: 18px;
  height: 18px;
  flex: none;
  opacity: 0.72;
}

.side-nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.side-nav a.is-active {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  font-weight: 500;
}

.side-nav a.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  bottom: 11px;
  width: 2.5px;
  border-radius: 3px;
  background: var(--a-gold);
}

.side-nav a.is-active svg {
  color: #a9c9e8;
  opacity: 1;
}

.side-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--a-gold);
  color: var(--a-green-950);
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}

.side-foot {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.side-site {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.48);
}

.side-site svg {
  width: 15px;
  height: 15px;
}

.side-site:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.side-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 12px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.side-user__avatar,
.topbar-user__avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(145deg, #2b6fa8, #0b2d52);
  color: #fff;
  font-family: var(--a-serif);
  font-size: 14px;
}

.side-user__info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.side-user__info strong {
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-user__info em {
  font-style: normal;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.38);
  margin-top: 2px;
}

.side-user__out {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-left: auto;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
}

.side-user__out svg {
  width: 15px;
  height: 15px;
}

.side-user__out:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.admin-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 35;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 70px;
  padding: 0 30px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--a-line);
}

.topbar-menu {
  display: none;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--a-line-strong);
  border-radius: 9px;
  background: #fff;
}

.topbar-menu svg {
  width: 18px;
  height: 18px;
}

.topbar-title {
  min-width: 0;
}

.topbar-title p {
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--a-muted-2);
}

.topbar-title p span {
  color: var(--a-muted);
}

.topbar-title h1 {
  font-family: var(--a-serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--a-green-950);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--a-line-strong);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  color: var(--a-ink-2);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.topbar-link svg {
  width: 14px;
  height: 14px;
}

.topbar-link:hover {
  border-color: var(--a-green-600);
  color: var(--a-green-700);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 16px;
  border-left: 1px solid var(--a-line);
  font-size: 12px;
  color: var(--a-ink-2);
}

.topbar-user__avatar {
  width: 30px;
  height: 30px;
  font-size: 12px;
}

.view {
  flex: 1;
  padding: 26px 30px 60px;
}

.view-inner {
  max-width: 1360px;
  margin: 0 auto;
}

/* --------------------------------- 通用组件 --------------------------------- */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.page-head__text h2 {
  font-family: var(--a-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--a-green-950);
  letter-spacing: 0.01em;
}

.page-head__text p {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--a-muted);
}

.page-head__actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
}

.abtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.abtn svg {
  width: 15px;
  height: 15px;
}

.abtn:hover {
  transform: translateY(-1px);
}

.abtn--primary {
  background: var(--a-green-800);
  color: #fff;
  box-shadow: 0 8px 18px -12px rgba(13, 74, 52, 0.8);
}

.abtn--primary:hover {
  background: var(--a-green-700);
}

.abtn--ghost {
  background: #fff;
  border-color: var(--a-line-strong);
  color: var(--a-ink-2);
}

.abtn--ghost:hover {
  border-color: var(--a-green-600);
  color: var(--a-green-700);
}

.abtn--danger {
  background: #fff;
  border-color: #e4c9c0;
  color: var(--a-danger);
}

.abtn--danger:hover {
  background: #fdf4f1;
}

.abtn--sm {
  height: 30px;
  padding: 0 10px;
  font-size: 11.5px;
  border-radius: 7px;
}

.abtn--block {
  width: 100%;
}

.abtn--lg {
  height: 46px;
  font-size: 14px;
  border-radius: 10px;
}

.abtn:disabled {
  opacity: 0.55;
  pointer-events: none;
}

.panel {
  background: var(--a-card);
  border: 1px solid var(--a-line);
  border-radius: var(--a-radius);
  box-shadow: var(--a-shadow);
  min-width: 0;
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--a-line);
}

.panel__title {
  font-family: var(--a-serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--a-green-950);
}

.panel__title small {
  margin-left: 8px;
  font-family: var(--a-sans);
  font-size: 10.5px;
  font-weight: 400;
  color: var(--a-muted-2);
}

.panel__link {
  font-size: 11.5px;
  color: var(--a-muted);
}

.panel__link:hover {
  color: var(--a-green-700);
}

.panel__body {
  padding: 20px;
  min-width: 0;
}

/* --------------------------------- 工作台 --------------------------------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--a-line);
  border-radius: var(--a-radius);
  box-shadow: var(--a-shadow);
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -28px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--a-green-50);
  opacity: 0.7;
}

.stat-card__icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--a-green-50);
  color: var(--a-green-700);
}

.stat-card__icon svg {
  width: 18px;
  height: 18px;
}

.stat-card__label {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--a-muted);
}

.stat-card__value {
  position: relative;
  z-index: 1;
  margin-top: 2px;
  font-family: var(--a-serif);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--a-green-950);
  font-variant-numeric: tabular-nums;
}

.stat-card__value small {
  margin-left: 3px;
  font-family: var(--a-sans);
  font-size: 11px;
  font-weight: 400;
  color: var(--a-muted-2);
}

.stat-card__meta {
  position: relative;
  z-index: 1;
  margin-top: 6px;
  font-size: 10.5px;
  color: var(--a-muted-2);
}

.stat-card__meta em {
  font-style: normal;
  color: var(--a-green-600);
}

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.dash-col {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 196px;
  padding-top: 8px;
  min-width: 0;
}

.chart__col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 8px;
}

.chart__bar-wrap {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.chart__bar {
  width: min(100%, 38px);
  min-height: 3px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #4a8ec5, #154a7d);
  transition: height 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.chart__col:hover .chart__bar {
  background: linear-gradient(180deg, #5b9bd0, #1b5e9e);
}

.chart__value {
  font-size: 10.5px;
  color: var(--a-muted);
  font-variant-numeric: tabular-nums;
}

.chart__label {
  font-size: 10px;
  color: var(--a-muted-2);
  font-variant-numeric: tabular-nums;
}

.dist {
  display: grid;
  gap: 14px;
}

.dist__row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
}

.dist__name {
  font-size: 12px;
  color: var(--a-ink-2);
}

.dist__track {
  display: block;
  height: 7px;
  border-radius: 4px;
  background: #eef2ee;
  overflow: hidden;
}

.dist__bar {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #5b9bd0, #154a7d);
  min-width: 3px;
}

.dist__val {
  font-size: 11px;
  color: var(--a-muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.list-rows {
  display: grid;
  min-width: 0;
}

.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--a-line);
  min-width: 0;
}

.list-row:last-child {
  border-bottom: 0;
}

.list-row__main {
  min-width: 0;
  flex: 1;
}

.list-row__main strong {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--a-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-row__main small {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--a-muted-2);
}

.list-row__side {
  flex: none;
  font-size: 11px;
  color: var(--a-muted);
  font-variant-numeric: tabular-nums;
}

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quick-action {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--a-line);
  border-radius: 10px;
  background: #fbfcfa;
  font-size: 12px;
  color: var(--a-ink-2);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.quick-action svg {
  width: 16px;
  height: 16px;
  color: var(--a-green-700);
}

.quick-action:hover {
  border-color: var(--a-green-600);
  background: var(--a-green-50);
}

/* --------------------------------- 文档列表 --------------------------------- */

.tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--a-line);
  border-radius: 9px;
  background: #fff;
}

.tab {
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 11.5px;
  color: var(--a-muted);
}

.tab:hover {
  color: var(--a-green-700);
}

.tab.is-active {
  background: var(--a-green-50);
  color: var(--a-green-800);
  font-weight: 500;
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.toolbar-row .spacer {
  flex: 1;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 250px;
  height: 36px;
  padding-left: 12px;
  border: 1px solid var(--a-line-strong);
  border-radius: 8px;
  background: #fff;
}

.search-box svg {
  width: 15px;
  height: 15px;
  color: var(--a-muted-2);
  flex: none;
}

.search-box input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 10px;
  border: 0;
  background: transparent;
  font-size: 12px;
  outline: none;
}

.search-box input::placeholder {
  color: var(--a-muted-2);
}

.select {
  height: 36px;
  padding: 0 30px 0 11px;
  border: 1px solid var(--a-line-strong);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  color: var(--a-ink-2);
  cursor: pointer;
}

.table-card {
  background: #fff;
  border: 1px solid var(--a-line);
  border-radius: var(--a-radius);
  box-shadow: var(--a-shadow);
  overflow: hidden;
}

.table-scroll {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  padding: 11px 16px;
  background: #fafbf9;
  border-bottom: 1px solid var(--a-line);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--a-muted);
  white-space: nowrap;
}

.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--a-line);
  font-size: 12.5px;
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: #fbfcfa;
}

.doc-cell {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-width: 0;
}

.doc-cell__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 39px;
  flex: none;
  border: 1px solid var(--a-line);
  border-radius: 7px;
  background: #f4f8f3;
  color: var(--a-green-700);
}

.doc-cell__icon svg {
  width: 16px;
  height: 16px;
}

.doc-cell__icon em {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1px 0;
  border-radius: 0 0 6px 6px;
  background: var(--a-green-800);
  color: #fff;
  font-style: normal;
  font-size: 7px;
  letter-spacing: 0.04em;
  text-align: center;
}

.doc-cell__text {
  min-width: 0;
}

.doc-cell__text strong {
  display: block;
  max-width: 460px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--a-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-cell__text small {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--a-muted-2);
}

.cell-muted {
  color: var(--a-muted);
  font-size: 11.5px;
  white-space: nowrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--a-green-50);
  color: var(--a-green-700);
  font-size: 10.5px;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--a-green-600);
}

.status-pill--draft {
  background: #f5f2e8;
  color: var(--a-warning);
}

.status-pill--draft::before {
  background: var(--a-gold);
}

.status-pill--unread {
  background: #fdf3ee;
  color: var(--a-danger);
}

.status-pill--unread::before {
  background: var(--a-danger);
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  font-size: 11px;
  color: var(--a-muted);
  white-space: nowrap;
}

.icon-btn svg {
  width: 14px;
  height: 14px;
}

.icon-btn:hover {
  background: var(--a-green-50);
  color: var(--a-green-700);
}

.icon-btn--danger:hover {
  background: #fdf2ee;
  color: var(--a-danger);
}

.table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-top: 1px solid var(--a-line);
  font-size: 11px;
  color: var(--a-muted);
}

.pager-mini {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pager-mini a,
.pager-mini span {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border: 1px solid var(--a-line);
  border-radius: 6px;
  font-size: 11.5px;
  color: var(--a-ink-2);
  background: #fff;
}

.pager-mini a:hover {
  border-color: var(--a-green-600);
  color: var(--a-green-700);
}

.pager-mini .is-active {
  background: var(--a-green-800);
  border-color: var(--a-green-800);
  color: #fff;
}

.pager-mini .is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.empty {
  padding: 64px 24px;
  text-align: center;
}

.empty__icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--a-green-50);
  color: var(--a-green-600);
}

.empty__icon svg {
  width: 23px;
  height: 23px;
}

.empty h3 {
  margin-top: 14px;
  font-family: var(--a-serif);
  font-size: 17px;
  color: var(--a-green-950);
}

.empty p {
  margin-top: 5px;
  font-size: 12px;
  color: var(--a-muted);
}

.empty .abtn {
  margin-top: 18px;
}

/* --------------------------------- 编辑器 --------------------------------- */

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 318px;
  gap: 18px;
  align-items: start;
}

.editor-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.editor-side {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 88px;
}

.form-card {
  background: #fff;
  border: 1px solid var(--a-line);
  border-radius: var(--a-radius);
  box-shadow: var(--a-shadow);
  overflow: hidden;
}

.form-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--a-line);
}

.form-card__head h3 {
  font-family: var(--a-serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--a-green-950);
}

.form-card__head span {
  font-size: 10.5px;
  color: var(--a-muted-2);
}

.form-card__body {
  padding: 18px;
}

.form-card__body > .afield:last-child {
  margin-bottom: 0;
}

.afield--inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.afield small {
  display: block;
  margin-top: 5px;
  font-size: 10.5px;
  color: var(--a-muted-2);
}

.afield input.title-input {
  width: 100%;
  padding: 9px 2px;
  border: 0;
  border-bottom: 1px solid var(--a-line);
  border-radius: 0;
  font-family: var(--a-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--a-green-950);
  background: transparent;
  box-shadow: none;
}

.afield input.title-input:focus {
  outline: none;
  border-bottom-color: var(--a-green-600);
  box-shadow: none;
}

.afield input.title-input::placeholder {
  color: #bcc8c0;
  font-weight: 400;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--a-line);
  background: #fbfcfa;
}

.editor-toolbar button {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 28px;
  padding: 0 7px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--a-ink-2);
  font-size: 11.5px;
}

.editor-toolbar button:hover {
  background: #eef3ee;
  color: var(--a-green-800);
}

.editor-toolbar .sep {
  width: 1px;
  height: 16px;
  margin: 0 5px;
  background: var(--a-line);
}

.editor-area {
  min-height: 360px;
  max-height: 720px;
  overflow-y: auto;
  padding: 20px 22px;
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--a-ink-2);
  outline: none;
}

.editor-area:empty::before {
  content: attr(data-placeholder);
  color: #b9c6bd;
  pointer-events: none;
}

.editor-area h2 {
  margin: 18px 0 6px;
  font-family: var(--a-serif);
  font-size: 20px;
  color: var(--a-green-900);
}

.editor-area h3 {
  margin: 16px 0 5px;
  font-family: var(--a-serif);
  font-size: 16px;
  color: var(--a-green-900);
}

.editor-area p {
  margin: 8px 0;
}

.editor-area ul,
.editor-area ol {
  margin: 8px 0;
  padding-left: 22px;
}

.editor-area ul {
  list-style: disc;
}

.editor-area ol {
  list-style: decimal;
}

.editor-area blockquote {
  margin: 12px 0;
  padding: 10px 14px;
  border-left: 3px solid var(--a-green-600);
  background: var(--a-green-50);
  border-radius: 0 6px 6px 0;
  color: var(--a-muted);
}

.editor-area table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
}

.editor-area th,
.editor-area td {
  padding: 6px 8px;
  border: 1px solid var(--a-line);
  font-size: 12px;
}

.editor-area th {
  background: #f4f7f3;
}

.attachment-existing {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.attachment-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--a-line);
  border-radius: 8px;
  background: #fbfcfa;
}

.attachment-item__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 6px;
  background: var(--a-green-50);
  color: var(--a-green-700);
}

.attachment-item__icon svg {
  width: 14px;
  height: 14px;
}

.attachment-item__info {
  min-width: 0;
  flex: 1;
}

.attachment-item__info strong {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-item__info small {
  display: block;
  margin-top: 1px;
  font-size: 10px;
  color: var(--a-muted-2);
}

.dropzone {
  display: block;
  padding: 22px 14px;
  border: 1px dashed var(--a-line-strong);
  border-radius: 9px;
  background: #fbfcfa;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.dropzone:hover,
.dropzone.is-drag {
  border-color: var(--a-green-600);
  background: var(--a-green-50);
}

.dropzone svg {
  width: 22px;
  height: 22px;
  margin: 0 auto;
  color: var(--a-green-600);
}

.dropzone strong {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--a-ink-2);
}

.dropzone small {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--a-muted-2);
}

.file-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.file-list__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 7px;
  background: var(--a-green-50);
  font-size: 11px;
  color: var(--a-ink-2);
}

.file-list__item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-list__item button {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--a-muted);
  font-size: 15px;
  line-height: 1;
}

.ahelp {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #faf7ee;
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--a-muted);
}

.ahelp svg {
  width: 13px;
  height: 13px;
  flex: none;
  margin-top: 2px;
  color: var(--a-gold);
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--a-line);
}

.switch-row:last-child {
  border-bottom: 0;
}

.switch-row span {
  font-size: 12px;
  color: var(--a-ink-2);
}

.switch-row small {
  display: block;
  font-size: 10px;
  color: var(--a-muted-2);
}

.switch {
  position: relative;
  display: inline-flex;
  width: 38px;
  height: 22px;
  flex: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}

.switch i {
  width: 100%;
  height: 100%;
  border-radius: 11px;
  background: #dbe3dc;
  transition: background 0.2s ease;
}

.switch i::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
  transition: transform 0.2s ease;
}

.switch input:checked + i {
  background: var(--a-green-600);
}

.switch input:checked + i::after {
  transform: translateX(16px);
}

.sticky-save {
  position: sticky;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--a-line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  box-shadow: 0 14px 30px -22px rgba(6, 37, 27, 0.4);
}

/* --------------------------------- 分类 --------------------------------- */

.cat-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.cat-list {
  display: grid;
}

.cat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--a-line);
}

.cat-item:last-child {
  border-bottom: 0;
}

.cat-item__no {
  width: 24px;
  flex: none;
  font-family: var(--a-serif);
  font-size: 12px;
  color: var(--a-muted-2);
  font-variant-numeric: tabular-nums;
}

.cat-item__main {
  min-width: 0;
  flex: 1;
}

.cat-item__main strong {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
}

.cat-item__main small {
  display: block;
  margin-top: 1px;
  font-size: 10.5px;
  color: var(--a-muted-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat-item__count {
  flex: none;
  font-size: 10.5px;
  color: var(--a-muted);
}

.cat-item__actions {
  display: flex;
  gap: 2px;
  flex: none;
}

/* --------------------------------- 留言 --------------------------------- */

.message-list {
  display: grid;
  gap: 12px;
}

.message-card {
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--a-line);
  border-radius: 12px;
  box-shadow: var(--a-shadow);
  transition: border-color 0.18s ease;
}

.message-card.is-unread {
  border-left: 3px solid var(--a-gold);
}

.message-card__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.message-card__who {
  min-width: 0;
  flex: 1;
}

.message-card__who strong {
  font-size: 13px;
  font-weight: 600;
}

.message-card__who span {
  margin-left: 8px;
  font-size: 11px;
  color: var(--a-muted);
}

.message-card__who small {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--a-muted-2);
}

.message-card__time {
  flex: none;
  font-size: 10.5px;
  color: var(--a-muted-2);
}

.message-card__text {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #fafbf9;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--a-ink-2);
}

.message-card__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.message-card__foot .spacer {
  flex: 1;
}

/* --------------------------------- 设置 --------------------------------- */

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.settings-grid .afield--full {
  grid-column: 1 / -1;
}

.settings-aside {
  display: grid;
  gap: 16px;
}

.preview-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: var(--a-radius);
  background: linear-gradient(150deg, #0b2d52, #154a7d 60%, #1a558c);
  color: rgba(255, 255, 255, 0.65);
}

.preview-card h3 {
  margin-top: 12px;
  font-family: var(--a-serif);
  font-size: 20px;
  line-height: 1.5;
  color: #fff;
}

.preview-card p {
  margin-top: 8px;
  font-size: 11.5px;
  line-height: 1.8;
}

.preview-card .brandline {
  font-family: var(--a-serif);
  font-size: 15px;
  letter-spacing: 0.1em;
  color: var(--a-gold-soft);
}

/* --------------------------------- 账号 --------------------------------- */

.account-wrap {
  max-width: 520px;
}

.account-avatar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px dashed var(--a-line);
}

.account-avatar span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(145deg, #2b6fa8, #0b2d52);
  color: #fff;
  font-family: var(--a-serif);
  font-size: 20px;
}

.account-avatar strong {
  display: block;
  font-size: 14px;
}

.account-avatar small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--a-muted);
}

/* --------------------------------- 单页编辑 --------------------------------- */

.page-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}

.page-tab {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--a-line);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  color: var(--a-muted);
}

.page-tab.is-active {
  background: var(--a-green-800);
  border-color: var(--a-green-800);
  color: #fff;
}

/* --------------------------------- 弹窗 --------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal__mask {
  position: absolute;
  inset: 0;
  background: rgba(6, 37, 27, 0.45);
  backdrop-filter: blur(3px);
}

.modal__panel {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 30px 80px -20px rgba(6, 37, 27, 0.4);
  animation: modal-in 0.2s ease;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--a-line);
}

.modal__head h2 {
  font-family: var(--a-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--a-green-950);
}

.modal__close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--a-muted);
}

.modal__close svg {
  width: 16px;
  height: 16px;
}

.modal__close:hover {
  background: #f2f5f2;
}

.modal__body {
  padding: 20px;
  overflow-y: auto;
}

.modal__body .afield:last-child {
  margin-bottom: 0;
}

.modal__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--a-line);
}

.modal__text {
  font-size: 13px;
  line-height: 1.8;
  color: var(--a-ink-2);
}

.modal__text strong {
  color: var(--a-danger);
}

/* --------------------------------- 提示条 --------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 120;
  max-width: min(440px, calc(100vw - 40px));
  padding: 11px 18px;
  border-radius: 10px;
  background: #0b2d52;
  color: #fff;
  font-size: 12.5px;
  box-shadow: 0 18px 40px -18px rgba(6, 37, 27, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 10px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}

.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.toast.is-error {
  background: #8f3a29;
}

.skeleton {
  border-radius: 8px;
  background: linear-gradient(90deg, #eef2ee 25%, #f7f9f6 37%, #eef2ee 63%);
  background-size: 400% 100%;
  animation: shimmer 1.2s linear infinite;
}

@keyframes shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: 0 0;
  }
}

.loading {
  display: grid;
  place-items: center;
  min-height: 300px;
  color: var(--a-muted);
  font-size: 12px;
  gap: 12px;
}

.spinner {
  width: 26px;
  height: 26px;
  border: 2px solid var(--a-green-100);
  border-top-color: var(--a-green-600);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.qr-admin {
  display: grid;
  place-items: center;
  min-height: 210px;
  padding: 12px;
  border: 1px solid var(--a-line);
  border-radius: 8px;
  background: #fbfcfe;
}

.qr-admin img {
  width: 190px;
  height: 190px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--a-line);
  padding: 5px;
}

.qr-admin__empty {
  display: grid;
  place-items: center;
  gap: 8px;
  width: 190px;
  height: 190px;
  border: 1px dashed var(--a-line-strong);
  color: var(--a-muted-2);
  font-size: 11.5px;
}

.qr-admin__empty svg {
  width: 40px;
  height: 40px;
  opacity: 0.45;
}

.qr-tip {
  margin-top: 10px;
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--a-muted-2);
}

/* --------------------------------- 响应式 --------------------------------- */

.sidebar-mask {
  position: fixed;
  inset: 0;
  z-index: 44;
  background: rgba(6, 37, 27, 0.4);
  backdrop-filter: blur(2px);
}

@media (max-width: 1180px) {
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .editor-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
  }

  .settings-layout {
    grid-template-columns: minmax(0, 1fr) 270px;
  }
}

@media (max-width: 1024px) {
  .dash-grid {
    grid-template-columns: 1fr;
  }

  .cat-columns {
    grid-template-columns: 1fr;
  }

  .login__art {
    padding: 40px;
  }

  .login__copy h1 {
    font-size: 36px;
  }
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    transition: transform 0.24s ease;
  }

  .admin.side-open .sidebar {
    transform: none;
  }

  .topbar-menu {
    display: grid;
  }

  .admin-topbar {
    padding: 0 18px;
    height: 64px;
  }

  .view {
    padding: 20px 18px 50px;
  }

  .editor-layout,
  .settings-layout {
    grid-template-columns: 1fr;
  }

  .editor-side {
    position: static;
  }

  .login {
    grid-template-columns: 1fr;
  }

  .login__art {
    min-height: 280px;
    padding: 32px 28px;
  }

  .login__copy {
    margin-top: 24px;
    padding-top: 0;
  }

  .login__copy h1 {
    font-size: 30px;
    line-height: 1.35;
  }

  .login__copy h1 br:nth-child(3) {
    display: none;
  }

  .login__features,
  .login__org {
    display: none;
  }

  .login__panel {
    padding: 40px 24px 56px;
  }
}

@media (max-width: 640px) {
  .topbar-actions .topbar-link,
  .topbar-user span:last-child {
    display: none;
  }

  .topbar-title p {
    display: none;
  }

  .topbar-title h1 {
    font-size: 18px;
  }

  .page-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .page-head__actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-card {
    padding: 15px;
  }

  .stat-card__value {
    font-size: 23px;
  }

  .toolbar-row {
    align-items: stretch;
  }

  .search-box {
    width: 100%;
  }

  .select {
    flex: 1;
  }

  .chart {
    gap: 6px;
  }

  .chart__value,
  .chart__label {
    font-size: 9.5px;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .afield--inline {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .table-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .modal {
    padding: 12px;
  }

  .editor-area {
    padding: 16px;
    min-height: 300px;
  }

  .login__art {
    min-height: 220px;
  }

  .login__copy h1 {
    font-size: 24px;
  }

  .login__copy > p:last-child {
    display: none;
  }

  .login__form-wrap h2 {
    font-size: 26px;
  }
}
