/* Public site styles — homepage & login */
:root {
    --primary: #1a56db;
    --primary-dark: #0e3a8c;
    --primary-light: #3b82f6;
    --accent: #d97706;
    --accent-light: #fbbf24;
    --text: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --bg: #ffffff;
    --bg-subtle: #f8fafc;
    --bg-dark: #0f172a;
    --border: #e2e8f0;
    --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.12);
    --radius: 12px;
    --radius-lg: 20px;
    --font: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

/* ── Header ── */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.3s;
}

.site-header.scrolled {
    box-shadow: var(--shadow);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 2.25rem;
    margin-left: auto;
    margin-right: 0.5rem;
}

.site-nav a {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.2s;
}

.site-nav a:hover {
    color: var(--primary);
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.site-logo:hover {
    color: var(--text);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
}

.btn-login-entry {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: var(--primary);
    color: white !important;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-login-entry:hover {
    background: var(--primary-dark);
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 86, 219, 0.35);
}

.btn-login-entry.outline {
    background: transparent;
    color: var(--text) !important;
    border: 1.5px solid var(--border);
    box-shadow: none;
}

.btn-login-entry.outline:hover {
    background: var(--bg-subtle);
    border-color: var(--primary);
    color: var(--primary) !important;
    box-shadow: none;
    transform: none;
}

/* ── Hero ── */
.hero {
    padding: 140px 2rem 100px;
    background: linear-gradient(160deg, #eff6ff 0%, #f8fafc 50%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(26, 86, 219, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: rgba(26, 86, 219, 0.1);
    color: var(--primary);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--bg-dark);
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: var(--primary);
    color: white !important;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26, 86, 219, 0.35);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: white;
    color: var(--text) !important;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary) !important;
}

.hero-visual {
    position: relative;
}

.hero-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    border: 1px solid var(--border);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.stat-item {
    padding: 1.25rem;
    background: var(--bg-subtle);
    border-radius: var(--radius);
    text-align: center;
}

.stat-num {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ── Sections ── */
.section {
    padding: 80px 2rem;
}

.section-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--bg-dark);
    margin-bottom: 0.75rem;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.section-alt {
    background: var(--bg-subtle);
}

/* ── Features ── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.feature-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

.feature-icon.blue { background: rgba(26, 86, 219, 0.1); }
.feature-icon.green { background: rgba(16, 185, 129, 0.1); }
.feature-icon.amber { background: rgba(217, 119, 6, 0.1); }
.feature-icon.purple { background: rgba(139, 92, 246, 0.1); }
.feature-icon.red { background: rgba(239, 68, 68, 0.1); }
.feature-icon.cyan { background: rgba(6, 182, 212, 0.1); }

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--bg-dark);
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ── Benefits ── */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.benefit-item {
    text-align: center;
}

.benefit-num {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.benefit-text {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* ── CTA ── */
.cta-section {
    padding: 80px 2rem;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    text-align: center;
    color: white;
}

.cta-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.btn-white {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2.5rem;
    background: white;
    color: var(--primary) !important;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    color: var(--primary-dark) !important;
}

/* ── Footer ── */
.site-footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 3rem 2rem 2rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
}

.footer-brand h3 {
    color: white;
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-links h4 {
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-light);
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-contact p {
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.footer-contact a {
    color: var(--accent-light);
}

.footer-bottom {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.8;
}

.footer-bottom a {
    color: var(--text-light);
}

.footer-bottom a:hover {
    color: white;
}

/* ── Login page ── */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-subtle);
}

.login-header-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.login-header-bar .header-inner {
    height: 60px;
}

.login-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 2rem 2rem;
}

.login-wrapper {
    display: grid;
    grid-template-columns: 1fr 420px;
    max-width: 960px;
    width: 100%;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

.login-brand-panel {
    padding: 3rem;
    background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-brand-panel h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.login-brand-panel > p {
    opacity: 0.9;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.login-highlights {
    list-style: none;
}

.login-highlights li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    opacity: 0.95;
}

.login-highlights li::before {
    content: '✓';
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.login-form-panel {
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-form-header {
    margin-bottom: 2rem;
}

.login-form-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bg-dark);
    margin-bottom: 0.35rem;
}

.login-form-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.login-error-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    margin-bottom: 1.25rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #991b1b;
    font-size: 0.9rem;
    line-height: 1.5;
    animation: loginErrorIn 0.35s ease-out;
}

.login-error-alert-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    color: #dc2626;
}

.login-error-alert-title {
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.login-error-alert-text {
    color: #b91c1c;
    font-size: 0.85rem;
}

@keyframes loginErrorIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text);
    transition: all 0.2s;
    background: var(--bg-subtle);
    font-family: var(--font);
}

.form-group input:focus {
    border-color: var(--primary);
    background: white;
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.remember-me input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.remember-me label {
    color: var(--text-muted);
    font-size: 0.875rem;
    cursor: pointer;
}

.btn-submit {
    width: 100%;
    padding: 0.875rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font);
}

.btn-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 86, 219, 0.35);
}

.btn-reset {
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    color: var(--text-muted);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 0.75rem;
    transition: all 0.2s;
    font-family: var(--font);
}

.btn-reset:hover {
    background: var(--bg-subtle);
    border-color: var(--text-light);
}

.back-home {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
}

.back-home a {
    color: var(--text-muted);
}

.back-home a:hover {
    color: var(--primary);
}

.login-page .site-footer {
    margin-top: auto;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        max-width: 480px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .site-nav {
        display: none;
    }

    .site-header .btn-login-entry {
        margin-left: auto;
    }

    .hero {
        padding: 120px 1.5rem 60px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .login-wrapper {
        grid-template-columns: 1fr;
    }

    .login-brand-panel {
        padding: 2rem;
    }

    .login-form-panel {
        padding: 2rem 1.5rem;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .header-inner {
        padding: 0 1rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn-primary, .btn-outline {
        width: 100%;
        justify-content: center;
    }
}
