:root {
  --bg: #f4f6fa;
  --card: #ffffff;
  --ink: #1b2430;
  --ink-2: #5b6b80;
  --line: #e2e8f0;
  --brand: #1e3a5f;
  --accent: #2f6fed;
  --err: #c0392b;
  --warn-bg: #fff8e6;
  --warn-ink: #8a5a00;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 480px at 50% -140px, #e8eef9 0%, rgba(232,238,249,0) 70%),
    var(--bg);
  color: var(--ink);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.wrap { width: 100%; max-width: 680px; }
.card { max-width: 400px; margin: 0 auto; }

.card, .panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(24, 39, 75, 0.07);
}

.brand { display: flex; gap: 14px; align-items: center; margin-bottom: 22px; }
.logo {
  width: 44px; height: 44px; flex: 0 0 44px;
  border-radius: 12px;
  background: linear-gradient(140deg, #2f6fed, #1e3a5f);
  color: #fff; font-size: 22px; font-weight: 700;
  display: grid; place-items: center;
}
h1 { font-size: 20px; margin: 0; letter-spacing: .5px; }
h2 { font-size: 17px; margin: 0; }
.sub { margin: 2px 0 0; color: var(--ink-2); font-size: 13px; }

label { display: block; margin-bottom: 14px; font-size: 13px; color: var(--ink-2); }
input {
  width: 100%; margin-top: 6px; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 9px;
  font-size: 15px; color: var(--ink); background: #fbfcfe;
  transition: border-color .15s, box-shadow .15s;
}
input:focus {
  outline: none; border-color: var(--accent); background: #fff;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .12);
}

button {
  width: 100%; margin-top: 6px; padding: 12px;
  border: 0; border-radius: 9px; cursor: pointer;
  background: var(--accent); color: #fff;
  font-size: 15px; letter-spacing: 2px;
  transition: filter .15s;
}
button:hover { filter: brightness(1.06); }
button:disabled { opacity: .6; cursor: default; }

.err {
  margin-top: 14px; padding: 10px 12px;
  border-radius: 8px; font-size: 13px;
  background: #fdecea; color: var(--err);
  border: 1px solid #f5c6c0;
}
.hint { font-size: 12px; color: var(--ink-2); margin: 2px 0 14px; line-height: 1.6; }
.foot-note { margin-top: 18px; font-size: 12px; color: var(--ink-2); text-align: center; }
.foot-note a { color: var(--accent); text-decoration: none; }
.foot-note a:hover { text-decoration: underline; }

.bar { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.acts { display: flex; gap: 14px; font-size: 13px; white-space: nowrap; }
.acts a { color: var(--accent); text-decoration: none; }
.acts a:hover { text-decoration: underline; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.app {
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 108px; padding: 16px;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fbfcfe; cursor: pointer;
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.app:hover { transform: translateY(-2px); border-color: #c7d7f3; box-shadow: 0 8px 20px rgba(24,39,75,.08); }
.app .nm { font-size: 16px; font-weight: 600; }
.app .go { font-size: 12px; color: var(--accent); }
.app .dot { width: 10px; height: 10px; border-radius: 50%; margin-bottom: 10px; }
.app.dim { opacity: .55; }

.warn {
  margin-bottom: 14px; padding: 10px 12px; border-radius: 8px;
  background: var(--warn-bg); color: var(--warn-ink); font-size: 13px;
  border: 1px solid #f2e0b0;
}

/* ---- 管理页 ---- */
.admin { max-width: 1080px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--ink-2); font-weight: 600; font-size: 12.5px; background: #fafbfd; }
tr:hover td { background: #fafbfd; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 20px; font-size: 12px; background: #eef2f8; color: #3b4a5f; margin: 1px 3px 1px 0; }
.tag.off { background: #fdecea; color: var(--err); }
.tag.ok { background: #e8f5ee; color: #1e7a4a; }
.btn-sm {
  width: auto; margin: 0 4px 0 0; padding: 5px 10px; font-size: 12.5px;
  letter-spacing: 0; background: #eef2f8; color: #2c3e50;
}
.btn-sm.primary { background: var(--accent); color: #fff; }
.btn-sm.danger { background: #fdecea; color: var(--err); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pwd-box {
  margin: 14px 0; padding: 12px 14px; border-radius: 9px;
  background: #eef7f1; border: 1px dashed #9cc9af; color: #1e7a4a;
  font-family: ui-monospace, Consolas, monospace; font-size: 15px;
  word-break: break-all;
}
select { padding: 7px 8px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; background: #fff; }
.grant-editor { padding: 10px 0 4px; }
.grant-line { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.grant-line .an { width: 92px; font-size: 13px; color: var(--ink-2); }
.grant-line input[type=text] { width: 130px; margin: 0; padding: 6px 8px; font-size: 13px; }
.section-title { margin: 26px 0 10px; font-size: 15px; font-weight: 600; }
