:root {
  --bg: #0b0f14;
  --bg-elev: #121820;
  --panel: #151c26;
  --panel-2: #1a2330;
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(148, 163, 184, 0.28);
  --text: #edf2f7;
  --muted: #8b9aaf;
  --faint: #5c6b80;
  --accent: #d4a15a;
  --accent-soft: rgba(212, 161, 90, 0.16);
  --accent-ink: #1a140c;
  --teal: #3db8a8;
  --ok: #3ecf8e;
  --bad: #e85d5d;
  --warn: #e0b14a;
  --info: #5ba4d9;
  --shadow: 0 20px 48px rgba(0, 0, 0, 0.42);
  --radius: 14px;
  --radius-sm: 8px;
  --font: "Noto Sans SC", "Manrope", system-ui, sans-serif;
  --display: "Manrope", "Noto Sans SC", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
code {
  font-family: var(--mono);
  font-size: 0.92em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
}

/* —— Login —— */
.login-body {
  min-height: 100vh;
  background:
    linear-gradient(180deg, transparent 60%, rgba(11,15,20,0.92)),
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(61,184,168,0.12), transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 15%, rgba(212,161,90,0.14), transparent 50%),
    #0b0f14;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
}
.login-visual {
  position: relative;
  padding: 72px 64px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-right: 1px solid var(--line);
}
.login-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, transparent, #000 40%, #000);
  pointer-events: none;
}
.login-orb {
  position: absolute;
  width: 480px;
  height: 480px;
  left: -60px;
  bottom: 8%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(212,161,90,0.35), rgba(61,184,168,0.12) 42%, transparent 68%);
  filter: blur(12px);
  animation: drift 12s var(--ease) infinite alternate;
}
.login-brand {
  position: relative;
  margin: 0 0 16px;
  font-family: var(--display);
  font-size: clamp(36px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.login-visual h2 {
  position: relative;
  margin: 0;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  color: #c5d0de;
}
.login-sub {
  position: relative;
  margin: 14px 0 0;
  max-width: 380px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
}
.login-panel {
  display: grid;
  place-items: center;
  padding: 40px 28px;
  background: rgba(18, 24, 32, 0.65);
  backdrop-filter: blur(16px);
}
.login-form {
  width: min(380px, 100%);
  display: grid;
  gap: 16px;
  padding: 32px 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(165deg, rgba(26,35,48,0.98), rgba(18,24,32,0.95));
  box-shadow: var(--shadow);
  animation: rise 0.5s var(--ease) both;
}
.login-form h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.login-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.login-form input {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.login-form input:focus {
  outline: none;
  border-color: rgba(212,161,90,0.55);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.alert {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(232, 93, 93, 0.12);
  border: 1px solid rgba(232, 93, 93, 0.35);
  color: #ffc9c9;
  font-size: 14px;
}

/* —— App shell —— */
.app-body {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(900px 420px at 100% -5%, rgba(212,161,90,0.07), transparent 55%),
    radial-gradient(700px 380px at -5% 30%, rgba(61,184,168,0.06), transparent 50%),
    var(--bg);
}
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 14px;
  width: 248px;
  min-width: 248px;
  max-width: 248px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #10161e 0%, #0b0f14 100%);
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 6px 10px 14px;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.04em;
  color: var(--accent-ink);
  background: linear-gradient(145deg, #e8c07a, #c9924a);
  box-shadow: 0 8px 20px rgba(212, 161, 90, 0.25);
}
.brand strong {
  display: block;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand small {
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.nav-group-label {
  margin: 8px 10px 4px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  font-family: var(--display);
  font-weight: 600;
}
.side-nav {
  display: grid;
  gap: 4px;
  flex: 1;
}
.side-nav button {
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 11px 12px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s var(--ease), color 0.2s, transform 0.15s;
}
.side-nav button .nav-idx {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 500;
  background: rgba(255,255,255,0.04);
  color: var(--faint);
  flex-shrink: 0;
}
.side-nav button:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
}
.side-nav button.active {
  color: var(--text);
  background: var(--accent-soft);
  box-shadow: inset 2px 0 0 var(--accent);
}
.side-nav button.active .nav-idx {
  background: rgba(212,161,90,0.28);
  color: #f5d9a8;
}
.side-foot {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.user-chip {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.user-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(62,207,142,0.2);
}

.workspace {
  padding: 24px 28px 56px;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.page-head h1 {
  margin: 4px 0 0;
  font-family: var(--display);
  font-size: clamp(24px, 2.5vw, 30px);
  font-weight: 700;
  letter-spacing: -0.035em;
}
.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-family: var(--display);
  font-weight: 600;
}
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.panel { display: none; }
.panel.active {
  display: block;
  animation: rise 0.38s var(--ease) both;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.stat {
  position: relative;
  padding: 16px 14px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(26,35,48,0.95), rgba(18,24,32,0.88));
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s var(--ease);
}
.stat::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 80%);
  opacity: 0.55;
}
.stat:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
.stat b {
  display: block;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
}
.stat span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
  display: block;
}
.stat.tone-ok b { color: #8eecc0; }
.stat.tone-warn b { color: #f0d48a; }
.stat.tone-bad b { color: #f0a0a0; }
.stat.tone-info b { color: #9ecceb; }

.hero-note {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px 26px;
  background:
    linear-gradient(135deg, rgba(61,184,168,0.07), transparent 42%),
    var(--panel);
}
.hero-note h2 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero-note > p, .hero-note li {
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0 16px;
  padding: 0;
  list-style: none;
}
.steps li {
  position: relative;
  padding: 16px 14px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(11,15,20,0.45);
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}
.steps li b {
  display: block;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 6px;
  font-family: var(--display);
}
.steps li .step-n {
  display: inline-block;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.06em;
}

.toolbar {
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(21, 28, 38, 0.55);
}
.inline-form, .toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.inline-form input,
.inline-form select,
.toolbar select,
.toolbar input,
label input,
label select,
textarea {
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  min-width: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.inline-form input:focus,
.inline-form select:focus,
.toolbar select:focus,
.toolbar input:focus,
label input:focus,
label select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(212,161,90,0.5);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.inline-form input[name="list_url"] { min-width: 260px; flex: 1; }

.table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(21, 28, 38, 0.72);
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
#tab-articles .data-table { min-width: 880px; }
#tab-articles .data-table td:nth-child(2) {
  white-space: normal;
  word-break: break-word;
}
th, td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13.5px;
}
th {
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(0,0,0,0.22);
  position: sticky;
  top: 0;
}
tbody tr {
  transition: background 0.15s;
}
tbody tr:hover td {
  background: rgba(255,255,255,0.02);
}
tr:last-child td { border-bottom: 0; }
.hint {
  color: var(--muted);
  font-size: 12px;
  margin: 4px 0 0;
  word-break: break-all;
  line-height: 1.5;
}
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: #243040;
  color: #c5d0de;
}
.badge.published { background: rgba(62,207,142,0.16); color: #9eecc4; }
.badge.failed { background: rgba(232,93,93,0.16); color: #ffc0c0; }
.badge.pending, .badge.ready, .badge.rewriting, .badge.publishing {
  background: rgba(224,177,74,0.14);
  color: #f0d794;
}
.pill-on {
  color: #9eecc4;
  font-size: 12px;
  font-weight: 600;
}
.pill-off {
  color: var(--faint);
  font-size: 12px;
}

/* Settings */
.settings-grid {
  display: grid;
  gap: 18px;
  max-width: 860px;
}
.settings-form {
  display: grid;
  gap: 18px;
}
.settings-section {
  display: grid;
  gap: 14px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}
.qa-quotas-wrap {
  max-height: 420px;
  overflow: auto;
}
.qa-quotas-table {
  min-width: 520px;
}
.qa-quotas-table td {
  vertical-align: middle;
}
.qa-quotas-table input[type="number"],
.qa-quotas-table input[type="text"] {
  width: 88px;
  max-width: 100%;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  pointer-events: auto;
}
.qa-quotas-table input[type="number"]:focus,
.qa-quotas-table input[type="text"]:focus {
  outline: none;
  border-color: rgba(212,161,90,0.5);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.qa-quotas-table label.check {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(11,15,20,0.35);
}
.settings-section h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.settings-section h3::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--accent);
}
.settings-fields {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}
.settings-fields .span-2 { grid-column: 1 / -1; }
.settings-section label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}
.settings-section label.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(11,15,20,0.35);
  color: var(--text);
  font-size: 13px;
}
.settings-section label.check input {
  margin-top: 2px;
  accent-color: var(--accent);
}
.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.settings-meta-box {
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line);
  background: rgba(0,0,0,0.2);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  font-family: var(--mono);
}

button, .btn-primary, .btn-secondary, .btn-ghost {
  cursor: pointer;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  padding: 10px 14px;
  font-weight: 500;
  transition: transform 0.15s var(--ease), background 0.2s, border-color 0.2s, opacity 0.2s;
}
button:active, .btn-primary:active, .btn-secondary:active { transform: scale(0.98); }
.btn-primary {
  background: linear-gradient(145deg, #e8c07a, #c9924a);
  color: var(--accent-ink);
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(212,161,90,0.22);
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-secondary {
  background: rgba(255,255,255,0.04);
  border-color: var(--line);
  color: var(--text);
}
.btn-secondary:hover { border-color: var(--line-strong); background: rgba(255,255,255,0.07); }
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}
.btn-ghost:hover { color: var(--text); }
.actions button {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
}
.actions button:hover { border-color: var(--line-strong); }

dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #141b24;
  color: var(--text);
  width: min(760px, 92vw);
  padding: 0;
  box-shadow: var(--shadow);
}
dialog::backdrop {
  background: rgba(4, 7, 10, 0.72);
  backdrop-filter: blur(4px);
}
.dialog-body {
  display: grid;
  gap: 12px;
  padding: 22px;
}
.dialog-body h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.dialog-body textarea {
  width: 100%;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  min-height: 280px;
}
.dialog-body label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}
.dialog-body label.check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #1c2734;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  z-index: 50;
  max-width: min(420px, calc(100vw - 40px));
  font-size: 14px;
  animation: toast-in 0.28s var(--ease) both;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.guide-checks {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}
.guide-item {
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.guide-item .gi {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  flex-shrink: 0;
  border: 1px solid var(--line);
}
.guide-item.ok {
  color: #b7f3db;
  border-color: rgba(62,207,142,0.28);
  background: rgba(62,207,142,0.07);
}
.guide-item.ok .gi {
  background: rgba(62,207,142,0.25);
  border-color: transparent;
}
.guide-item.no {
  color: #f0d794;
  border-color: rgba(224,177,74,0.25);
  background: rgba(224,177,74,0.05);
}

.log-box {
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0d1218;
  color: #c9d6e5;
  white-space: pre-wrap;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  max-height: 360px;
  overflow: auto;
}

.console-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.console-status {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 14px;
  min-width: 0;
}
.console-phase {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(91, 164, 217, 0.16);
  color: #9fd6f0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}
.console-phase.is-busy {
  background: rgba(62, 207, 142, 0.16);
  color: #b6efc4;
}
.console-phase.is-error {
  background: rgba(232, 93, 93, 0.18);
  color: #ffc0c0;
}
.console-phase.is-idle {
  background: rgba(160, 170, 185, 0.12);
  color: #c5ced8;
}
.console-msg {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}
.console-meta {
  color: var(--muted);
  font-size: 12px;
  font-family: var(--mono);
}
.console-round {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  min-height: 1.2em;
}
.console-out {
  margin: 0;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0a0e13;
  color: #c8d4e2;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  height: min(62vh, 640px);
  overflow: auto;
}
.runtime-alert {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(224, 177, 74, 0.32);
  background: rgba(224, 177, 74, 0.08);
  color: #f0d794;
  font-size: 14px;
  line-height: 1.5;
}

.inline-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
table.data-table { table-layout: fixed; }
table.data-table th,
table.data-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}
#dlg-article {
  width: min(920px, 94vw);
  max-height: 90vh;
}
.article-dialog { max-height: 85vh; overflow: auto; }
.article-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}
.article-head h3 { margin: 0; line-height: 1.4; }
.article-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  margin: 12px 0 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(11, 15, 20, 0.85);
}
.article-meta-grid .full { grid-column: 1 / -1; }
.article-meta-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}
.article-meta-grid strong,
.article-meta-grid p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  word-break: break-word;
}
.article-tabs {
  display: flex;
  gap: 8px;
  margin: 8px 0 12px;
}
.article-tabs button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}
.article-tabs button.active {
  color: var(--accent-ink);
  background: linear-gradient(145deg, #e8c07a, #c9924a);
  border-color: transparent;
  font-weight: 700;
}
.article-content-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: #0d1218;
  line-height: 1.7;
  max-height: 55vh;
  overflow: auto;
}
.article-content-box img { max-width: 100%; height: auto; }
.article-content-box p { margin: 0 0 12px; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(24px, -16px) scale(1.04); }
}

@media (max-width: 900px) {
  .settings-fields { grid-template-columns: 1fr; }
  .settings-fields .span-2 { grid-column: auto; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-visual {
    min-height: 240px;
    padding: 36px 24px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .app-body {
    grid-template-columns: 1fr;
    overflow-x: hidden;
  }
  .sidebar {
    position: relative;
    top: auto;
    height: auto;
    width: 100%;
    min-width: 0;
    max-width: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }
  .side-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    flex: none;
    padding-bottom: 4px;
  }
  .side-nav button {
    width: auto;
    flex: 0 0 auto;
  }
  .nav-group-label { display: none; }
  .workspace { padding: 18px 14px 40px; }
  .page-head { align-items: start; flex-direction: column; }
}
