* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f4f6f8;
    color: #1f2937;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    overflow-x: hidden;
}

a {
    color: #1d4ed8;
    text-decoration: none;
}

input,
button,
textarea,
select {
    font: inherit;
}

input,
select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 8px 10px;
    background: #fff;
}

textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 8px 10px;
    background: #fff;
    resize: vertical;
    font: inherit;
}

button {
    border: 0;
    border-radius: 6px;
    padding: 8px 12px;
    background: #2563eb;
    color: #fff;
    cursor: pointer;
}

button:hover {
    filter: brightness(0.95);
}

code {
    border-radius: 4px;
    padding: 2px 5px;
    background: #eef2f7;
    color: #0f172a;
    font-family: Consolas, "SFMono-Regular", monospace;
    font-size: 13px;
}

.home-page {
    background: #f7f8fb;
}

.home-nav,
.home-hero,
.home-section {
    width: calc(100% - 32px);
    max-width: 1180px;
    margin: 0 auto;
}

.home-nav {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.home-brand {
    color: #111827;
    font-weight: 800;
    font-size: 16px;
    overflow-wrap: anywhere;
}

.home-nav nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.home-nav nav a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 12px;
    background: #fff;
    color: #111827;
    overflow-wrap: anywhere;
}

.home-hero {
    min-height: 520px;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 32px;
    align-items: center;
    padding: 56px 0 42px;
}

.home-kicker {
    margin: 0 0 12px;
    color: #0f766e;
    font-weight: 800;
}

.home-hero-content,
.home-metrics,
.home-section-copy,
.home-feature-grid,
.login-panel,
.panel {
    min-width: 0;
}

.home-hero h1 {
    max-width: 760px;
    margin: 0;
    color: #111827;
    font-size: 48px;
    line-height: 1.12;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.home-subtitle {
    max-width: 680px;
    margin: 18px 0 0;
    color: #475569;
    font-size: 18px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.home-primary-action,
.home-secondary-action,
.home-disabled-action {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    padding: 10px 16px;
    font-weight: 700;
}

.home-primary-action {
    background: #2563eb;
    color: #fff;
}

.home-secondary-action {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
}

.home-disabled-action {
    border: 1px solid #d1d5db;
    background: #e5e7eb;
    color: #6b7280;
}

.home-metrics {
    display: grid;
    gap: 12px;
}

.home-metrics div {
    border: 1px solid #dbe3ea;
    border-radius: 8px;
    padding: 18px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.home-metrics strong,
.home-metrics span {
    display: block;
}

.home-metrics strong {
    margin-bottom: 6px;
    color: #111827;
    font-size: 20px;
    overflow-wrap: anywhere;
}

.home-metrics span {
    color: #64748b;
}

.home-section {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
    gap: 28px;
    margin-bottom: 42px;
    padding: 34px 0;
    border-top: 1px solid #e5e7eb;
}

.home-section-copy h2 {
    margin: 0 0 12px;
    color: #111827;
    font-size: 28px;
    overflow-wrap: anywhere;
}

.home-section-copy p {
    margin: 0;
    color: #475569;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.home-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.home-feature-grid article {
    border: 1px solid #dbe3ea;
    border-radius: 8px;
    padding: 18px;
    background: #fff;
}

.home-feature-grid h3 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 17px;
    overflow-wrap: anywhere;
}

.home-feature-grid p {
    margin: 0;
    color: #64748b;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.home-login-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 0 56px;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-panel {
    width: calc(100% - 32px);
    max-width: 420px;
    background: #fff;
    border: 1px solid #dbe3ea;
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}

.login-panel h1,
.login-panel h2 {
    margin: 0 0 8px;
    font-size: 22px;
    overflow-wrap: anywhere;
}

.login-panel p {
    margin: 0 0 20px;
    color: #64748b;
    overflow-wrap: anywhere;
}

.login-announcement {
    display: grid;
    gap: 6px;
    margin-bottom: 16px;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 10px 12px;
    background: #eff6ff;
    color: #1f2937;
    line-height: 1.6;
}

.login-announcement strong {
    color: #1e3a8a;
}

.login-announcement span {
    white-space: normal;
    word-break: break-word;
}

.login-panel label {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
    font-weight: 600;
}

.login-panel button {
    width: 100%;
    margin-top: 8px;
}

.alert {
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 14px;
}

.alert.success {
    background: #dcfce7;
    color: #166534;
}

.alert.error {
    background: #fee2e2;
    color: #991b1b;
}

@media (max-width: 860px) {
    .home-nav {
        min-height: auto;
        align-items: flex-start;
        flex-direction: column;
        padding: 16px 0;
    }

    .home-nav nav {
        justify-content: flex-start;
    }

    .home-hero,
    .home-section {
        grid-template-columns: 1fr;
    }

    .home-hero {
        min-height: auto;
        padding: 32px 0 28px;
    }

    .home-hero h1 {
        font-size: 34px;
    }

    .home-feature-grid {
        grid-template-columns: 1fr;
    }
}
