:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --line: #e5e8ef;
  --text: #1f2733;
  --muted: #7b8494;
  --brand: #2f6bff;
  --ok: #16a34a;
  --err: #dc2626;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.brand { font-size: 16px; font-weight: 600; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 24px; }

.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 32px 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
}

.card-login { max-width: 380px; margin: 8vh auto 0; }

h1 { font-size: 20px; margin: 0 0 4px; }
h2 { font-size: 15px; margin: 0 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

label { display: block; margin-bottom: 12px; font-size: 13px; color: #47505f; }
input[type="text"], input[type="password"] {
  width: 100%;
  margin-top: 6px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
}
input:focus { outline: 2px solid rgba(47, 107, 255, .25); border-color: var(--brand); }

button, .btn {
  display: inline-block;
  padding: 9px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}
button:hover, .btn:hover { filter: brightness(1.06); }
.btn-ghost { background: #fff; color: #3a4353; border: 1px solid var(--line); }

.pagehead { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.appcard {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: .15s;
}
.appcard:hover { border-color: var(--brand); box-shadow: 0 6px 18px rgba(47, 107, 255, .12); transform: translateY(-1px); }
.appname { font-size: 16px; font-weight: 600; }
.appcode { color: var(--muted); font-size: 12px; }
.appgo { margin-top: 8px; color: var(--brand); font-size: 13px; }

.empty { background: #fff; border: 1px dashed var(--line); border-radius: 12px; padding: 40px; text-align: center; color: var(--muted); }

.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 13px; }
.alert-error { background: #fef2f2; color: var(--err); border: 1px solid #fecaca; }
.alert-ok { background: #f0fdf4; color: var(--ok); border: 1px solid #bbf7d0; }
.alert-info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-weight: 500; background: #fafbfd; }

.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.tag-ok { background: #f0fdf4; color: var(--ok); }
.tag-off { background: #f4f5f7; color: var(--muted); }

code { background: #f4f6fa; padding: 2px 6px; border-radius: 5px; font-size: 12px; }
code.secret { word-break: break-all; color: #b45309; }

.inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline input[type="text"], .inline input[type="password"] { width: auto; margin-top: 0; }
.check { display: flex; align-items: center; gap: 6px; margin-bottom: 0; }
.formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }
.rowform { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.inlineform { display: inline-flex; gap: 6px; }
.mini { padding: 4px 10px; font-size: 12px; border-radius: 6px; background: #f2f4f8; color: #3a4353; border: 1px solid var(--line); text-decoration: none; }
.mini:hover { background: #e9edf5; }
.mini-input { width: 90px; padding: 4px 8px; font-size: 12px; margin-top: 0; }
