/* 云间相 · Content Studio */

:root {
  --ink: #12161a;
  --navy: #1b242d;
  --cream: #f3efe7;
  --paper: #fffdf8;
  --soft: #faf7f0;
  --gold: #8c2b23;
  --gold-soft: #e6d3cf;
  --line: #e3dccd;
  --muted: #7c7a72;
  --muted-2: #a39e93;
  --danger: #b44a3e;
  --ok: #4c7a5c;
  --font: "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC",
    "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --sidebar-w: 268px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  cursor: pointer;
}

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

/* -------------------------------------------------------------- login */

.login-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 46% 54%;
  background: var(--cream);
}

.login-visual {
  background:
    radial-gradient(ellipse at 80% 10%, rgba(176, 141, 87, 0.22), transparent 55%),
    linear-gradient(160deg, #141a1f 0%, #1b242d 60%, #141a1f 100%);
  color: var(--cream);
  display: flex;
  align-items: center;
  padding: 7vw 5.4vw;
  position: relative;
  overflow: hidden;
}

.login-visual::before {
  content: "";
  position: absolute;
  inset: -20% -30% auto auto;
  width: 70%;
  height: 120%;
  background-image: repeating-linear-gradient(
    115deg,
    rgba(201, 166, 107, 0.1) 0,
    rgba(201, 166, 107, 0.1) 1px,
    transparent 1px,
    transparent 46px
  );
  -webkit-mask-image: radial-gradient(circle at 70% 30%, black, transparent 70%);
  mask-image: radial-gradient(circle at 70% 30%, black, transparent 70%);
}

.login-visual-inner {
  position: relative;
  z-index: 1;
  max-width: 430px;
  display: flex;
  flex-direction: column;
  min-height: 66vh;
}

.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: inherit;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: url("../../assets/img/yun/favicon.png") center / cover no-repeat;
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-text strong {
  font-family: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif CJK SC", "SimSun", serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.brand-text small {
  margin-top: 4px;
  font-size: 8px;
  letter-spacing: 0.3em;
  opacity: 0.55;
}

.login-quote {
  margin-top: auto;
  padding-top: 60px;
}

.login-quote p {
  font-size: clamp(28px, 2.6vw, 38px);
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.login-quote span {
  display: block;
  margin-top: 28px;
  font-size: 9.5px;
  letter-spacing: 0.26em;
  color: rgba(245, 241, 233, 0.4);
}

.login-points {
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid rgba(245, 241, 233, 0.14);
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 12px;
  color: rgba(245, 241, 233, 0.55);
  letter-spacing: 0.04em;
}

.login-points li {
  display: flex;
  gap: 14px;
}

.login-points em {
  font-style: normal;
  color: var(--gold);
  font-size: 9px;
  letter-spacing: 0.14em;
  padding-top: 3px;
}

.login-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6vh 6vw;
  background: var(--cream);
  position: relative;
}

.login-card {
  width: 100%;
  max-width: 390px;
}

.login-eyebrow {
  font-size: 9.5px;
  letter-spacing: 0.28em;
  color: var(--gold);
  font-weight: 500;
}

.login-card h1 {
  margin-top: 18px;
  font-size: 30px;
  font-weight: 300;
  letter-spacing: -0.01em;
}

.login-hint {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
}

.login-hint code {
  font-size: 11px;
  background: rgba(18, 22, 26, 0.06);
  padding: 2px 5px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 32px;
}

.login-field span {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.login-field input {
  height: 48px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0 14px;
  font-size: 15px;
  letter-spacing: 0.12em;
  outline: none;
  transition: border-color 0.25s var(--ease);
}

.login-field input:focus {
  border-color: var(--gold);
}

.login-error {
  min-height: 20px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--danger);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  background: var(--ink);
  color: var(--cream);
  height: 52px;
  padding: 0 22px;
  font-size: 13px;
  letter-spacing: 0.14em;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.btn-primary:hover {
  background: var(--gold);
  color: var(--ink);
}

.login-submit {
  width: 100%;
  margin-top: 8px;
}

.login-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.login-back {
  display: inline-block;
  margin-top: 24px;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}

.login-back:hover {
  color: var(--ink);
}

.login-foot {
  position: absolute;
  bottom: 28px;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted-2);
}

/* ---------------------------------------------------------------- app */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  background: #11161a;
  color: #f5f1e9;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 40;
}

