/* 后台管理页样式 */
:root {
  --a-bg: #0b0b12;
  --a-card: #14141f;
  --a-line: rgba(255, 255, 255, 0.09);
  --a-text: #e9ecf1;
  --a-muted: #8b90a0;
  --a-accent: #7c5cff;
  --a-accent-2: #22d3ee;
  --a-danger: #ff6b6b;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

.a-body {
  background:
    radial-gradient(800px 460px at 10% -6%, rgba(124, 92, 255, .14), transparent 60%),
    var(--a-bg);
  color: var(--a-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
  font-size: 14px;
}

.a-wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

.a-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 11, 18, .88); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--a-line);
}
.a-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
}
.a-header h1 { margin: 0; font-size: 18px; letter-spacing: .5px; }

.a-btn {
  padding: 9px 14px; border-radius: 10px; font-size: 14px; cursor: pointer;
  color: var(--a-text); text-decoration: none;
  border: 1px solid var(--a-line); background: rgba(255, 255, 255, .05);
}
.a-btn:hover { border-color: rgba(124, 92, 255, .6); }
.a-btn-primary {
  background: linear-gradient(135deg, var(--a-accent), var(--a-accent-2));
  color: #0b0b12; font-weight: 700; border: none;
}
.a-btn-danger { color: var(--a-danger); border-color: rgba(255, 107, 107, .35); }
.a-btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }

.a-main { padding: 22px 0 60px; display: flex; flex-direction: column; gap: 18px; }

.a-card {
  background: var(--a-card); border: 1px solid var(--a-line);
  border-radius: 14px; padding: 18px 20px 20px;
}
.a-card h2 { margin: 0 0 14px; font-size: 16px; }

.a-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.a-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.a-field label { font-size: 13px; color: var(--a-muted); }
.a-field input, .a-field select, .a-field textarea, .a-row input, .a-row select {
  width: 100%; padding: 10px 12px; font-size: 14px; font-family: inherit;
  border-radius: 10px; border: 1px solid var(--a-line);
  background: #0f0f18; color: var(--a-text); outline: none;
}
.a-field textarea { resize: vertical; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.a-field input:focus, .a-field select:focus, .a-field textarea:focus { border-color: rgba(124, 92, 255, .7); }

.a-row { margin-bottom: 12px; }
.a-row-inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.a-row-inline > input { flex: 1 1 200px; width: auto; }
.a-row-actions { display: flex; gap: 10px; margin-top: 4px; }
.a-hint { color: var(--a-muted); font-size: 12px; margin: 8px 0 0; }
.a-check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--a-muted); white-space: nowrap; }
.a-check input { width: auto; }

.a-upload { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.a-upload input[type="file"] { flex: 1 1 220px; font-size: 13px; }
.a-preview img {
  width: 96px; height: 72px; object-fit: contain;
  background: #0c0c13; border: 1px solid var(--a-line); border-radius: 8px;
}

.a-toolbar { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.a-toolbar input, .a-toolbar select { width: auto; min-width: 180px; flex: 0 1 240px; }

.a-table-wrap { overflow-x: auto; }
.a-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.a-table th, .a-table td {
  padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--a-line);
  white-space: nowrap;
}
.a-table th { color: var(--a-muted); font-weight: 600; }
.a-table td img {
  width: 56px; height: 42px; object-fit: contain;
  background: #0c0c13; border: 1px solid var(--a-line); border-radius: 6px;
}
.a-table td a { color: var(--a-accent-2); text-decoration: none; }
.a-row-inline .a-btn { flex: none; }
.a-cat-add { margin-bottom: 14px; }
.a-cat-add input { flex: 1 1 150px; width: auto; }

@media (max-width: 720px) {
  .a-wrap { padding: 0 12px; }
  .a-header-inner { padding: 12px; }
  .a-main { padding: 14px 0 40px; }
  .a-card { padding: 14px 14px 16px; }
  .a-grid { grid-template-columns: 1fr; }
  .a-table { font-size: 12px; }
}
