:root {
  --bg: #0c0c0c;
  --panel: #111111;
  --panel-2: #151515;
  --ink: #e8e5e0;
  --muted: #8b8781;
  --faint: #615d58;
  --line: rgba(233, 230, 225, 0.1);
  --line-soft: rgba(233, 230, 225, 0.055);
  --accent: #cfcac3;
  --serif: "Didot", "Bodoni 72", "Songti SC", "STSong", "Times New Roman", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 13px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button, input, select, textarea { font-family: inherit; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: var(--accent); color: #0b0b0b; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0c0c0c; }
::-webkit-scrollbar-thumb { background: #2b2a28; border-radius: 4px; }

/* --------------------------------------------------------------- sidebar */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 246px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  padding: 26px 18px 20px;
  background: #090909;
  border-right: 1px solid var(--line);
}
.side-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 8px 24px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 18px;
}
.side-mark { width: 26px; height: 26px; color: #d8d3cc; flex: none; }
.side-brand strong { display: block; font-size: 15px; font-weight: 400; letter-spacing: 0.14em; line-height: 1.2; }
.side-brand small { display: block; margin-top: 5px; font-size: 7.5px; letter-spacing: 0.2em; color: var(--muted); }

.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 5px;
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: #9c9892;
  transition: background 0.3s ease, color 0.3s ease;
}
.side-nav a svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.2; }
.side-nav a:hover { background: rgba(233, 230, 225, 0.035); color: var(--ink); }
.side-nav a.is-active { background: rgba(233, 230, 225, 0.075); color: var(--ink); }
.side-nav a.is-active::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 50%;
  width: 2px;
  height: 18px;
  background: var(--accent);
  transform: translateY(-50%);
}
.side-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--accent);
  color: #0b0b0b;
  font-size: 9.5px;
  font-style: normal;
}

.side-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.side-site {
  display: flex;
  justify-content: space-between;
  padding: 8px;
  font-size: 11.5px;
  color: #9c9892;
  letter-spacing: 0.06em;
  transition: color 0.3s ease;
}
.side-site:hover { color: var(--ink); }
.side-user { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 14px 8px 0; border-top: 1px solid var(--line-soft); }
.side-avatar {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #201f1d;
  border: 1px solid var(--line);
  font-size: 11.5px;
  color: #d8d3cc;
}
.side-user strong { display: block; font-size: 11.5px; font-weight: 400; }
.side-user small { display: block; font-size: 9px; color: var(--faint); letter-spacing: 0.1em; }
.side-user form { margin-left: auto; }
.side-logout {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.side-logout:hover { color: var(--ink); border-color: rgba(233, 230, 225, 0.3); }

/* ------------------------------------------------------------ main frame */
.admin-main {
  margin-left: 246px;
  padding: 36px clamp(22px, 3.2vw, 50px) 90px;
  max-width: 1360px;
}
.admin-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.admin-eyebrow { font-size: 8.5px; letter-spacing: 0.3em; color: var(--faint); margin-bottom: 9px; }
.admin-top h1 { font-size: clamp(23px, 2.8vw, 32px); font-weight: 300; letter-spacing: 0.04em; line-height: 1.2; }
.admin-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.btn-admin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 17px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s var(--ease);
}
.btn-admin:hover { border-color: rgba(233, 230, 225, 0.32); transform: translateY(-1px); }
.btn-admin.primary { background: var(--ink); border-color: var(--ink); color: #0b0b0b; }
.btn-admin.primary:hover { background: #fff; border-color: #fff; }
.btn-admin.ghost { color: var(--muted); }
.btn-admin.ghost:hover { color: var(--ink); }
.btn-admin.wide { width: 100%; }

/* ----------------------------------------------------------------- panel */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px 26px;
  margin-bottom: 20px;
}
.panel.narrow { max-width: 640px; }
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.panel-head h2 { font-size: 14.5px; font-weight: 400; letter-spacing: 0.06em; }
.panel-head p { margin-top: 5px; font-size: 10.5px; color: var(--faint); line-height: 1.7; }
.panel-head > a { font-size: 10.5px; color: var(--muted); white-space: nowrap; transition: color 0.3s ease; }
.panel-head > a:hover { color: var(--ink); }
.panel-meta { font-size: 10px; color: var(--faint); letter-spacing: 0.1em; white-space: nowrap; }

/* ---------------------------------------------------------------- stats */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-card {
  display: flex;
  flex-direction: column;
  min-height: 142px;
  padding: 20px 20px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color 0.4s ease, background 0.4s ease, transform 0.4s var(--ease);
}
.stat-card:hover { border-color: rgba(233, 230, 225, 0.24); background: #131313; transform: translateY(-2px); }
.stat-icon { width: 17px; height: 17px; fill: none; stroke: #77736e; stroke-width: 1.2; }
.stat-value { margin-top: auto; font-family: var(--serif); font-size: 38px; font-weight: 400; line-height: 1; letter-spacing: 0.01em; }
.stat-label { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }
.stat-label em { font-style: normal; font-size: 9.5px; color: var(--faint); }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; }

.msg-mini { list-style: none; margin: 0; padding: 0; }
.msg-mini li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line-soft);
}
.msg-mini li:first-child { border-top: 0; padding-top: 2px; }
.msg-dot { width: 6px; height: 6px; flex: none; margin-top: 7px; border-radius: 50%; border: 1px solid #4a4743; }
.is-unread .msg-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px rgba(207, 202, 195, 0.07); }
.msg-main { flex: 1; min-width: 0; }
.msg-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.msg-line strong { font-size: 12.5px; font-weight: 400; letter-spacing: 0.03em; }
.msg-line time { margin-left: auto; font-size: 9.5px; color: var(--faint); letter-spacing: 0.06em; white-space: nowrap; }
.msg-main p { margin-top: 6px; font-size: 11.5px; color: #918c86; line-height: 1.7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-contact { flex: none; margin-left: 10px; font-size: 10.5px; color: #a9a49d; white-space: nowrap; }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9px;
  letter-spacing: 0.05em;
  color: var(--muted);
  white-space: nowrap;
}

