/*
 * GAPphotos Login — Spotter Clearance (机位通行证)
 * Matches register page; boarding pass strip as signature element.
 */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Newsreader:ital,opsz,wght@0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,500&family=Space+Mono:wght@400;700&display=swap');

:root {
    --night: #060b12;
    --panel: #0d1420;
    --surface: #121b2a;
    --elevated: #1a2538;
    --signal: #5b9cf5;
    --signal-bright: #8bb8ff;
    --signal-dim: #3d7fd4;
    --text: #e6edf5;
    --muted: #7a8fa6;
    --line: rgba(91, 156, 245, 0.11);
    --line-strong: rgba(91, 156, 245, 0.24);
    --shadow: 0 24px 56px rgba(0, 0, 0, 0.42);
    --radius: 12px;
    --radius-lg: 16px;
    --mono: 'Space Mono', 'JetBrains Mono', ui-monospace, monospace;
    --display: 'Newsreader', 'Noto Serif SC', 'Songti SC', serif;
    --body: 'Manrope', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --hot: #f59e0b;
    --hot-dim: rgba(245, 158, 11, 0.14);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body.page-login {
    font-family: var(--body);
    background: var(--night);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    font-size: 0.9375rem;
    -webkit-font-smoothing: antialiased;
}

body.page-login::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 420px;
    background: linear-gradient(180deg, rgba(96, 165, 250, 0.1) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

body.page-login::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(880px 400px at 8% 18%, rgba(96, 165, 250, 0.08), transparent 58%),
        radial-gradient(720px 340px at 92% 78%, rgba(59, 130, 246, 0.06), transparent 60%);
}

body.page-login > * { position: relative; z-index: 1; }

body.page-login ::selection {
    background: rgba(96, 165, 250, 0.35);
    color: #fff;
}

@media (prefers-reduced-motion: reduce) {
    body.page-login *, body.page-login *::before, body.page-login *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb {
    background: rgba(96, 165, 250, 0.45);
    border-radius: 999px;
    border: 2px solid var(--night);
}
*::-webkit-scrollbar-track { background: rgba(8, 15, 26, 0.7); }

/* ── Navbar ── */
body.page-login .navbar {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.97) 0%, rgba(8, 15, 26, 0.97) 100%) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
}

body.page-login .navbar-brand {
    font-family: var(--display);
    font-weight: 700 !important;
    font-size: 1.35rem !important;
    letter-spacing: 0.03em;
}

body.page-login .navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.45rem 0.9rem !important;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

body.page-login .navbar-nav .nav-link:hover {
    background: rgba(96, 165, 250, 0.14) !important;
    color: var(--signal-bright) !important;
}

/* ── Footer ── */
body.page-login .site-footer {
    margin-top: auto;
    border-top: 1px solid var(--line);
    background: var(--panel);
}

body.page-login .site-footer-bottom p {
    color: var(--muted);
    font-size: 0.8125rem;
}

/* ── Main layout ── */
.log-main {
    flex: 1;
    width: min(920px, 100%);
    margin: 0 auto;
    padding: 2rem 1.25rem 3.5rem;
}

/* ── Flash alerts ── */
body.page-login .alert {
    border-radius: var(--radius);
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--text);
    padding: 0.85rem 1.1rem;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}

body.page-login .alert-success { border-color: rgba(52, 211, 153, 0.35); }
body.page-login .alert-danger { border-color: rgba(248, 113, 113, 0.35); }
body.page-login .btn-close { filter: invert(1) grayscale(100%) brightness(200%); opacity: 0.6; }

/* ── Masthead ── */
.log-masthead {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--line);
}

.log-eyebrow {
    display: block;
    font-family: var(--mono);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--signal);
    margin-bottom: 0.5rem;
}

.log-title {
    font-family: var(--display);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.15;
    color: var(--text);
    margin-bottom: 0.55rem;
}

.log-lead {
    color: var(--muted);
    font-size: 0.9375rem;
    max-width: 32rem;
    line-height: 1.65;
}

.log-steps {
    display: flex;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    flex-shrink: 0;
}

.log-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.65rem 1rem;
    min-width: 5rem;
    border-right: 1px solid var(--line);
    text-align: center;
}

.log-step:last-child { border-right: none; }

.log-step-num {
    font-family: var(--mono);
    font-size: 0.5625rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin-bottom: 0.2rem;
}

.log-step-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
}

.log-step.is-active {
    background: rgba(91, 156, 245, 0.12);
}

.log-step.is-active .log-step-num { color: var(--signal); }
.log-step.is-active .log-step-label { color: var(--signal-bright); }