.sidebar-head {
  padding: 26px 24px 22px;
  border-bottom: 1px solid rgba(245, 241, 233, 0.1);
}

.sidebar .brand-text strong {
  font-size: 16px;
}

.side-nav {
  flex: 1;
  overflow-y: auto;
  padding: 18px 14px 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 241, 233, 0.2) transparent;
}

.side-nav::-webkit-scrollbar {
  width: 4px;
}

.side-nav::-webkit-scrollbar-thumb {
  background: rgba(245, 241, 233, 0.2);
}

.nav-group {
  padding: 20px 12px 8px;
  font-size: 8.5px;
  letter-spacing: 0.24em;
  color: rgba(245, 241, 233, 0.32);
  font-weight: 500;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  background: transparent;
  color: rgba(245, 241, 233, 0.62);
  padding: 10px 12px;
  font-size: 13px;
  letter-spacing: 0.03em;
  text-align: left;
  position: relative;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.nav-item:hover {
  background: rgba(245, 241, 233, 0.05);
  color: #f5f1e9;
}

.nav-item.is-active {
  background: rgba(176, 141, 87, 0.12);
  color: #f5f1e9;
}

.nav-item.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--gold);
}

.nav-idx {
  font-size: 8.5px;
  letter-spacing: 0.1em;
  color: rgba(245, 241, 233, 0.28);
  width: 16px;
  flex: none;
}

.nav-item.is-active .nav-idx {
  color: var(--gold);
}

.nav-badge {
  margin-left: auto;
  background: var(--gold);
  color: #10151a;
  font-size: 9.5px;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
}

.sidebar-foot {
  padding: 16px 14px 20px;
  border-top: 1px solid rgba(245, 241, 233, 0.1);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.side-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: 0;
  background: transparent;
  color: rgba(245, 241, 233, 0.45);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  padding: 9px 12px;
  text-align: left;
  transition: color 0.25s var(--ease);
}

.side-link:hover {
  color: var(--gold-soft);
}

/* ----------------------------------------------------------- workspace */

.workspace {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--cream);
  position: relative;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 18px 38px;
  background: rgba(243, 239, 231, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar-title {
  min-width: 0;
}

.crumb {
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--gold);
  font-weight: 500;
  text-transform: uppercase;
}

.topbar h1 {
  margin-top: 3px;
  font-size: 21px;
  font-weight: 400;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.save-state {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.save-state::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

.btn-save {
  height: 40px;
  padding: 0 22px;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: #10151a;
  font-size: 12px;
  letter-spacing: 0.12em;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.btn-save:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.btn-save:disabled {
  opacity: 0.55;
  cursor: wait;
}

.topbar .btn-save:disabled {
  background: transparent;
  border-color: var(--line);
  color: var(--muted-2);
  opacity: 1;
  cursor: default;
}

.btn-ghost-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.btn-ghost-sm:hover {
  border-color: var(--gold);
  background: var(--paper);
}

.btn-danger {
  height: 40px;
  padding: 0 20px;
  border: 1px solid var(--danger);
  background: var(--danger);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.btn-danger:hover {
  background: #9c3c31;
}

.mobile-side-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 16px;
}

.view {
  padding: 34px 38px 70px;
  max-width: 1180px;
  width: 100%;
}

.view-loading {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
  padding: 60px 0;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--line);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* --------------------------------------------------------------- cards */

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 30px 32px;
  margin-bottom: 22px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.panel-head p {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted);
  max-width: 620px;
}

.panel-kicker {
  font-size: 8.5px;
  letter-spacing: 0.22em;
  color: var(--gold);
  margin-bottom: 6px;
  font-weight: 500;
}

.view-intro {
  margin-bottom: 24px;
}

.view-intro p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
  max-width: 760px;
}

/* --------------------------------------------------------------- forms */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 22px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field.full {
  grid-column: 1 / -1;
}

.field > label {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 500;
}

.field .hint {
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--muted-2);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--ink);
  font-size: 14px;
  padding: 10px 12px;
  height: 42px;
  outline: none;
  border-radius: 0;
  transition: border-color 0.22s var(--ease), background 0.22s var(--ease);
  min-width: 0;
}