.work-mini { list-style: none; margin: 0; padding: 0; }
.work-mini li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.work-mini li:first-child { border-top: 0; padding-top: 2px; }
.work-mini img { width: 38px; height: 48px; flex: none; object-fit: cover; filter: grayscale(1); border-radius: 2px; }
.work-mini div { flex: 1; min-width: 0; }
.work-mini strong { display: block; font-size: 11.5px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-mini span { display: block; margin-top: 2px; font-size: 9.5px; color: var(--faint); }
.work-mini a { font-size: 10px; color: var(--muted); }
.work-mini a:hover { color: var(--ink); }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 34px 10px;
  text-align: center;
  font-size: 11.5px;
  color: var(--faint);
  line-height: 1.8;
}

/* ---------------------------------------------------------------- table */
.table-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
.admin-table { width: 100%; min-width: 720px; border-collapse: collapse; }
.admin-table th {
  padding: 0 12px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 8.5px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--faint);
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.admin-table td { padding: 13px 12px; border-bottom: 1px solid var(--line-soft); font-size: 11.5px; vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr { transition: background 0.3s ease; }
.admin-table tbody tr:hover { background: rgba(233, 230, 225, 0.016); }
.admin-table .right { text-align: right; }
.admin-table .muted { color: var(--muted); }
.work-cell { display: flex; align-items: center; gap: 12px; }
.work-cell img { width: 42px; height: 54px; object-fit: cover; filter: grayscale(1); border-radius: 2px; flex: none; }
.work-cell strong { display: block; font-size: 12px; font-weight: 400; }
.work-cell span { display: block; margin-top: 3px; font-size: 8.5px; letter-spacing: 0.14em; color: var(--faint); text-transform: uppercase; }

.media-tag { display: inline-block; padding: 3px 8px; border: 1px solid var(--line); border-radius: 3px; font-size: 9.5px; color: var(--muted); }
.media-tag.video { color: #d8d3cc; border-color: rgba(233, 230, 225, 0.24); background: rgba(233, 230, 225, 0.035); }
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 9.5px;
  color: var(--muted);
}
.status::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: 0.55; }
.status.on { color: var(--accent); border-color: rgba(207, 202, 195, 0.28); background: rgba(207, 202, 195, 0.05); }
.status.on::before { opacity: 1; }

