/* ==========================================================================
   aran 导航 · 后台样式（与前台同一套深色霓虹语言）
   ========================================================================== */
:root {
  --bg: #06070d;
  --ink: #e9eefb;
  --ink-dim: #aab3c9;
  --muted: #7b86a1;
  --line: rgba(255, 255, 255, 0.08);
  --cyan: #22d3ee;
  --violet: #a855f7;
  --danger: #f43f5e;
  --ok: #34d399;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SF Mono", Consolas, monospace;
}

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

body {
  min-height: 100vh;
  background:
    radial-gradient(760px 360px at 12% -14%, rgba(34, 211, 238, 0.16), transparent 64%),
    radial-gradient(700px 340px at 88% -12%, rgba(168, 85, 247, 0.15), transparent 62%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.aurora { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.aurora::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(6, 7, 13, 0) 0,
      rgba(6, 7, 13, 0.62) 30%,
      rgba(6, 7, 13, 0.94) 52%,
      var(--bg) 70%);
}
.aurora i {
  position: absolute; display: block; border-radius: 50%;
  filter: blur(110px); opacity: 0.20;
}
.aurora i:nth-child(1) { width: 380px; height: 300px; top: -160px; left: 4%; background: #06b6d4; }
.aurora i:nth-child(2) { width: 340px; height: 280px; top: -150px; right: 2%; background: #9333ea; }

/* ---------- 顶栏 ---------- */
.abar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 26px;
  background: rgba(6, 7, 13, 0.78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.abar-left { display: flex; align-items: center; gap: 9px; }
.abar-right { display: flex; gap: 8px; }

.logo {
  font-size: 18px; font-weight: 800; letter-spacing: 0.16em;
  background: linear-gradient(100deg, #67e8f9, #a855f7 65%, #f472b6);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.badge {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em;
  padding: 2px 7px; border-radius: 6px; color: #a5f3fc;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.08);
}

/* ---------- 布局 ---------- */
.awrap { max-width: 1180px; margin: 0 auto; padding: 24px 22px 80px; }

.stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.stat {
  flex: 1 1 150px; padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
}
.stat b {
  display: block; font-size: 24px; font-weight: 700;
  font-family: var(--mono); color: #a5f3fc;
  text-shadow: 0 0 22px rgba(34, 211, 238, 0.45);
}
.stat span { font-size: 12px; color: var(--muted); }

.panel {
  margin-bottom: 18px; padding: 18px 18px 20px;
  border-radius: 16px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008));
}
.panel h2 {
  display: flex; align-items: center; gap: 9px;
  margin: 0 0 14px; font-size: 14.5px; font-weight: 650; letter-spacing: 0.05em;
  color: #e6ecfa;
}
.panel h2 small { color: var(--muted); font-weight: 400; font-size: 12px; }
.panel h2 .dot {
  width: 8px; height: 8px; border-radius: 50%;
  box-shadow: 0 0 12px currentColor;
}

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 11.5px; letter-spacing: 0.05em; color: var(--muted); }

input, select, button { font-family: var(--font); font-size: 13.5px; }

input[type="text"], input[type="password"], input[type="search"],
input:not([type]), select {
  width: 100%; height: 38px; padding: 0 11px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: 0;
  transition: border-color 0.15s, box-shadow 0.2s, background 0.15s;
}
input:focus, select:focus {
  border-color: rgba(34, 211, 238, 0.65);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
  background: rgba(255, 255, 255, 0.06);
}
select { appearance: none; cursor: pointer; }
select option { background: #0b0e18; }

input.color {
  width: 42px; height: 38px; padding: 3px; cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line); border-radius: 9px;
}

.grid-form {
  display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: 12px;
  align-items: end;
}
.grid-form .wide { grid-column: span 1; }
.grid-form .actions { grid-column: 3; justify-self: end; }

.inline-form { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.inline-form input:not([type="color"]) { flex: 1 1 180px; width: auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; padding: 0 14px;
  border-radius: 9px; cursor: pointer;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  transition: color 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.2s;
  white-space: nowrap;
}
.btn:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.btn.primary {
  color: #04121a; font-weight: 600;
  border-color: transparent;
  background: linear-gradient(100deg, #67e8f9, #22d3ee 55%, #38bdf8);
  box-shadow: 0 8px 26px -12px rgba(34, 211, 238, 0.9);
}
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.danger { color: #fda4af; border-color: rgba(244, 63, 94, 0.3); background: rgba(244, 63, 94, 0.1); }
.btn.danger:hover { background: rgba(244, 63, 94, 0.2); color: #fff; }
.btn.block { width: 100%; height: 42px; }

/* ---------- 提示 ---------- */
.alert {
  margin-bottom: 14px; padding: 10px 14px; border-radius: 10px; font-size: 13.5px;
}
.alert.ok { color: #a7f3d0; background: rgba(52, 211, 153, 0.1); border: 1px solid rgba(52, 211, 153, 0.3); }
.alert.err { color: #fecdd3; background: rgba(244, 63, 94, 0.1); border: 1px solid rgba(244, 63, 94, 0.32); }

.empty { margin: 6px 0; font-size: 13px; color: var(--muted); }

/* ---------- 分类行 ---------- */
.cat-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.cat-row {
  display: flex; gap: 8px; align-items: center;
  padding: 8px; border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
}
.cat-edit { display: flex; gap: 8px; flex: 1; align-items: center; }
.cat-edit input:not([type="color"]) { flex: 1; }
.cat-del { flex: none; }

/* ---------- 链接行 ---------- */
.link-list { display: flex; flex-direction: column; gap: 7px; }
.link-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1.5fr) minmax(0, 1fr) auto auto;
  gap: 8px; align-items: center;
  padding: 7px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.045);
  background: rgba(255, 255, 255, 0.016);
}
.link-row input { height: 34px; font-size: 13px; }
.link-row .w-name { font-weight: 550; }
.link-row .w-url { font-family: var(--mono); font-size: 12px; color: #9fb4d0; }
.link-row .btn { height: 34px; padding: 0 10px; }

/* ---------- 登录页 ---------- */
.auth-body { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.auth-card {
  width: 100%; max-width: 372px; padding: 30px 28px 24px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(18, 22, 36, 0.92), rgba(9, 11, 19, 0.92));
  box-shadow: 0 30px 80px -40px #000, 0 0 60px -30px rgba(34, 211, 238, 0.6);
  backdrop-filter: blur(14px);
}
.auth-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 18px; }
.auth-card h1 { margin: 0 0 4px; font-size: 19px; font-weight: 650; letter-spacing: 0.02em; }
.auth-card .sub { margin: 0 0 20px; font-size: 13px; color: var(--muted); }
.auth-card .field { margin-bottom: 14px; }
.auth-card input { height: 42px; }
.auth-card .back {
  display: block; margin-top: 16px; text-align: center;
  font-size: 12.5px; color: var(--muted);
}
.auth-card .back:hover { color: #67e8f9; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .grid-form { grid-template-columns: 1fr; }
  .grid-form .actions { grid-column: 1; justify-self: stretch; }
  .link-row { grid-template-columns: 1fr 1fr; }
  .link-row .w-url, .link-row .w-desc { grid-column: span 2; }
  .link-row .btn { width: 100%; }
}
@media (max-width: 560px) {
  .abar { padding: 11px 14px; }
  .awrap { padding: 16px 14px 60px; }
  .panel { padding: 14px; }
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #06070d; }
::-webkit-scrollbar-thumb { background: #1d2438; border-radius: 8px; border: 2px solid #06070d; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
