/* 飞鸟 · 轻音 版本管理后台 */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #f5f6f8;
    --card: #fff;
    --ink: #1e293b;
    --ink-2: #475569;
    --ink-3: #94a3b8;
    --line: #e2e8f0;
    --brand: #6366f1;
    --brand-dark: #4f46e5;
    --ok: #059669;
    --warn: #b45309;
    --bad: #dc2626;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body.center {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

code, .mono {
    font-family: "SF Mono", "Fira Code", ui-monospace, Menlo, Consolas, monospace;
    font-size: .92em;
}
code {
    background: #eef2ff;
    color: #4338ca;
    padding: 1px 5px;
    border-radius: 4px;
    word-break: break-all;
}

/* ── 登录 ── */
.login-card {
    background: var(--card);
    width: 100%;
    max-width: 400px;
    border-radius: 18px;
    box-shadow: 0 4px 30px rgba(15, 23, 42, .08);
    padding: 34px 30px 26px;
}
.login-head { text-align: center; margin-bottom: 22px; }
.login-head .logo {
    width: 56px; height: 56px;
    margin: 0 auto 12px;
    display: grid; place-items: center;
    font-size: 30px;
    background: #eef2ff;
    border-radius: 16px;
}
.login-head h1 { font-size: 20px; font-weight: 700; letter-spacing: .5px; }
.login-head .sub { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.foot { margin-top: 16px; text-align: center; font-size: 12px; color: var(--ink-3); }

/* ── 顶栏 ── */
.topbar {
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
}
.brand { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.logo-sm { font-size: 18px; }
.tag {
    font-size: 11px;
    font-weight: 500;
    color: var(--brand);
    background: #eef2ff;
    padding: 2px 8px;
    border-radius: 999px;
}
.who { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot.ok { background: var(--ok); }
.dot.bad { background: var(--bad); }
.inline { display: inline; }
.link-btn {
    background: none; border: none; cursor: pointer;
    color: var(--ink-3); font-size: 13px; padding: 4px 6px;
    font-family: inherit;
}
.link-btn:hover { color: var(--bad); }

/* ── 布局 ── */
.wrap { max-width: 1040px; margin: 0 auto; padding: 22px 16px 60px; }
.grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 860px) { .grid { grid-template-columns: 1fr; } }

.card {
    background: var(--card);
    border-radius: 14px;
    box-shadow: 0 1px 12px rgba(15, 23, 42, .05);
    padding: 22px;
    margin-bottom: 18px;
}
.card h2 {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-2);
    margin-bottom: 16px;
    letter-spacing: .3px;
}

/* ── 表单 ── */
.field { display: block; margin-bottom: 16px; }
.field > span {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-2);
    margin-bottom: 6px;
}
.field .opt {
    font-weight: 400;
    color: var(--ink-3);
    margin-left: 6px;
    font-size: 12px;
}
.field input[type="text"],
.field input[type="password"],
.field textarea {
    width: 100%;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    padding: 10px 13px;
    font-size: 14px;
    color: var(--ink);
    background: #fafbfc;
    font-family: inherit;
    outline: none;
    transition: border-color .18s, box-shadow .18s, background .18s;
}
.field input:focus, .field textarea:focus {
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}
.field textarea { resize: vertical; min-height: 96px; line-height: 1.6; }
.hint { font-size: 12px; color: var(--ink-3); margin-top: 6px; display: block; }
.hint.danger { color: var(--bad); }

.toggle-row {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 12px 14px;
    background: #fafbfc;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    margin-bottom: 16px;
}
.toggle-row .label { font-size: 14px; font-weight: 500; }
.toggle-row .hint { margin-top: 2px; }

.toggle { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .slider {
    position: absolute; inset: 0; cursor: pointer;
    background: #cbd5e1; border-radius: 26px; transition: .22s;
}
.toggle .slider::before {
    content: ''; position: absolute;
    width: 20px; height: 20px; left: 3px; top: 3px;
    background: #fff; border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
    transition: .22s;
}
.toggle input:checked + .slider { background: var(--brand); }
.toggle input:checked + .slider::before { transform: translateX(20px); }

.btn {
    width: 100%;
    padding: 12px;
    border: none; border-radius: 10px;
    font-size: 14px; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: .18s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:active { transform: scale(.99); }
.btn:disabled { background: #cbd5e1; cursor: not-allowed; }

/* ── 提示 ── */
.alert {
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
    border: 1px solid transparent;
    line-height: 1.7;
}
.alert-ok { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.alert-warn { background: #fffbeb; border-color: #fde68a; color: var(--warn); }
.alert-error { background: #fef2f2; border-color: #fecaca; color: var(--bad); }

/* ── 安全自检 ── */
.checks { list-style: none; }
.checks li {
    display: flex; gap: 10px;
    padding: 9px 0;
    border-bottom: 1px dashed #eef2f7;
}
.checks li:last-child { border-bottom: none; }
.checks .mark { font-size: 13px; line-height: 1.6; }
.checks .t { font-size: 13px; font-weight: 500; }
.checks .d { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.checks li.bad .t { color: var(--bad); }

/* ── 小控件 ── */
.row { display: flex; gap: 8px; }
.row input {
    flex: 1; min-width: 0;
    border: 1.5px solid var(--line); border-radius: 9px;
    padding: 9px 11px; font-size: 13px; background: #fafbfc;
    font-family: inherit; outline: none;
}
.row input:focus { border-color: var(--brand); background: #fff; }
.btn-sm {
    padding: 9px 14px; border: none; border-radius: 9px;
    background: #f1f5f9; color: var(--ink-2);
    font-size: 13px; cursor: pointer; white-space: nowrap;
    font-family: inherit; transition: .18s;
}
.btn-sm:hover { background: #e2e8f0; }

.result {
    background: #0f172a; color: #cbd5e1;
    border-radius: 10px; padding: 14px;
    font-size: 12px; line-height: 1.6;
    max-height: 260px; overflow: auto;
    margin-top: 10px;
    white-space: pre-wrap; word-break: break-all;
}
.result:empty { display: none; }

/* ── 日志 ── */
.logs { list-style: none; font-size: 12px; }
.logs li {
    display: grid; grid-template-columns: 86px 82px 1fr;
    gap: 6px; padding: 6px 0;
    border-bottom: 1px dashed #eef2f7;
    color: var(--ink-2);
}
.logs li:last-child { border-bottom: none; }
.logs .time { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.logs .act { font-weight: 600; color: var(--brand); }
.logs .ip { color: var(--ink-3); font-family: "SF Mono", ui-monospace, monospace; }
