/* =========================================================================
   我的小家 · 后台表单与表格（登录页 / 内容管理）
   ========================================================================= */

.notice {
  padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 16px;
  background: rgba(109, 140, 255, .14); border: 1px solid rgba(109, 140, 255, .3);
  color: var(--text);
}
.notice--error {
  background: rgba(248, 113, 113, .14);
  border-color: rgba(248, 113, 113, .35);
  color: #fca5a5;
}
html[data-theme="light"] .notice--error { color: #b91c1c; }

.field { display: block; margin-bottom: 14px; }
.field > span {
  display: block; margin-bottom: 6px; font-size: 13px; color: var(--muted);
}
.field input[type="text"],
.field input[type="password"],
.field select,
.field textarea {
  width: 100%; padding: 10px 12px; font: inherit; font-size: 14px;
  color: var(--text); background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s;
}
.field textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.5px; line-height: 1.7; resize: vertical;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(109, 140, 255, .22);
}
.field--check { display: flex; align-items: center; gap: 8px; }
.field--check input { width: 16px; height: 16px; accent-color: var(--brand); }
.field--check span { margin: 0; color: var(--text); font-size: 13.5px; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th, .table td {
  padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.table th { color: var(--muted); font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.table tbody tr:hover { background: rgba(127, 127, 127, .07); }
.table td a { transition: color .2s; }
.table td a:hover { color: var(--brand); }
.table form { display: inline; }

/* ==================== 统一后台布局（文章 | 音乐） ==================== */
.admin-hub { padding-top: 26px; }
.admin-hub__grid {
  display: grid; grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px; max-width: 1180px; align-items: start;
}
.admin-side {
  position: sticky; top: 18px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 16px; display: flex; flex-direction: column; gap: 16px;
}
.admin-side__brand { display: flex; flex-direction: column; gap: 2px; }
.admin-side__brand strong { font-size: 15px; }
.admin-side__brand small { color: var(--muted); font-size: 12px; }
.admin-side__nav { display: flex; flex-direction: column; gap: 6px; }
.admin-side__nav a {
  padding: 9px 12px; border-radius: 10px; font-size: 14px; color: var(--muted);
  border: 1px solid transparent; transition: background .2s, color .2s;
}
.admin-side__nav a:hover { background: rgba(109, 140, 255, .12); color: var(--text); }
.admin-side__nav a.is-active {
  background: linear-gradient(100deg, rgba(109, 140, 255, .22), rgba(160, 107, 255, .18));
  color: var(--text); border-color: rgba(109, 140, 255, .35); font-weight: 600;
}
.admin-side__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat-card {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 10px; display: flex; flex-direction: column;
}
.stat-card strong { font-size: 17px; line-height: 1.2; }
.stat-card span { font-size: 11px; color: var(--muted); }
.admin-side__foot { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.admin-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.admin-panel { display: flex; flex-direction: column; gap: 16px; }
.admin-panel[hidden] { display: none; }

@media (max-width: 900px) {
  .admin-hub__grid { grid-template-columns: 1fr; }
  .admin-side { position: static; }
  .admin-side__nav { flex-direction: row; }
  .admin-side__stats { grid-template-columns: repeat(4, 1fr); }
}
