:root {
    color-scheme: light;
    --page: #f6f6f7;
    --surface: #ffffff;
    --ink: #202124;
    --muted: #6f7278;
    --line: #dedfe2;
    --soft-line: #e8e9eb;
    --button: #202124;
    --danger-bg: #fff2f2;
    --danger-text: #a33c48;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--page);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.site-header {
    height: 64px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.site-header-inner {
    width: min(1040px, calc(100% - 40px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
}

.site-brand:hover { text-decoration: none; }

.brand-avatar {
    width: 36px;
    height: 36px;
    border: 1px solid #d8d9dc;
    border-radius: 9px;
    object-fit: cover;
}

.brand-name { font-size: 15px; font-weight: 650; letter-spacing: .1px; }
.brand-separator { width: 1px; height: 16px; background: #cec9ca; }
.brand-product { color: var(--muted); font-size: 13px; }

.page {
    width: min(430px, calc(100% - 32px));
    min-height: calc(100vh - 118px);
    margin: 0 auto;
    padding: 56px 0 48px;
}

.auth-panel {
    width: 100%;
    padding: 32px 32px 28px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 2px 8px rgba(32, 33, 36, .04);
}

h1 { margin: 0 0 8px; font-size: 23px; line-height: 1.35; letter-spacing: -.3px; }
.lead { margin: 0 0 25px; color: var(--muted); font-size: 14px; line-height: 1.65; }

.app-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -3px 0 22px;
    padding: 10px 11px;
    border: 1px solid var(--soft-line);
    border-radius: 7px;
    color: var(--muted);
    background: #f8f8f9;
    font-size: 13px;
}
.app-badge strong { color: var(--ink); font-weight: 600; }

.field { margin-bottom: 17px; }

label {
    display: block;
    margin-bottom: 7px;
    color: #4d494c;
    font-size: 13px;
    font-weight: 520;
}

input {
    width: 100%;
    height: 48px;
    padding: 0 13px;
    border: 1px solid #cec8ca;
    border-radius: 7px;
    outline: none;
    color: var(--ink);
    background: #fff;
    font: inherit;
    transition: border-color .15s ease, box-shadow .15s ease;
}

input:hover { border-color: #aaa3a5; }
input:focus { border-color: #4d494c; box-shadow: 0 0 0 3px rgba(36, 34, 37, .09); }

.button {
    width: 100%;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid var(--button);
    border-radius: 7px;
    color: #fff;
    background: var(--button);
    font: 600 14px/1 inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.button:hover { color: #fff; background: #000; border-color: #000; text-decoration: none; }
.button:disabled {
    color: #d9d9db;
    background: #55565a;
    border-color: #55565a;
    cursor: wait;
}
.button.secondary { color: var(--ink); background: #fff; border-color: var(--line); }
.button.secondary:hover { color: var(--ink); background: #f7f5f5; border-color: var(--line); }

.switch { margin-top: 20px; color: var(--muted); font-size: 13px; text-align: center; }
a { color: #3e393d; text-underline-offset: 3px; }
a:hover { color: #000; }

.alert {
    margin: 0 0 18px;
    padding: 11px 12px;
    border: 1px solid #efd3d6;
    border-radius: 7px;
    color: var(--danger-text);
    background: var(--danger-bg);
    font-size: 13px;
    line-height: 1.55;
}

.hint { margin-top: 7px; color: #908a8e; font-size: 12px; line-height: 1.5; }

.account-id {
    margin: 19px 0;
    padding: 12px 13px;
    border: 1px solid var(--soft-line);
    border-radius: 9px;
    color: #777177;
    background: #faf9f9;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.site-footer {
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid var(--line);
    color: #9a9497;
    background: #fff;
    font-size: 12px;
}

@media (max-width: 480px) {
    .site-header { height: 60px; }
    .site-header-inner { width: calc(100% - 28px); }
    .brand-avatar { width: 34px; height: 34px; border-radius: 10px; }
    .page { min-height: calc(100vh - 108px); padding: 24px 0 36px; }
    .auth-panel { padding: 26px 20px 23px; border-radius: 10px; }
    .site-footer { height: 48px; }
}
