/* 后台管理页专用样式（配合 style.css 使用） */
.hidden { display: none !important; }

/* ---------- 登录 ---------- */
#login-view { min-height: 78vh; display: grid; place-items: center; }
.login-card {
  width: min(390px, 92vw); background: var(--panel); border: 1px solid var(--line);
  border-radius: 20px; padding: 30px 28px; text-align: center; box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.login-logo {
  width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 18px; display: grid; place-items: center;
  font-size: 30px; background: linear-gradient(145deg, rgba(96,165,250,.3), rgba(167,139,250,.2));
  border: 1px solid rgba(148,163,184,.24);
}
.login-card h1 { margin: 0 0 8px; font-size: 21px; }
.login-sub { margin: 0 0 20px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.login-card input {
  width: 100%; padding: 12px 14px; border-radius: 12px; background: rgba(10,16,28,.7);
  border: 1px solid var(--line); color: var(--txt); font-size: 15px; outline: none; font-family: inherit;
  letter-spacing: 1px;
}
.login-card input:focus { border-color: rgba(96,165,250,.65); box-shadow: 0 0 0 3px rgba(96,165,250,.14); }
.login-btn { width: 100%; justify-content: center; margin-top: 14px; padding: 12px; font-size: 15px; font-weight: 600; }
.login-err { min-height: 18px; margin: 12px 0 0; color: var(--bad); font-size: 12.8px; }
.login-back { display: inline-block; margin-top: 8px; color: var(--muted-2); font-size: 12.5px; text-decoration: none; }
.login-back:hover { color: var(--txt); }

/* ---------- 面板通用 ---------- */
.card-box {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 16px;
}
.card-box h3 { margin: 0 0 10px; font-size: 14px; color: var(--txt); font-weight: 620; letter-spacing: .2px; }
.hint { margin: 0 0 10px; color: var(--muted-2); font-size: 12.5px; line-height: 1.7; }
.pw-row { display: flex; gap: 10px; flex-wrap: wrap; }
.pw-row input {
  flex: 1 1 190px; padding: 10px 13px; border-radius: 11px; background: rgba(10,16,28,.7);
  border: 1px solid var(--line); color: var(--txt); font-size: 13.5px; outline: none; font-family: inherit;
}
.pw-row input:focus { border-color: rgba(96,165,250,.6); }
.add-row { display: flex; gap: 10px; flex-wrap: wrap; }
.add-row select {
  flex: 1 1 260px; padding: 10px 13px; border-radius: 11px; background: rgba(10,16,28,.7);
  border: 1px solid var(--line); color: var(--txt); font-size: 13.5px; font-family: inherit; outline: none;
}
.list-head { margin: 22px 0 12px; }
.list-head h3 { margin: 0 0 6px; font-size: 15px; }
.count { color: var(--muted-2); font-weight: 400; font-size: 13px; }

/* ---------- 服务行 ---------- */
.admin-list { display: flex; flex-direction: column; gap: 10px; }
.svc {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; position: relative; overflow: hidden;
}
.svc::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--g, var(--accent)); }
.svc.is-off { opacity: .78; }
.svc.is-hidden { border-style: dashed; }

.svc-order { display: flex; flex-direction: column; gap: 3px; }
.svc-order button {
  width: 26px; height: 20px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--muted); cursor: pointer; font-size: 9px; line-height: 1;
  display: grid; place-items: center; font-family: inherit;
}
.svc-order button:hover:not(:disabled) { color: var(--txt); border-color: rgba(96,165,250,.5); }
.svc-order button:disabled { opacity: .3; cursor: not-allowed; }

.svc-icon {
  width: 38px; height: 38px; border-radius: 11px; flex: none; display: grid; place-items: center; font-size: 19px;
  background: color-mix(in srgb, var(--g, var(--accent)) 20%, transparent);
  border: 1px solid color-mix(in srgb, var(--g, var(--accent)) 38%, transparent);
}
.svc-main { flex: 1 1 220px; min-width: 170px; }
.svc-name { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 14.5px; font-weight: 600; }
.svc-sub { color: var(--muted); font-size: 12.3px; margin-top: 3px; }
.mini {
  font-size: 11px; padding: 2.5px 7px; border-radius: 7px; background: var(--panel-2);
  border: 1px solid var(--line); color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums;
}
.mini.port { color: #bfdbfe; border-color: rgba(96,165,250,.35); background: rgba(96,165,250,.1); }
.mini.warn { color: var(--warn); border-color: rgba(251,191,36,.35); background: rgba(251,191,36,.1); }
.mini.edit { color: #ddd6fe; border-color: rgba(167,139,250,.4); background: rgba(167,139,250,.12); }

.svc-status { font-size: 12.5px; padding: 8px 0; min-width: 120px; }
.svc-status.up { color: var(--ok); }
.svc-status.warn { color: var(--warn); }
.svc-status.down { color: var(--bad); }

.svc-controls { display: flex; gap: 6px; }
.svc-controls button, .svc-actions button {
  border: 1px solid var(--line); background: var(--panel-2); color: var(--muted);
  padding: 7px 11px; border-radius: 9px; font-size: 12.5px; cursor: pointer; font-family: inherit;
  transition: .15s; white-space: nowrap;
}
.svc-controls button:hover:not(:disabled), .svc-actions button:hover { color: var(--txt); border-color: rgba(148,163,184,.45); }
.svc-controls button:disabled { opacity: .35; cursor: not-allowed; }
.svc-controls button[data-act="stop"]:hover:not(:disabled) { color: var(--bad); border-color: rgba(248,113,113,.5); }
.svc-controls button[data-act="start"]:hover:not(:disabled) { color: var(--ok); border-color: rgba(52,211,153,.5); }

.svc-visible {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted);
  cursor: pointer; user-select: none; white-space: nowrap; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2);
}
.svc-visible input { accent-color: var(--ok); width: 15px; height: 15px; }
.svc-actions { display: flex; gap: 6px; }

/* 编辑表单 */
.svc-edit {
  background: rgba(12,19,33,.75); border: 1px solid rgba(96,165,250,.28); border-radius: 14px;
  padding: 15px 16px; margin-top: -4px;
}
.edit-grid { display: grid; gap: 11px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.edit-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.edit-grid input {
  padding: 9px 11px; border-radius: 10px; background: rgba(8,13,24,.85); border: 1px solid var(--line);
  color: var(--txt); font-size: 13px; font-family: inherit; outline: none; width: 100%;
}
.edit-grid input:focus { border-color: rgba(96,165,250,.6); }
.edit-foot { display: flex; gap: 8px; margin-top: 13px; align-items: center; flex-wrap: wrap; }
.empty-row { color: var(--muted-2); text-align: center; padding: 40px 0; font-size: 13.5px; }
