/* ==========================================================
   JDAO 官网 · 后台样式
   ========================================================== */
:root {
  --brand: #184ff5;
  --brand-ink: #0b2fb0;
  --brand-soft: #eaf0ff;
  --ink: #0b1b33;
  --ink-2: #24344f;
  --muted: #5e708f;
  --muted-2: #93a3bd;
  --line: #e6ecf7;
  --bg: #f5f7fc;
  --navy: #0c1a33;
  --ok: #0d9668;
  --danger: #e5484d;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
b, strong { font-weight: 700; }
table { border-collapse: collapse; width: 100%; }
button { font: inherit; cursor: pointer; }

.ico { width: 18px; height: 18px; flex: none; }
.ico.xs { width: 14px; height: 14px; }
.ico.sm { width: 16px; height: 16px; }
.ico.lg { width: 24px; height: 24px; }

/* ---------- 布局 ---------- */
.ad-wrap { display: flex; min-height: 100vh; }

.ad-side {
  width: 232px;
  flex: none;
  background: linear-gradient(180deg, #0d1b33, #0a1528);
  color: rgba(255, 255, 255, .7);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.ad-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 20px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.ad-logo-mark {
  width: 34px; height: 34px;
  display: block;
  background: none;
  border-radius: 0;
  flex: none;
  object-fit: contain;
}
.ad-logo-txt { display: flex; flex-direction: column; line-height: 1.25; }
.ad-logo-txt b { color: #fff; font-size: 15px; letter-spacing: 1px; }
.ad-logo-txt i { font-style: normal; font-size: 10.5px; color: rgba(255, 255, 255, .4); letter-spacing: 1.6px; }

.ad-nav { padding: 12px 10px 20px; flex: 1; }
.ad-nav a {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, .66);
  margin-bottom: 2px;
  transition: all .18s;
}
.ad-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.ad-nav a.on { background: var(--brand); color: #fff; box-shadow: 0 8px 18px -10px rgba(24, 79, 245, .9); }
.ad-nav .ico { opacity: .85; }
.ad-group {
  font-size: 10.5px; letter-spacing: 1.4px;
  color: rgba(255, 255, 255, .28);
  padding: 16px 12px 7px;
  text-transform: uppercase;
}
.ad-badge {
  margin-left: auto;
  background: #ff5c5c;
  color: #fff;
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 600;
}
.ad-side-foot {
  padding: 14px 18px 20px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12.5px;
}
.ad-side-foot a { color: rgba(255, 255, 255, .45); display: flex; align-items: center; gap: 5px; }
.ad-side-foot a:hover { color: #fff; }

.ad-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ad-top {
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
  padding: 0 28px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.ad-top-l { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.ad-top h1 { font-size: 17px; letter-spacing: -.3px; }
.ad-sub { font-size: 12.5px; color: var(--muted-2); }
.ad-top-r { display: flex; align-items: center; gap: 14px; }
.ad-user { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); }

.ad-body { padding: 22px 28px 40px; flex: 1; }
.ad-foot {
  padding: 14px 28px 22px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 11.5px;
  color: var(--muted-2);
}

/* ---------- 按钮 ---------- */
.ad-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 36px; padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink-2);
  font-size: 13px; font-weight: 500;
  transition: all .18s;
  white-space: nowrap;
}
.ad-btn:hover { border-color: #c3d3ef; color: var(--brand); }
.ad-btn-primary {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 8px 18px -12px rgba(24, 79, 245, .9);
}
.ad-btn-primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }
.ad-btn-ghost { background: transparent; }

/* ---------- 提示 ---------- */
.ad-alert {
  margin: 18px 28px -6px;
  padding: 10px 15px;
  border-radius: 9px;
  font-size: 13px;
}
.ad-alert.ok { background: #e9f9f1; color: #0a7a52; border: 1px solid #c6efdb; }
.ad-alert.err { background: #fef0f0; color: #c3272b; border: 1px solid #fad4d4; }

/* ---------- 概览卡片 ---------- */
.ad-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.ad-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 20px;
  display: flex; align-items: center; gap: 14px;
}
.ad-card-ico {
  width: 40px; height: 40px; flex: none;
  border-radius: 11px;
  display: grid; place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
}
.ad-card b { display: block; font-size: 22px; letter-spacing: -.6px; line-height: 1.3; }
.ad-card span { font-size: 12.5px; color: var(--muted); }
.ad-card > a { margin-left: auto; font-size: 12.5px; color: var(--brand); font-weight: 500; }
.ad-card > a:hover { text-decoration: underline; }

/* ---------- 面板 ---------- */
.ad-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 18px;
  overflow: hidden;
}
.ad-panel-head {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
  background: #fdfeff;
}
.ad-panel-head h2 { font-size: 14.5px; }
.ad-panel-head span { font-size: 12px; color: var(--muted-2); }
.ad-link { margin-left: auto; font-size: 12.5px; color: var(--brand); }
.ad-empty { padding: 40px 20px; text-align: center; color: var(--muted-2); font-size: 13px; }

.ad-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 18px 20px; }
.ad-quick-item {
  border: 1px solid var(--line); border-radius: 11px; padding: 14px;
  display: flex; flex-direction: column; gap: 6px;
  transition: all .18s;
}
.ad-quick-item:hover { border-color: #c3d3ef; background: #fbfdff; transform: translateY(-2px); }
.ad-quick-item b { font-size: 13.5px; }
.ad-quick-item i { font-style: normal; font-size: 11.5px; color: var(--muted-2); }

.ad-tips ul { padding: 16px 20px 20px 34px; list-style: disc; }
.ad-tips li { font-size: 12.8px; color: var(--muted); margin-bottom: 6px; }

/* ---------- 表格 ---------- */
.ad-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: #fafcff;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.ad-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #f2f6fd;
  font-size: 13px;
  vertical-align: middle;
}
.ad-table tbody tr:hover { background: #fbfdff; }
.ad-table tbody tr:last-child td { border-bottom: 0; }
.ad-table tr.is-new { background: #f7faff; }
.ad-muted { color: var(--muted-2); }
.ad-ellipsis { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ad-pill {
  display: inline-block;
  font-size: 11.5px;
  padding: 1px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.ad-pill.green { background: #e9f9f1; color: #0a7a52; }
.ad-pill.gray { background: #f1f4f9; color: #7c8ba5; }
.ad-pill.blue { background: var(--brand-soft); color: var(--brand); }

.ad-ops { display: flex; align-items: center; gap: 12px; }
.ad-ops form { display: inline; }
.ad-ops a, .ad-ops button {
  border: 0; background: none; padding: 0;
  font-size: 12.5px; color: var(--brand); cursor: pointer;
}
.ad-ops a:hover, .ad-ops button:hover { text-decoration: underline; }
.ad-ops .ad-danger { color: var(--danger); }

/* ---------- 工具栏 ---------- */
.ad-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 14px; flex-wrap: wrap;
}
.ad-toolbar-l { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ad-inline { display: flex; align-items: center; gap: 8px; }
.ad-inline select, .ad-inline input {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 11px;
  font-size: 13px;
  background: #fff;
  color: var(--ink-2);
  font-family: inherit;
}
.ad-inline input { width: 180px; }

/* ---------- 表单 ---------- */
.ad-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 22px;
  padding: 22px 22px 26px;
}
.ad-field.wide { grid-column: 1 / -1; }
.ad-field-group {
  grid-column: 1 / -1;
  border-top: 1px dashed var(--line);
  padding-top: 16px;
  margin-top: 2px;
}
.ad-field-group:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.ad-field-group span { font-size: 12px; font-weight: 700; color: var(--brand); letter-spacing: .6px; }
.ad-field label {
  display: block;
  font-size: 12.8px;
  color: var(--ink-2);
  font-weight: 500;
  margin-bottom: 7px;
}
.ad-field label i { color: var(--danger); font-style: normal; }
.ad-field label em {
  display: block;
  font-style: normal;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--muted-2);
  margin-top: 2px;
}
.ad-field input[type=text],
.ad-field input[type=number],
.ad-field input[type=date],
.ad-field input[type=password],
.ad-field select,
.ad-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--ink);
  background: #fbfdff;
  transition: all .18s;
}
.ad-field input:focus, .ad-field select:focus, .ad-field textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(24, 79, 245, .1);
}
.ad-field textarea { resize: vertical; line-height: 1.8; }
.ad-code { font-family: ui-monospace, Consolas, Menlo, monospace; font-size: 12.5px !important; }

.ad-switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.ad-switch input { display: none; }
.ad-switch span {
  width: 40px; height: 22px;
  border-radius: 999px;
  background: #dbe3ef;
  position: relative;
  transition: background .2s;
  flex: none;
}
.ad-switch span::after {
  content: "";
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  transition: transform .2s;
}
.ad-switch input:checked + span { background: var(--brand); }
.ad-switch input:checked + span::after { transform: translateX(18px); }
.ad-switch em { font-style: normal; font-size: 12px; color: var(--muted-2); }

.ad-form-act {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 0 10px;
}

/* ---------- 登录 ---------- */
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(1000px 600px at 15% 0%, #1b3a86 0%, transparent 55%),
    radial-gradient(900px 500px at 90% 100%, #10306e 0%, transparent 50%),
    #08142c;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 18px;
  padding: 32px 30px 26px;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .6);
}
.login-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 24px; }
.login-brand b { display: block; font-size: 15px; }
.login-brand i { display: block; font-style: normal; font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }
.login-label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; }
.login-input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 13px;
  font-size: 14px;
  font-family: inherit;
  background: #fbfdff;
  margin-bottom: 16px;
  transition: all .18s;
}
.login-input:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(24, 79, 245, .1); }
.login-btn { width: 100%; height: 44px; font-size: 14.5px; margin-top: 4px; }
.login-tip { margin-top: 16px; font-size: 11.5px; color: var(--muted-2); text-align: center; }
.login-tip code { background: #f2f6fd; padding: 1px 5px; border-radius: 4px; font-size: 11px; }
.login-back { display: block; margin-top: 14px; font-size: 12px; color: var(--muted-2); text-align: center; }
.login-back:hover { color: var(--brand); }
.login-card .ad-alert { margin: 0 0 16px; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .ad-wrap { flex-direction: column; }
  .ad-side {
    width: 100%; height: auto; position: relative;
    flex-direction: column;
  }
  .ad-nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; padding-bottom: 14px; }
  .ad-group { grid-column: 1 / -1; }
  .ad-side-foot { flex-direction: row; justify-content: space-between; }
  .ad-cards { grid-template-columns: 1fr; }
  .ad-quick { grid-template-columns: repeat(2, 1fr); }
  .ad-fields { grid-template-columns: 1fr; }
  .ad-body { padding: 16px; }
  .ad-top { padding: 0 16px; }
  .ad-alert { margin-left: 16px; margin-right: 16px; }
  .ad-table { display: block; overflow-x: auto; white-space: nowrap; }
}