.field textarea {
  height: auto;
  min-height: 84px;
  line-height: 1.75;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold);
  background: #fff;
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239b8a70'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 30px;
}

.media-field {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.media-field input {
  flex: 1;
}

.media-preview {
  margin-top: 10px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.media-thumb {
  width: 132px;
  height: 88px;
  background: #eee8dc center / cover no-repeat;
  border: 1px solid var(--line);
  flex: none;
  position: relative;
  overflow: hidden;
}

.media-thumb.is-empty::after {
  content: "NO IMAGE";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 8.5px;
  letter-spacing: 0.18em;
  color: var(--muted-2);
}

.media-thumb.is-pdf::after {
  content: "PDF";
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.16em;
}

.upload-btn {
  flex: none;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink);
  white-space: nowrap;
  transition: border-color 0.25s var(--ease);
}

.upload-btn:hover {
  border-color: var(--gold);
}

.upload-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.field-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  font-size: 10.5px;
  color: var(--muted-2);
  line-height: 1.7;
  word-break: break-all;
}

.group-grid {
  grid-template-columns: 1fr 1fr;
  margin-top: 4px;
}

.bf-table {
  border: 1px solid var(--line);
  background: var(--soft);
}

.bf-row {
  display: grid;
  grid-template-columns: 96px 1fr 1.4fr 74px;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}

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

.bf-row > strong {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink);
}

.bf-row > input {
  height: 34px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0 9px;
  font-size: 12.5px;
  outline: none;
  min-width: 0;
}

.bf-row > input:focus {
  border-color: var(--gold);
}

.bf-head {
  background: #f4efe4;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.bf-head span {
  font-size: 9.5px;
  letter-spacing: 0.1em;
}

/* --------------------------------------------------------- list editor */

.list-editor {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.list-item {
  border: 1px solid var(--line);
  background: #fdfbf6;
}

.list-item-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f7f3ea;
  border-bottom: 1px solid var(--line);
}

.item-index {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--gold);
  width: 22px;
  flex: none;
}

.item-title {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.icon-btn {
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}

.icon-btn:hover {
  border-color: var(--line);
  background: var(--paper);
  color: var(--ink);
}

.icon-btn.danger:hover {
  color: var(--danger);
  border-color: rgba(180, 74, 62, 0.35);
}

.icon-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.list-item-body {
  padding: 20px 16px;
}

.list-item .form-grid {
  gap: 16px 18px;
}

.list-add {
  border: 1px dashed #cfc4b0;
  background: transparent;
  color: var(--muted);
  height: 46px;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), background 0.25s var(--ease);
}

.list-add:hover {
  border-color: var(--gold);
  color: var(--ink);
  background: rgba(176, 141, 87, 0.05);
}

.visibility {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.visibility input {
  appearance: none;
  width: 30px;
  height: 16px;
  border-radius: 8px;
  background: #d7cfc0;
  position: relative;
  cursor: pointer;
  transition: background 0.25s var(--ease);
  margin: 0;
}

.visibility input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.25s var(--ease);
}

.visibility input:checked {
  background: var(--gold);
}

.visibility input:checked::after {
  transform: translateX(14px);
}

.visibility input:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ------------------------------------------------------- string lists */

.str-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.str-row {
  display: flex;
  gap: 8px;
}

.str-row input {
  flex: 1;
  height: 40px;
  border: 1px solid var(--line);
  background: var(--soft);
  padding: 0 11px;
  font-size: 13.5px;
  outline: none;
}

.str-row input:focus {
  border-color: var(--gold);
}

.str-remove {
  width: 40px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  flex: none;
}

.str-remove:hover {
  color: var(--danger);
  border-color: rgba(180, 74, 62, 0.35);
}

.str-add {
  align-self: flex-start;
  border: 1px dashed #cfc4b0;
  background: transparent;
  padding: 7px 14px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.str-add:hover {
  border-color: var(--gold);
  color: var(--ink);
}

/* ------------------------------------------------------------ dashboard */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 22px 22px 20px;
  position: relative;
}

