:root {
    --bg: #f3f5f8;
    --card: #ffffff;
    --text: #1c2430;
    --muted: #6b7585;
    --line: #e4e8ef;
    --accent: #1f6feb;
    --danger: #c62828;
    --ok: #1b7f4a;
    --warn: #9a6700;
    --shadow: 0 8px 24px rgba(28, 36, 48, 0.06);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(1200px 500px at 10% -10%, #d9e8ff 0%, transparent 55%),
        radial-gradient(900px 400px at 100% 0%, #e8f5ef 0%, transparent 50%),
        var(--bg);
    min-height: 100vh;
}

.wrap { max-width: 960px; margin: 0 auto; padding: 28px 16px 48px; }
.top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
h1 { margin: 0 0 6px; font-size: 1.55rem; }
h2 { margin: 0 0 14px; font-size: 1.1rem; }
.sub, .muted { color: var(--muted); margin: 0; font-size: 0.92rem; }

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: var(--shadow);
}
.card.tip pre {
    background: #f7f9fc;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    overflow-x: auto;
    font-size: 0.85rem;
}

label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
input[type="text"], input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 0.95rem;
    background: #fff;
}
input:focus { outline: 2px solid rgba(31, 111, 235, 0.25); border-color: var(--accent); }

.form-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr auto;
    gap: 12px;
    align-items: end;
}
.actions { display: flex; gap: 8px; }

button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    background: var(--accent);
    color: #fff;
    font-size: 0.92rem;
    cursor: pointer;
    text-decoration: none;
}
button:hover, .btn:hover { filter: brightness(1.05); }
.btn.ghost, a.btn.ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line);
}
button.link {
    background: none;
    border: none;
    color: var(--accent);
    padding: 0;
    font-size: inherit;
}
button.link.danger, .ops a + form button.danger { color: var(--danger); }

.alert {
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 0.92rem;
}
.alert.ok { background: #e8f7ee; color: var(--ok); }
.alert.error { background: #fdecea; color: var(--danger); }
.alert.warn { background: #fff6e0; color: var(--warn); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; }
code { font-family: Consolas, "Courier New", monospace; }
.ops { display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.ops a { color: var(--accent); text-decoration: none; }
.inline { display: inline; margin: 0; }

.login-page {
    display: grid;
    place-items: center;
    padding: 24px;
}
.login-box {
    width: min(380px, 100%);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 28px 24px;
    box-shadow: var(--shadow);
}
.login-box h1 { font-size: 1.35rem; }
.login-box form { display: grid; gap: 6px; margin-top: 16px; }
.login-box label { margin-top: 8px; }
.login-box button { margin-top: 14px; width: 100%; }

@media (max-width: 720px) {
    .form-grid { grid-template-columns: 1fr; }
    .top { flex-direction: column; }
}
