/* Shared public authentication styles; isolated from application global.css. */
:root {
    color-scheme: light;
    --home-ink: #172b45;
    --home-muted: #62748a;
    --home-blue: #2563eb;
    --home-border: #e3ebf4;
}

* { box-sizing: border-box; }

.home-body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    padding-top: 80px;
    color: var(--home-ink);
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--home-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 4px;
}

.home-nav {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    background: #1a1a1a;
    box-shadow: 0 2px 4px #0000001a;
}

.home-nav__brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
}
.home-nav__brand:hover { text-decoration: none; }
.home-nav__brand img { display: block; width: 80px; height: 80px; object-fit: contain; }
.home-nav a:focus-visible { outline-color: #79ddf2; outline-offset: -4px; }

.home-main {
    flex: 1;
    display: grid;
    position: relative;
    isolation: isolate;
    background: #eef6ff;
}
.home-main::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: url("../images/digital-fold.svg?v=20261108f") center center / cover no-repeat;
}
.home-main::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 42%, #ffffff80, transparent 65%);
}
.home-section {
    display: grid;
    place-items: center;
    padding: 56px 20px;
    scroll-margin-top: 100px;
}
.home-login {
    position: relative;
    width: 100%;
    max-width: 440px;
    min-width: 0;
    padding: 40px;
    border: 1px solid var(--home-border);
    border-radius: 20px;
    background: #fffffff0;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 24px 80px #244b8118, 0 2px 8px #244b8108;
}
.home-login__accent {
    width: 40px;
    height: 4px;
    margin-bottom: 24px;
    border-radius: 4px;
    background: linear-gradient(90deg, #2563eb, #33c5dc);
}
.home-eyebrow {
    margin: 0 0 12px;
    color: var(--home-muted);
    font: 9px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace;
    letter-spacing: 1.3px;
}
.home-login__title {
    margin: 0 0 10px;
    font-size: 28px;
    line-height: 1.4;
    letter-spacing: -0.7px;
    overflow-wrap: anywhere;
}
.home-login__desc { margin: 0 0 30px; color: var(--home-muted); font-size: 14px; line-height: 1.7; }
.home-field { margin-bottom: 22px; }
.home-field label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 9px; font-size: 13px; font-weight: 600; }
.home-field label span { font: 9px ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--home-muted); letter-spacing: 1px; }
.home-field input {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #d9e3ee;
    border-radius: 9px;
    background: #fbfdff;
    color: var(--home-ink);
    font: inherit;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.home-field input::placeholder { color: #7b8a9c; font-size: 14px; }
.home-field input:focus { outline: none; border-color: var(--home-blue); box-shadow: 0 0 0 3px #2563eb16; background: #fff; }
.home-login__recovery { margin: -8px 0 24px; text-align: right; font-size: 12px; }
.home-btn {
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 12px 18px;
    border: 1px solid transparent;
    border-radius: 9px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}
.home-btn:hover { text-decoration: none; }
.home-btn--primary { background: #2563eb; color: #fff; box-shadow: 0 6px 16px #2563eb20; }
.home-btn--primary:hover { background: #1d4ed8; box-shadow: 0 8px 20px #2563eb30; }
.home-btn--ghost { background: #f5f8fc; border-color: var(--home-border); color: var(--home-ink); }
.home-btn--ghost:hover { background: #eaf1fa; }
.home-login__logout { margin-top: 12px; }
.home-login__help { margin-top: 24px; text-align: center; font-size: 13px; color: var(--home-muted); }
.home-login__help a { margin-left: 6px; font-weight: 600; }
.home-login__note { margin: 22px 0 0; color: var(--home-muted); font-size: 11px; line-height: 1.8; text-align: center; }
.home-login__bottom { display: flex; justify-content: space-between; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--home-border); font: 9px ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--home-muted); letter-spacing: 1.4px; }
.home-flash:empty { display: none; }
.home-flash__item { margin-bottom: 18px; padding: 12px 14px; border: 1px solid #c7dff7; border-radius: 8px; background: #eff7ff; color: #244a70; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.home-flash__item--danger { border-color: #f4c9ce; background: #fff1f2; color: #a12335; }
.home-flash__item--success { border-color: #bce6d5; background: #effaf5; color: #1c6a4b; }
.home-flash__item--warning { border-color: #efdca8; background: #fff9eb; color: #815b14; }

.home-register { max-width: 480px; }
.home-field__hint { margin: 8px 0 0; color: var(--home-muted); font-size: 12px; line-height: 1.7; }
.home-password-requirements {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 18px;
    margin: 12px 0 0;
    padding: 14px 14px 14px 28px;
    border: 1px solid var(--home-border);
    border-radius: 9px;
    background: #f5f9ff;
    color: var(--home-muted);
    font-size: 11px;
    line-height: 1.7;
}
.home-register .validation-icon { display: block; margin-top: 7px; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.home-register .validation-icon:empty { display: none; }
.home-register .validation-icon.valid { color: #1c6a4b; }
.home-register .validation-icon.invalid { color: #a12335; }
.home-btn:disabled, .home-btn:disabled:hover { background: #e5edf7; color: #62748a; box-shadow: none; cursor: not-allowed; }

.home-footer { padding: 22px 20px; border-top: 1px solid #edf2f7; background: #fff; }
.home-footer__inner { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 28px; max-width: 1100px; margin: auto; color: var(--home-muted); font-size: 11px; line-height: 1.8; text-align: center; }
.home-footer__nav, .home-footer__filing { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; }
.home-footer__filing { flex-basis: 100%; }
.home-footer a { color: var(--home-muted); }
.home-footer a:hover { color: var(--home-blue); }
.home-footer__icon { width: 12px; height: 12px; vertical-align: middle; }

@media (max-width: 480px) {
    .home-section { padding: 32px 16px; }
    .home-login { padding: 28px 24px; border-radius: 16px; }
    .home-login__title { font-size: 26px; }
    .home-eyebrow { font-size: 8px; letter-spacing: 0.8px; }
    .home-password-requirements { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}