.stat-card .num {
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-card .lbl {
  display: block;
  margin-top: 12px;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.stat-card .tag {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 8.5px;
  letter-spacing: 0.16em;
  color: var(--gold);
}

.stat-card.accent {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--cream);
}

.stat-card.accent .lbl {
  color: rgba(245, 241, 233, 0.55);
}

.dash-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 22px;
  align-items: start;
}

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.quick-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  font-size: 12.5px;
  color: var(--ink);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.quick-link span:last-child {
  color: var(--gold);
  font-size: 13px;
}

.quick-link:hover {
  background: var(--soft);
}

.recent-list {
  display: flex;
  flex-direction: column;
}

.recent-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}

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

.recent-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  flex: none;
}

.recent-name {
  font-weight: 500;
}

.recent-type {
  color: var(--muted);
  font-size: 11px;
}

.recent-time {
  margin-left: auto;
  color: var(--muted-2);
  font-size: 10.5px;
  white-space: nowrap;
}

.empty-note {
  padding: 36px 20px;
  text-align: center;
  color: var(--muted-2);
  font-size: 12.5px;
  line-height: 1.9;
  border: 1px dashed var(--line);
  background: var(--soft);
}

.status-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  background: rgba(176, 141, 87, 0.08);
  border-left: 2px solid var(--gold);
  font-size: 11.5px;
  line-height: 1.75;
  color: #6d5b3f;
  margin-bottom: 22px;
}

/* --------------------------------------------------------- appointments */

.appt-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 8px 14px;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.chip .count {
  opacity: 0.55;
  margin-left: 5px;
  font-size: 10px;
}

.appt-toolbar .spacer {
  flex: 1;
}

.appt-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.appt-card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 20px 22px;
}

.appt-main {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.appt-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 8px;
  flex: none;
  background: var(--gold);
}

.appt-card.is-done .appt-status-dot {
  background: var(--ok);
}

.appt-card.is-contacted .appt-status-dot {
  background: #8a7c62;
}

.appt-who {
  min-width: 0;
  flex: 1;
}

.appt-name {
  font-size: 15px;
  font-weight: 500;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}

.appt-name .type {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--gold);
  font-weight: 400;
}

.appt-meta {
  margin-top: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  font-size: 11.5px;
  color: var(--muted);
}

.appt-meta strong {
  font-weight: 500;
  color: var(--ink);
}

.appt-message {
  margin-top: 12px;
  padding: 11px 14px;
  background: var(--soft);
  border-left: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.8;
  color: #55524b;
  white-space: pre-wrap;
  word-break: break-word;
}