.log-step.is-done .log-step-num { color: rgba(52, 211, 153, 0.85); }
.log-step.is-done .log-step-label { color: rgba(52, 211, 153, 0.75); }

/* ── Two-column grid ── */
.log-grid {
    display: grid;
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
}

/* ── Boarding panel (left, sticky) ── */
.log-boarding-panel {
    position: sticky;
    top: 5.5rem;
}

.log-boarding-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.log-boarding-strip {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, #0a1220 0%, #152238 100%);
    border-bottom: 1px solid var(--line);
}

.log-boarding-ref {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.log-boarding-ref-label {
    font-family: var(--mono);
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

.log-boarding-ref-code {
    font-family: var(--mono);
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--signal-bright);
}

.log-boarding-barcode {
    display: flex;
    gap: 2px;
    height: 28px;
    align-items: stretch;
}

.log-boarding-barcode span {
    display: block;
    width: 2px;
    background: var(--signal);
    opacity: 0.55;
    border-radius: 1px;
}

.log-boarding-barcode span:nth-child(3n) { width: 3px; opacity: 0.75; }
.log-boarding-barcode span:nth-child(5n) { width: 1px; opacity: 0.35; }
.log-boarding-barcode span:nth-child(7n) { height: 70%; align-self: center; }

.log-boarding-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.log-boarding-heading {
    font-family: var(--display);
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
}

.log-perks {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.log-perks li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.8125rem;
    color: var(--muted);
    line-height: 1.5;
}

.log-perks li i {
    color: var(--signal);
    font-size: 0.75rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
    width: 1rem;
    text-align: center;
}

.log-perks li strong {
    color: var(--text);
    font-weight: 600;
}

.log-notice {
    display: flex;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    background: var(--hot-dim);
    border: 1px solid rgba(245, 158, 11, 0.28);
    font-size: 0.8125rem;
    color: var(--muted);
    line-height: 1.55;
}

.log-notice i {
    color: var(--hot);
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.log-notice strong {
    color: var(--text);
    font-weight: 600;
}

.log-boarding-foot {
    padding: 0.85rem 1.25rem 1.1rem;
    border-top: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 0.5625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: center;
}

/* ── Form panel (right) ── */
.log-form-panel {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.log-section {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.log-section-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--line);
    background: rgba(18, 27, 42, 0.5);
}

.log-section-code {
    font-family: var(--mono);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--signal);
    min-width: 1.5rem;
}

.log-section-title {
    font-family: var(--display);
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text);
}

.log-section-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.log-field { display: flex; flex-direction: column; gap: 0.4rem; }

.log-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.log-label .req { color: #f87171; font-weight: 700; }

.log-input {
    font-family: var(--body);
    font-size: 0.9375rem;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.72rem 0.95rem;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.log-input::placeholder { color: var(--muted); opacity: 0.75; }

.log-input:focus {
    outline: none;
    border-color: var(--line-strong);
    box-shadow: 0 0 0 3px rgba(91, 156, 245, 0.15);
}

.log-forgot {
    display: flex;
    justify-content: flex-end;
    margin-top: -0.35rem;
}

.log-forgot a {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--signal-bright);
    text-decoration: none;
    border-bottom: 1px solid rgba(139, 184, 255, 0.3);
    transition: color 0.2s, border-color 0.2s;
}

.log-forgot a:hover {
    color: #fff;
    border-bottom-color: var(--signal-bright);
}

.log-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
}

.log-submit {
    width: 100%;
    font-family: var(--body);
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--signal-dim) 0%, var(--signal) 100%);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 0.95rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 8px 28px rgba(59, 130, 246, 0.28);
}

.log-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(59, 130, 246, 0.38);
}

.log-submit:focus-visible {
    outline: 2px solid var(--signal-bright);
    outline-offset: 3px;
}

.log-register-link {
    text-align: center;
    font-size: 0.875rem;
    color: var(--muted);
}

.log-register-link a {
    color: var(--signal-bright);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(139, 184, 255, 0.3);
    transition: color 0.2s, border-color 0.2s;
}

.log-register-link a:hover {
    color: #fff;
    border-bottom-color: var(--signal-bright);
}

/* ── Reveal animation ── */
.log-reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.log-reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* ── Responsive ── */
@media (max-width: 960px) {
    .log-grid {
        grid-template-columns: 1fr;
    }

    .log-boarding-panel {
        position: static;
    }

    .log-masthead {
        flex-direction: column;
        align-items: flex-start;
    }

    .log-steps { width: 100%; }
    .log-step { flex: 1; }
}

@media (max-width: 600px) {
    .log-main { padding: 1.25rem 1rem 2.5rem; }
}
