:root {
  color-scheme: dark;
  font: 15px/1.55 "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  color: #edf2ff;
  background: #101723;
  --muted: #a9b6cb;
  --line: #324157;
  --accent: #bbd6ff;
  --panel: #182334;
}
* { box-sizing: border-box; }
body { margin: 0; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(28px, 3vw, 44px); line-height: 1.2; }
h2 { font-size: 20px; }
a { color: var(--accent); text-underline-offset: .25em; }
a:hover { color: #fff; }
.muted { color: var(--muted); }
.auth-layout { min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(380px, 1fr); }
.artwork { position: relative; background: #152747; }
.artwork img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: 51% 65%; }
.artwork::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 68%, #10172355); }
.auth-panel {
  display: grid;
  align-items: center;
  padding: 44px clamp(28px, 3.5vw, 76px);
  border-left: 1px solid #263852;
  background: radial-gradient(ellipse at 88% 5%, #192941, transparent 58%), #101723;
}
.auth-content { width: 100%; max-width: 410px; margin: auto; }
.brand {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  gap: 11px;
  color: #edf2ff;
  text-decoration: none;
  font-size: 24px;
  font-weight: 720;
}
.brand span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #d7e7ff;
  border-radius: 12px;
  background: linear-gradient(145deg, #deebff, #87a9e7);
  color: #213355;
  font-size: 24px;
}
.auth-content > .brand { margin-bottom: clamp(25px, 6vh, 56px); }
.auth-logo { width: 38px; height: 38px; object-fit: contain; border-radius: 9px; }
.front-notice { overflow-wrap: anywhere; }
.front-notice p { margin-top: 5px; }
.auth-content h1 + p { margin: 10px 0 22px; }
.tabs { display: flex; gap: 28px; margin: 18px 0 24px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 6px 2px 10px; color: var(--muted); text-decoration: none; }
.tabs [aria-current] { color: #f7faff; border-bottom: 2px solid var(--accent); }
.auth-fields, .fields { display: grid; gap: 14px; }
label { display: block; margin: 0 0 6px; font-size: 14px; font-weight: 600; }
input, select, textarea, button, a.primary { font: inherit; color: inherit; border: 1px solid var(--line); border-radius: 9px; }
input, select, textarea { width: 100%; min-width: 0; padding: 10px 12px; background: #111a29; }
textarea { resize: vertical; }
.auth-fields input { min-height: 46px; }
button, a.primary { padding: 9px 14px; background: #253449; cursor: pointer; }
.primary, a.primary { color: #14253d; background: var(--accent); border-color: var(--accent); font-weight: 700; text-decoration: none; }
button:hover, a.primary:hover { filter: brightness(1.12); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.primary.wide { display: block; width: 100%; min-height: 46px; text-align: center; }
.auth-links, .key-block { margin-top: 17px; }
.key-block { margin-bottom: 22px; }
.key-block input { font-family: ui-monospace, monospace; }
small { display: block; padding-top: 5px; }
.errorlist { margin: 5px 0 0; padding: 0; list-style: none; color: #ffb1b8; font-size: 14px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 16px max(20px, 4vw); border-bottom: 1px solid var(--line); }
.management-nav {
  display: flex;
  gap: 6px;
  padding: 8px max(20px, 4vw) 0;
  border-bottom: 1px solid var(--line);
  background: #141e2d;
}
.management-nav a {
  padding: 9px 16px;
  border-bottom: 2px solid transparent;
  border-radius: 8px 8px 0 0;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.management-nav a:hover { background: #202e43; color: #f7faff; }
.management-nav [aria-current="page"] { background: #253750; color: #f7faff; border-color: var(--accent); }
.toolbar { display: flex; align-items: center; gap: 12px; }
.wrap { flex-wrap: wrap; }
.desk { max-width: 1340px; margin: auto; padding: clamp(22px, 5vw, 64px); }
.desk > h1 { margin: 15px 0; font-size: clamp(28px, 3vw, 38px); }
.filters { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; padding: 16px 0; }
.filters a { align-self: end; padding-bottom: 9px; }
.card, .table-wrap { border: 1px solid var(--line); background: var(--panel); border-radius: 12px; }
.card { padding: 23px; }
.card h2, .card p { margin-bottom: 12px; }
.account-card { max-width: 600px; margin-top: 20px; }
.account-card h2 { margin-top: 12px; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; text-align: left; }
td, th { padding: 12px 15px; border-bottom: 1px solid var(--line); }
thead { color: var(--muted); }
tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
.status { display: inline-block; border-radius: 6px; padding: 3px 9px; background: #2a3b53; color: #d7e3f5; font-size: 13px; }
.status[data-status="active"] { background: #214157; color: #bae7ff; }
.status[data-status="canvas-admin"] { background: #343554; color: #e0ddff; }
.status[data-status="expired"], .status[data-status="paused"] { background: #44353c; color: #ffd5c7; }
.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 18px; margin-top: 20px; }
.notice { margin: 16px 0; padding: 11px 15px; border: 1px solid #42638e; border-radius: 9px; background: #21344a; }
.notice.error { background: #382c3b; border-color: #764858; }
.manage-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 12px 0 18px; }
.manage-heading p { margin: 8px 0 0; }
.manage-heading h2 { margin: 0; }
.button-link { border: 1px solid var(--line); background: #1b293d; padding: 9px 14px; border-radius: 9px; text-decoration: none; }
.ops-tabs { flex-wrap: wrap; column-gap: 26px; row-gap: 4px; }
.ops-form { display: grid; gap: 17px; }
.ops-fields {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 15px 20px;
}
.ops-fields legend { color: var(--accent); padding: 0 7px; }
.ops-fields div:has(textarea), .ops-fields > .errorlist { grid-column: 1 / -1; }
.ops-fields div:has(input[type="checkbox"]) { display: flex; gap: 8px; align-items: center; }
.ops-fields input[type="checkbox"] { width: auto; margin: 0; }
.ops-fields div:has(input[type="checkbox"]) label { margin: 0; }
.ops-preview { display: grid; gap: 12px; }
.ops-preview h2, .ops-preview p { margin-bottom: 0; }
.ops-preview figure { margin: 0; min-width: 0; }
.ops-preview figcaption { color: var(--muted); margin: 6px 0; }
.preview-logo { max-width: 180px; max-height: 64px; }
.preview-banner { display: block; width: 100%; aspect-ratio: 1635 / 277; object-fit: cover; background: #233751; border-radius: 10px; }
.preview-images { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 15px; max-width: 630px; }
.preview-images img { width: 100%; aspect-ratio: 5 / 3; object-fit: cover; border-radius: 8px; }
.danger { color: #ffc6c9; border-color: #814c5c; }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: flex; gap: 10px; flex-wrap: wrap; padding: 7px 0; border-bottom: 1px solid var(--line); }
.pages { display: flex; justify-content: end; gap: 12px; margin-top: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 750px) {
  .auth-layout { grid-template-columns: 1fr; grid-template-rows: clamp(125px, 24svh, 220px) auto; }
  .artwork img { object-position: 50% 69%; }
  .auth-panel { border-left: 0; border-top: 1px solid var(--line); padding: 26px clamp(20px, 7vw, 56px); align-items: start; }
  .auth-content { margin: 0 auto; }
  .top { flex-wrap: wrap; }
}