.appt-side {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.status-select {
  height: 32px;
  border: 1px solid var(--line);
  background: var(--soft);
  font-size: 11px;
  padding: 0 26px 0 9px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' fill='none'%3E%3Cpath d='M1 1l3 3 3-3' stroke='%239b8a70'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  color: var(--ink);
  outline: none;
}

.appt-date {
  font-size: 10px;
  color: var(--muted-2);
  letter-spacing: 0.03em;
  margin-top: 10px;
}

/* -------------------------------------------------------------- misc */

.section-hint {
  margin-top: 18px;
  font-size: 11.5px;
  line-height: 1.85;
  color: var(--muted);
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.section-hint b {
  font-weight: 500;
  color: var(--ink);
}

.pw-card {
  max-width: 480px;
}

.pw-card .form-grid {
  grid-template-columns: 1fr;
}

.password-success {
  color: var(--ok);
  font-size: 12px;
  min-height: 18px;
  margin-top: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 250;
  transform: translate(-50%, 16px);
  background: var(--ink);
  color: var(--cream);
  border-left: 2px solid var(--gold);
  padding: 13px 20px;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
  max-width: 86vw;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.is-error {
  border-left-color: var(--danger);
}

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

.modal-card {
  background: var(--paper);
  border-top: 3px solid var(--gold);
  padding: 28px;
  width: min(420px, 92vw);
}

.modal-card h3 {
  font-size: 18px;
  font-weight: 500;
}

.modal-card p {
  margin-top: 10px;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--muted);
}

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

/* -------------------------------------------------------- responsive */

@media (max-width: 1080px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dash-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1000px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 272px;
    transform: translateX(-100%);
    transition: transform 0.32s var(--ease);
  }

  .app.side-open .sidebar {
    transform: none;
    box-shadow: 30px 0 80px rgba(0, 0, 0, 0.3);
  }

  .mobile-side-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .topbar {
    padding: 14px 22px;
  }

  .view {
    padding: 26px 22px 60px;
  }

  .login-view {
    grid-template-columns: 1fr;
  }

  .login-visual {
    display: none;
  }

  .login-panel {
    min-height: 100vh;
    padding: 10vh 8vw;
  }
}

@media (max-width: 720px) {
  .topbar {
    flex-wrap: wrap;
    gap: 12px;
  }

  .topbar-actions {
    width: 100%;
    margin-left: 0;
  }

  .topbar-actions .btn-save {
    flex: 1;
  }

  .save-state {
    display: none;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 22px 18px;
  }

  .media-thumb {
    width: 104px;
    height: 72px;
  }

  .appt-main {
    flex-direction: column;
  }

  .appt-side {
    width: 100%;
    justify-content: flex-end;
  }

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

  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-card {
    padding: 18px 16px;
  }

  .stat-card .num {
    font-size: 27px;
  }

  .view {
    padding: 20px 16px 60px;
  }

  .list-item-head {
    flex-wrap: wrap;
  }

  .item-tools {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ----------------------------------------------------------- articles */

.article-counts {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.article-admin-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.article-admin-row {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.article-admin-thumb {
  width: 148px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--ink);
  display: grid;
  place-items: center;
}

.article-admin-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-admin-thumb.is-empty {
  background:
    radial-gradient(circle at 30% 20%, rgba(176, 141, 87, 0.28), transparent 60%),
    linear-gradient(145deg, #1b242d, #10161a);
  color: var(--gold-soft);
  font-size: 9px;
  letter-spacing: 0.28em;
}

.article-admin-main {
  min-width: 0;
}

.article-admin-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.article-admin-head h3 {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.4;
}

.article-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--line);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.article-status.is-draft {
  color: var(--muted);
  background: var(--soft);
}

.article-status.is-scheduled {
  color: #6d5b3f;
  background: rgba(176, 141, 87, 0.12);
  border-color: rgba(176, 141, 87, 0.35);
}

.article-status.is-published {
  color: var(--ok);
  background: rgba(76, 122, 92, 0.1);
  border-color: rgba(76, 122, 92, 0.3);
}

.baidu-state {
  font-size: 9.5px;
  letter-spacing: 0.05em;
  color: var(--muted-2);
}

.baidu-state.is-ok {
  color: var(--ok);
}

.baidu-state.is-fail {
  color: var(--danger);
}

.article-admin-meta {
  margin-top: 8px;
  font-size: 10.8px;
  color: var(--muted);
  line-height: 1.7;
  word-break: break-all;
}

.article-admin-summary {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  max-width: 280px;
}

.article-admin-actions .btn-ghost-sm {
  padding: 0 12px;
  height: 32px;
  font-size: 10.5px;
}

.article-editor-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.article-editor-bar .spacer,
.seo-actions .spacer {
  flex: 1;
}

.article-content-input {
  width: 100%;
  min-height: 380px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-family: "SF Mono", Menlo, Consolas, "PingFang SC", monospace;
  font-size: 13px;
  line-height: 1.85;
  resize: vertical;
}

.article-content-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.12);
}

.article-publish-note {
  padding: 14px 16px;
  background: var(--soft);
  border: 1px dashed var(--line);
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--muted);
  word-break: break-all;
}

.article-danger {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* --------------------------------------------------------------- seo */

.seo-status {
  padding: 14px 16px;
  border-left: 2px solid var(--gold);
  background: rgba(176, 141, 87, 0.1);
  color: #6d5b3f;
  font-size: 12px;
  line-height: 1.75;
  margin-bottom: 20px;
  word-break: break-all;
}

.seo-status.is-ok {
  border-left-color: var(--ok);
  background: rgba(76, 122, 92, 0.09);
  color: #3f654e;
}

.seo-status.is-warn {
  border-left-color: var(--danger);
  background: rgba(180, 74, 62, 0.08);
  color: #8d4137;
}

.seo-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 26px;
}

.seo-step {
  display: flex;
  gap: 10px;
  padding: 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  font-size: 11.5px;
  line-height: 1.75;
  color: var(--muted);
}

.seo-step em {
  font-style: normal;
  flex: none;
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.seo-form {
  margin-top: 2px;
}

.seo-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}

.seo-switch {
  margin-top: 4px;
}

.seo-last {
  margin-top: 20px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--soft);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--muted);
  word-break: break-all;
}