.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.row-actions form { margin: 0; }
.row-actions a,
.row-actions button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.3s ease;
  white-space: nowrap;
}
.row-actions a:hover,
.row-actions button:hover { color: var(--ink); }
.row-actions .danger:hover { color: #d6a99b; }

/* ---------------------------------------------------------------- forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.form-grid.single { grid-template-columns: 1fr; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full,
.form-grid .full { grid-column: 1 / -1; }
.field > span { font-size: 9.5px; letter-spacing: 0.12em; color: #9a958e; }
.field > span i { font-style: normal; color: var(--accent); margin-left: 2px; }
.field input[type="text"],
.field input[type="password"],
.field input[type="number"],
.field input[type="email"],
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #0d0d0d;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 300;
  line-height: 1.6;
  letter-spacing: 0.02em;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.field textarea { resize: vertical; line-height: 1.85; min-height: 96px; }
.field input::placeholder,
.field textarea::placeholder { color: #4f4c48; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(233, 230, 225, 0.36);
  background: #0f0f0f;
}
.field small { font-size: 9.5px; color: var(--faint); line-height: 1.6; }
.field select { -webkit-appearance: none; appearance: none; }

.form-actions { margin-top: 8px; }
.form-error {
  margin-bottom: 18px;
  padding: 10px 12px;
  border: 1px solid rgba(214, 169, 155, 0.3);
  border-radius: 4px;
  background: rgba(214, 169, 155, 0.06);
  color: #d6a99b;
  font-size: 11.5px;
}
.field .stat-inputs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 2px; }
.stat-inputs input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #0d0d0d;
  color: var(--ink);
  font-size: 12px;
  transition: border-color 0.3s ease;
}
.stat-inputs input:focus { outline: none; border-color: rgba(233, 230, 225, 0.36); }

/* --------------------------------------------------------------- uploads */
.upload-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px 18px;
  border: 1px dashed rgba(233, 230, 225, 0.18);
  border-radius: 6px;
  background: rgba(233, 230, 225, 0.012);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.upload-box:hover { border-color: rgba(233, 230, 225, 0.34); background: rgba(233, 230, 225, 0.03); }
.upload-box input[type="file"] { display: none; }
.upload-box svg { width: 20px; height: 20px; fill: none; stroke: #8f8a84; stroke-width: 1.2; }
.upload-box strong { font-size: 11.5px; font-weight: 400; letter-spacing: 0.04em; }
.upload-box span { font-size: 9.5px; color: var(--faint); }
.upload-box em { font-style: normal; font-size: 10px; color: var(--accent); word-break: break-all; }
.upload-box.compact { padding: 16px 12px; }
.upload-box.compact strong { font-size: 10.5px; }

.media-current,
.poster-current {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding: 9px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: #0d0d0d;
}
.media-current video { width: 190px; max-height: 110px; object-fit: cover; border-radius: 2px; background: #000; }
.poster-current img { width: 54px; height: 68px; object-fit: cover; filter: grayscale(1); border-radius: 2px; }
.media-current p,
.poster-current p { min-width: 0; font-size: 9px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.media-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}
.media-field { padding: 14px; border: 1px solid var(--line-soft); border-radius: 6px; background: #0e0e0e; }
.media-field-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.media-field-head strong { font-size: 11px; font-weight: 400; letter-spacing: 0.04em; }
.media-field-head span { font-size: 8.5px; color: var(--faint); text-align: right; line-height: 1.5; }
.media-field-body { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 14px; align-items: start; }
.media-preview { width: 100%; height: 104px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line-soft); background: #000; filter: grayscale(1); }
.media-preview.is-video { object-fit: cover; }
.media-preview.empty { display: grid; place-items: center; font-size: 8.5px; color: var(--faint); height: 104px; }
.media-field-inputs { display: flex; flex-direction: column; gap: 10px; }
.media-field-inputs .upload-box { padding: 12px 10px; }
.media-field-inputs .field > span { font-size: 8.5px; }

/* --------------------------------------------------------------- editor */
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 318px; gap: 20px; align-items: start; }
.editor-side .panel { padding: 20px; }
.editor-side { position: sticky; top: 24px; }
.switch { display: flex; align-items: center; gap: 12px; padding: 2px 0 20px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { position: relative; width: 34px; height: 18px; flex: none; border-radius: 9px; background: #2a2927; transition: background 0.3s ease; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: #8b8781; transition: transform 0.3s var(--ease), background 0.3s ease; }
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(16px); background: #0b0b0b; }
.switch-text { font-size: 11.5px; color: var(--ink); }
.switch-text em { display: block; margin-top: 3px; font-style: normal; font-size: 9.5px; color: var(--faint); }
.side-note p { font-size: 11px; line-height: 1.95; color: var(--muted); margin-bottom: 14px; }
.text-link { font-size: 10.5px; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.text-link:hover { color: var(--ink); border-color: var(--ink); }
.editor-save { display: flex; flex-direction: column; gap: 8px; position: sticky; bottom: 18px; }

.save-bar {
  position: sticky;
  bottom: 16px;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 13, 13, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.save-bar p { font-size: 10.5px; color: var(--faint); }
.save-bar > div { display: flex; gap: 9px; }

/* -------------------------------------------------------------- messages */
.message-list { display: flex; flex-direction: column; gap: 12px; }
.msg-card {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  transition: border-color 0.3s ease, background 0.3s ease;
}
.msg-card.is-unread { border-color: rgba(233, 230, 225, 0.22); background: linear-gradient(90deg, rgba(233, 230, 225, 0.028), transparent 45%), var(--panel); }
.msg-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.msg-person { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.msg-person strong { font-size: 13px; font-weight: 400; letter-spacing: 0.04em; }
.msg-card-head time { font-size: 9.5px; color: var(--faint); letter-spacing: 0.06em; white-space: nowrap; }
.msg-card-body { margin-top: 14px; }
.msg-card-body > p { font-size: 12.5px; line-height: 1.95; color: #c2bdb6; white-space: pre-wrap; }
.msg-meta { display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 3px; }
.msg-meta span { font-size: 8.5px; letter-spacing: 0.14em; color: var(--faint); }
.msg-meta strong { font-size: 11.5px; font-weight: 400; color: #d8d3cc; }
.msg-card-foot { display: flex; gap: 18px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.msg-card-foot form { margin: 0; }
.link-btn { padding: 0; border: 0; background: none; color: var(--muted); font-size: 10.5px; letter-spacing: 0.04em; cursor: pointer; transition: color 0.3s ease; }
.link-btn:hover { color: var(--ink); }
.link-btn.danger:hover { color: #d6a99b; }

/* ---------------------------------------------------------------- toasts */
.toasts { position: fixed; top: 20px; right: 24px; z-index: 120; display: flex; flex-direction: column; gap: 8px; }
.toast {
  min-width: 240px;
  max-width: 360px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 4px;
  background: #161616;
  color: var(--ink);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  animation: toastIn 0.5s var(--ease) both;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.toast.error { border-left-color: #d6a99b; }
.toast.out { opacity: 0; transform: translateX(12px); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ----------------------------------------------------------------- login */
.login-page { min-height: 100svh; display: grid; place-items: center; padding: 40px; position: relative; overflow: hidden; }
.login-bg { position: absolute; inset: 0; background-position: center; background-size: cover; filter: grayscale(1) brightness(0.4) contrast(1.05); transform: scale(1.03); }
.login-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 70% at 25% 40%, rgba(8, 8, 8, 0.55), transparent 70%),
    linear-gradient(90deg, rgba(6, 6, 6, 0.94) 0%, rgba(6, 6, 6, 0.6) 55%, rgba(6, 6, 6, 0.9) 100%);
}
.login-wrap { position: relative; z-index: 2; width: min(1080px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) 408px; gap: clamp(40px, 7vw, 100px); align-items: center; }
.login-quote .eyebrow { display: flex; align-items: center; gap: 14px; font-size: 9px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--accent); }
.login-quote .eyebrow::before { content: ""; width: 34px; height: 1px; background: currentColor; opacity: 0.5; }
.login-quote h1 { margin: 24px 0; font-size: clamp(38px, 5vw, 64px); font-weight: 200; line-height: 1.26; letter-spacing: 0.05em; }
.login-quote h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); }
.login-quote > p:last-child { max-width: 340px; font-size: 12px; line-height: 2; color: #a19c95; }
.login-card {
  padding: 36px 34px 28px;
  background: rgba(13, 13, 13, 0.9);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.login-brand { display: flex; align-items: center; gap: 12px; padding-bottom: 22px; border-bottom: 1px solid var(--line-soft); margin-bottom: 26px; }
.login-brand svg { width: 28px; height: 28px; color: #d8d3cc; flex: none; }
.login-brand span { font-size: 13px; letter-spacing: 0.16em; }
.login-brand small { display: block; margin-top: 4px; font-size: 7.5px; letter-spacing: 0.22em; color: var(--muted); }
.login-card h2 { font-size: 25px; font-weight: 300; letter-spacing: 0.05em; margin-bottom: 8px; }
.login-hint { font-size: 11px; color: var(--muted); margin-bottom: 24px; line-height: 1.8; }
.login-error { padding: 10px 12px; margin-bottom: 18px; border: 1px solid rgba(214, 169, 155, 0.3); border-radius: 4px; background: rgba(214, 169, 155, 0.06); color: #d6a99b; font-size: 11.5px; }
.login-form { display: flex; flex-direction: column; gap: 18px; }
.login-form .btn-admin { margin-top: 6px; }
.login-form .btn-admin span { transition: transform 0.3s var(--ease); }
.login-form .btn-admin:hover span { transform: translateX(3px); }
.login-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line-soft); font-size: 9.5px; color: var(--faint); letter-spacing: 0.05em; }
.login-foot a:hover { color: var(--ink); }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1100px) {
  .editor-grid { grid-template-columns: 1fr; }
  .editor-side { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
  .editor-save { position: static; grid-column: 1 / -1; flex-direction: row; }
  .media-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .sidebar {
    position: sticky;
    top: 0;
    inset: auto;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 12px 18px;
    background: rgba(9, 9, 9, 0.96);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
  }
  .side-brand { padding: 0 14px 0 0; margin: 0; border-bottom: 0; border-right: 1px solid var(--line-soft); gap: 9px; }
  .side-brand small { display: none; }
  .side-brand strong { font-size: 12px; letter-spacing: 0.1em; white-space: nowrap; }
  .side-mark { width: 22px; height: 22px; }
  .side-nav { flex-direction: row; gap: 2px; flex: 1; }
  .side-nav a { padding: 8px 10px; font-size: 11px; white-space: nowrap; }
  .side-nav a.is-active::before { display: none; }
  .side-nav a svg { width: 14px; height: 14px; }
  .side-badge { display: none; }
  .side-foot { display: none; }
  .admin-main { margin-left: 0; padding: 24px 20px 70px; max-width: none; }
  .login-wrap { grid-template-columns: 1fr; width: min(420px, 100%); }
  .login-quote { display: none; }
  .login-page { padding: 22px; }
}

@media (max-width: 680px) {
  .admin-top { align-items: flex-start; }
  .admin-actions { width: 100%; }
  .admin-actions .btn-admin { flex: 1; }
  .panel { padding: 18px 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { min-height: 126px; padding: 16px; }
  .stat-value { font-size: 32px; }
  .msg-line time { margin-left: 0; width: 100%; }
  .msg-contact { display: none; }
  .msg-main p { white-space: normal; }
  .editor-side { grid-template-columns: 1fr; }
  .editor-save { flex-direction: column; }
  .media-field-body { grid-template-columns: 1fr; }
  .media-preview { height: 130px; }
  .field .stat-inputs { grid-template-columns: repeat(2, 1fr); }
  .save-bar { flex-direction: column; align-items: flex-start; }
  .save-bar > div { width: 100%; }
  .save-bar .btn-admin { flex: 1; }
  .toasts { top: 12px; left: 16px; right: 16px; }
  .toast { min-width: 0; max-width: none; }
  .login-card { padding: 28px 22px 24px; }
  .side-nav { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .msg-card { padding: 16px; }
  .msg-card-head { flex-wrap: wrap; }
  .msg-card-head time { width: 100%; }
}
