* { box-sizing: border-box; }

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    color: #102033;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #071a33 url("../images/system_hub_4096x2160.png?v=5") center center / cover no-repeat;
}

a { color: #0b4f86; }

.shell { min-height: 100vh; }

.topbar {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 28px;
    background: #fff;
}

.brand {
    color: #102033;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.04em;
}

.topbar-user { color: #3d5166; }

.topnav {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

.topnav form { margin: 0; }

.topnav button,
button,
.button {
    border: 0;
    border-radius: 8px;
    background: #0b4f86;
    color: #fff;
    padding: 8px 14px;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
}

.login-stage {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.stage { padding: 28px 16px 48px; }

.panel {
    width: min(920px, 100%);
    margin: 0 auto;
    padding: 28px;
    border-radius: 16px;
    background: #fff;
}

.login-card,
.narrow { width: min(440px, 100%); }

.login-logo {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 0 8px;
}

.lead.login-slogan {
    margin: 2px 0 8px;
    text-align: center;
    font-size: 17px;
    font-weight: 650;
    letter-spacing: 0.045em;
    background: linear-gradient(
        105deg,
        #8b1224 0%,
        #e10600 32%,
        #ffb199 46%,
        #e10600 60%,
        #8b1224 100%
    );
    background-size: 220% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: slogan-shine 4.8s ease-in-out infinite;
}

@keyframes slogan-shine {
    0%, 100% { background-position: 100% 50%; }
    50% { background-position: 0% 50%; }
}

.login-card .field-label {
    display: inline-block;
    font-weight: 650;
    letter-spacing: 0.08em;
    background: linear-gradient(
        105deg,
        #8b1224 0%,
        #e10600 32%,
        #ffb199 46%,
        #e10600 60%,
        #8b1224 100%
    );
    background-size: 220% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: slogan-shine 4.8s ease-in-out infinite;
}

.login-card button.sign-in {
    display: block;
    margin: 8px auto 0;
    padding: 10px 22px;
    font-weight: 650;
    letter-spacing: 0.08em;
    color: #fff;
    background: linear-gradient(
        105deg,
        #8b1224 0%,
        #e10600 34%,
        #ff8f7a 48%,
        #e10600 62%,
        #8b1224 100%
    );
    background-size: 220% 100%;
    box-shadow: 0 8px 18px rgba(225, 6, 0, 0.28);
    animation: slogan-shine 4.8s ease-in-out infinite, sign-in-glow 4.8s ease-in-out infinite;
}

.login-card button.sign-in:hover {
    filter: brightness(1.06);
}

@keyframes sign-in-glow {
    0%, 100% { box-shadow: 0 6px 14px rgba(225, 6, 0, 0.22); }
    50% { box-shadow: 0 10px 24px rgba(225, 6, 0, 0.48); }
}

@media (prefers-reduced-motion: reduce) {
    .lead.login-slogan,
    .login-card .field-label,
    .login-card button.sign-in { animation: none; }
}

.eyebrow {
    margin: 0 0 8px;
    color: #0b4f86;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1 { margin: 0 0 8px; font-size: 28px; }

.lead,
.hint { color: #3d5166; }

label { display: block; margin: 14px 0; font-size: 14px; }

input[type="text"],
input[type="email"],
input[type="password"] {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 10px 12px;
    border: 1px solid #c5d3e0;
    border-radius: 8px;
    font: inherit;
    background: #fff;
}

.check { display: flex; align-items: center; gap: 8px; }

.check input { margin: 0; }

.flash,
.error {
    width: min(920px, calc(100% - 32px));
    margin: 0 auto 12px;
    padding: 10px 12px;
    border-radius: 8px;
}

.flash { background: #e7f6ee; }

.error { background: #fde8e8; }

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

table { width: 100%; border-collapse: collapse; }

th, td {
    padding: 10px 8px;
    border-bottom: 1px solid #d5e0ea;
    text-align: left;
}

.actions { display: flex; gap: 12px; align-items: center; }

.actions form { margin: 0; }

.actions button { background: transparent; color: #9b2c2c; padding: 0; }

button.danger { background: #9b2c2c; }

img.qr { display: block; width: 196px; height: 196px; margin: 12px 0; }

.codes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    margin: 12px 0 20px;
    padding: 12px 14px;
    list-style: none;
    border: 1px solid #c5d3e0;
    border-radius: 8px;
    font-family: ui-monospace, Consolas, monospace;
}

code.secret {
    font-family: ui-monospace, Consolas, monospace;
    letter-spacing: 0.06em;
    word-break: break-all;
}