.seo-last strong {
  color: var(--ink);
  font-weight: 500;
}

.seo-last.is-ok {
  border-left: 2px solid var(--ok);
}

.seo-last.is-fail {
  border-left: 2px solid var(--danger);
}

.seo-last.is-empty {
  color: var(--muted-2);
}

.seo-history {
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.seo-history-row {
  display: grid;
  grid-template-columns: 8px 132px minmax(0, 1fr) 54px;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 10.8px;
  color: var(--muted);
}

.seo-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted-2);
}

.seo-dot.is-ok {
  background: var(--ok);
}

.seo-dot.is-fail {
  background: var(--danger);
}

.seo-history-time {
  white-space: nowrap;
  color: var(--muted-2);
}

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

.seo-history-count {
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 1080px) {
  .article-admin-row {
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .article-admin-thumb {
    width: 118px;
  }

  .article-admin-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    max-width: none;
  }

  .seo-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .article-admin-row {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .article-admin-thumb {
    width: 100%;
    aspect-ratio: 16 / 8;
  }

  .article-admin-actions {
    grid-column: auto;
  }

  .seo-history-row {
    grid-template-columns: 8px minmax(0, 1fr) 48px;
  }

  .seo-history-time {
    display: none;
  }
}

/* --------------------------------------------------------- AI writing */

.ai-settings-form {
  margin: 0;
}

.ai-generate-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.ai-generate-row input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--ink);
  font-size: 14px;
  padding: 0 14px;
  outline: none;
  border-radius: 0;
}

.ai-generate-row input:focus {
  border-color: var(--gold);
  background: #fff;
}

.ai-generate-row .btn-ghost-sm,
.ai-generate-row .btn-save {
  height: 44px;
  padding: 0 20px;
  white-space: nowrap;
}

.ai-generate-note {
  margin-top: 12px;
  font-size: 11px;
  color: var(--muted-2);
  line-height: 1.7;
}

.ai-title-results {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-title-results:empty {
  margin-top: 0;
}

.ai-intent {
  padding: 12px 14px;
  border-left: 2px solid var(--gold);
  background: rgba(176, 141, 87, 0.08);
  color: #6d5b3f;
  font-size: 12px;
  line-height: 1.7;
}

.ai-title-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: var(--soft);
  transition: border-color 0.22s var(--ease);
}

.ai-title-card:hover {
  border-color: var(--gold-soft);
}

.ai-title-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ai-title-body strong {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.65;
  word-break: break-word;
}

.ai-title-angle {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}

.ai-title-actions {
  display: flex;
  gap: 8px;
  flex: none;
}

.ai-title-actions .btn-ghost-sm,
.ai-title-actions .btn-save {
  height: 34px;
  padding: 0 14px;
  font-size: 11px;
}

.ai-busy {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border: 1px dashed var(--gold-soft);
  background: rgba(176, 141, 87, 0.05);
  color: var(--muted);
  font-size: 12px;
}

.keyword-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.keyword-chip {
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
  padding: 6px 12px;
  line-height: 1.4;
  transition: all 0.2s var(--ease);
}

.keyword-chip:hover {
  border-color: var(--gold);
  color: var(--ink);
  background: rgba(176, 141, 87, 0.08);
}

.ai-help .seo-steps {
  grid-template-columns: repeat(2, 1fr);
}

.ai-history-title {
  margin-top: 26px;
  margin-bottom: 10px;
}

.ai-history {
  border-top: 1px solid var(--line);
}

.ai-history-row {
  display: grid;
  grid-template-columns: 8px 130px 140px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
}

.ai-history-time {
  color: var(--muted-2);
  white-space: nowrap;
}

.ai-history-keyword {
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-history-headline {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.ai-history-row .btn-ghost-sm {
  height: 28px;
  padding: 0 10px;
  font-size: 10.5px;
}

/* ----------------------------------------------------------- analytics */

.analytics-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.analytics-toolbar .btn-ghost-sm {
  margin-left: auto;
}

.analytics-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 12px;
}

.analytics-metric {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 20px 22px;
  background: var(--paper);
  min-width: 0;
}

.analytics-metric-tag {
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--gold);
}

.analytics-metric strong {
  font-size: 30px;
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.analytics-metric-label {
  font-size: 11px;
  color: var(--muted);
}

.analytics-note {
  margin-bottom: 22px;
  padding: 11px 14px;
  border-left: 2px solid var(--ok);
  background: rgba(76, 122, 92, 0.07);
  color: #3f654e;
  font-size: 11px;
  line-height: 1.7;
}

.analytics-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 190px;
  padding-top: 10px;
}

.analytics-col {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.analytics-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  width: 100%;
  flex: 1;
  min-height: 0;
}

.analytics-bar {
  display: block;
  width: min(14px, 46%);
  background: var(--ink);
  min-height: 2px;
  transition: height 0.3s var(--ease);
}

.analytics-bar.is-uv {
  background: var(--gold-soft);
}

.analytics-col:hover .analytics-bar.is-views {
  background: var(--navy);
}

.analytics-col:hover .analytics-bar.is-uv {
  background: var(--gold);
}

.analytics-col-label {
  font-size: 9px;
  color: var(--muted-2);
  white-space: nowrap;
  height: 12px;
  line-height: 12px;
}

.analytics-subtitle {
  margin: 28px 0 4px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.analytics-hours {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 64px;
  padding: 10px 0 0;
}

.analytics-hour {
  flex: 1;
  min-width: 0;
  background: var(--gold);
  opacity: 0.65;
  min-height: 2px;
  transition: opacity 0.2s var(--ease);
}

.analytics-hour:hover {
  opacity: 1;
}

.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.analytics-grid .panel {
  margin-bottom: 0;
}

.analytics-table {
  border-top: 1px solid var(--line);
}

.analytics-table-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34% 52px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
}

.analytics-table-name {
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-table-track {
  height: 3px;
  background: var(--soft);
  overflow: hidden;
}

.analytics-table-fill {
  display: block;
  height: 100%;
  background: var(--gold);
}

.analytics-table-value {
  text-align: right;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.analytics-recent {
  border-top: 1px solid var(--line);
}

.analytics-recent-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) 120px 64px auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
}

.analytics-recent-time {
  color: var(--muted-2);
  white-space: nowrap;
}

.analytics-recent-path {
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-new {
  padding: 2px 7px;
  background: rgba(176, 141, 87, 0.12);
  color: #6d5b3f;
  font-size: 9px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.analytics-help p {
  font-size: 12px;
  line-height: 1.85;
  color: var(--muted);
  max-width: 820px;
}

@media (max-width: 1100px) {
  .analytics-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .ai-generate-row {
    grid-template-columns: 1fr 1fr;
  }

  .ai-generate-row input {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .panel .ai-generate-row {
    grid-template-columns: 1fr;
  }

  .ai-title-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .ai-title-actions {
    justify-content: flex-start;
  }

  .ai-title-actions .btn-save,
  .ai-title-actions .btn-ghost-sm {
    flex: 1;
  }

  .ai-help .seo-steps {
    grid-template-columns: 1fr;
  }

  .ai-history-row {
    grid-template-columns: 8px minmax(0, 1fr) auto;
    grid-template-areas:
      'dot time action'
      'dot title action';
    gap: 4px 10px;
  }

  .ai-history-row .seo-dot {
    grid-area: dot;
  }

  .ai-history-time {
    grid-area: time;
  }

  .ai-history-keyword {
    grid-area: title;
    font-size: 12px;
  }

  .ai-history-headline {
    display: none;
  }

  .ai-history-row .btn-ghost-sm {
    grid-area: action;
  }

  .analytics-chart {
    height: 150px;
  }

  .analytics-col-label {
    display: none;
  }

  .analytics-recent-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 10px;
  }

  .analytics-recent-time {
    grid-column: 1 / -1;
    font-size: 10px;
  }

  .analytics-recent-device {
    display: none;
  }
}

/* ------------------------------------------------------ seo beginner guide */

.seo-guide .seo-steps-wide {
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 18px;
}

.seo-guide .seo-last strong {
  color: var(--ink);
  font-weight: 500;
}

.seo-guide .seo-actions {
  margin-top: 4px;
}

@media (max-width: 900px) {
  .seo-guide .seo-steps-wide {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------ API configuration */

.nav-item-rich {
  padding-top: 8px;
  padding-bottom: 8px;
}

.nav-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.35;
}

.nav-copy strong {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.nav-copy small {
  margin-top: 2px;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: rgba(245, 241, 233, 0.36);
}

.nav-item.is-active .nav-copy small {
  color: rgba(245, 241, 233, 0.58);
}

.nav-dot {
  margin-left: auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
  background: rgba(245, 241, 233, 0.25);
}

.nav-dot.is-on {
  background: #7cab8b;
  box-shadow: 0 0 0 3px rgba(124, 171, 139, 0.16);
}

.nav-dot.is-off {
  background: #b0604f;
  box-shadow: 0 0 0 3px rgba(176, 96, 79, 0.16);
}

.api-overview {
  margin-bottom: 26px;
}

.api-overview-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.api-overview-head h2 {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.api-overview-head p {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

.api-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.api-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 22px 24px 20px;
  overflow: hidden;
}

.api-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--line);
}

.api-card.is-on::before {
  background: var(--ok);
}

.api-card.is-off::before {
  background: var(--gold);
}

.api-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.api-card-kicker {
  margin-bottom: 5px;
  font-size: 8.5px;
  letter-spacing: 0.2em;
  color: var(--gold);
  font-weight: 500;
}

.api-card h3 {
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.api-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex: none;
}

.api-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted-2);
}

.api-badge.is-on {
  color: #3f654e;
  border-color: rgba(76, 122, 92, 0.3);
  background: rgba(76, 122, 92, 0.08);
}

.api-badge.is-on i {
  background: var(--ok);
}

.api-badge.is-off {
  color: #8d4137;
  border-color: rgba(180, 74, 62, 0.25);
  background: rgba(180, 74, 62, 0.07);
}

.api-badge.is-off i {
  background: var(--danger);
}

.api-card-desc {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted);
}

.api-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.api-card-meta div {
  min-width: 0;
}

.api-card-meta dt {
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--muted-2);
}

.api-card-meta dd {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
}

.api-card-actions .btn-save {
  height: 38px;
  padding: 0 16px;
  font-size: 11.5px;
}

.api-card-tip {
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--muted-2);
}

.api-config-panel {
  border-color: #d9c8ac;
  box-shadow: inset 0 3px 0 var(--gold);
}

.api-config-panel .panel-head {
  align-items: center;
}

.api-save-note {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--muted-2);
}

.api-inline-help {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  padding: 12px 14px;
  background: rgba(176, 141, 87, 0.08);
  border-left: 2px solid var(--gold);
  font-size: 11.5px;
  line-height: 1.75;
  color: #6d5b3f;
}

.api-inline-help strong {
  font-weight: 500;
  color: #5b4a32;
}

.api-status-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 13px;
}

.api-status-head strong {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.api-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
  flex: none;
}

.api-status.is-ok .api-status-dot {
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(76, 122, 92, 0.16);
}

.api-status.is-warn .api-status-dot {
  box-shadow: 0 0 0 3px rgba(180, 74, 62, 0.14);
}

.api-status p {
  font-size: 11.5px;
  line-height: 1.75;
}

.seo-form-stack {
  display: block;
}

.seo-verify {
  padding: 0;
}

.seo-verify > summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 32px;
  cursor: pointer;
  list-style: none;
}

.seo-verify > summary::-webkit-details-marker {
  display: none;
}

.seo-verify-copy {
  flex: 1;
  min-width: 0;
}

.seo-verify-title {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.seo-verify-desc {
  margin-top: 5px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--muted);
  word-break: break-all;
}

.seo-verify-chevron {
  flex: none;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--muted-2);
}

.seo-verify[open] > summary {
  border-bottom: 1px solid var(--line);
}

.seo-verify-body {
  padding: 24px 32px 30px;
}

.seo-verify-body .api-inline-help {
  margin-bottom: 22px;
}

@media (max-width: 1000px) {
  .api-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .api-overview-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .api-card {
    padding: 20px 18px 18px;
  }

  .api-card-meta {
    grid-template-columns: 1fr;
  }

  .seo-verify > summary {
    flex-wrap: wrap;
    padding: 20px 18px;
  }

  .seo-verify-chevron {
    width: 100%;
  }

  .seo-verify-body {
    padding: 20px 18px 24px;
  }
}

