:root {
    --install-width: 880px;
    --install-bg: #eef2f6;
    --install-card: #ffffff;
    --install-border: #e5eaf0;
    --install-text: #1f2a37;
    --install-muted: #6b7280;
    --install-accent: #2f5d9f;
    --install-accent-soft: #e8f0fa;
    --install-danger: #d83e3e;
    --install-radius: 10px;
    --install-shadow: 0 8px 24px rgba(31, 42, 55, 0.06);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--install-text);
    background:
        radial-gradient(1200px 480px at 50% -120px, #d7e4f5 0%, transparent 70%),
        linear-gradient(180deg, #f7f9fc 0%, var(--install-bg) 100%);
}

.install-page {
    width: min(100% - 32px, var(--install-width));
    margin: 0 auto;
    padding: 36px 0 56px;
}

.install-hero {
    text-align: center;
    margin-bottom: 24px;
}

.install-hero h1 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 650;
    letter-spacing: 0.02em;
    color: #2b3b52;
}

.install-hero p {
    margin: 0;
    font-size: 14px;
    color: var(--install-muted);
}

.install-shell {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.install-card {
    width: 100%;
    background: var(--install-card);
    border: 1px solid var(--install-border);
    border-radius: var(--install-radius);
    box-shadow: var(--install-shadow);
    overflow: hidden;
    text-align: left;
}

.install-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(180deg, #fbfcfe 0%, #f4f7fb 100%);
    border-bottom: 1px solid var(--install-border);
}

.install-card-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.install-card-title strong {
    font-size: 15px;
    font-weight: 650;
    color: var(--install-text);
}

.install-card-title span {
    font-size: 12px;
    color: var(--install-muted);
    line-height: 1.4;
}

.install-card-body {
    padding: 18px;
}

.env-scroll {
    padding: 0;
    max-height: 360px;
    overflow: auto;
}

.install-alert {
    margin: 14px 18px 0;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
}

.install-alert.warn {
    background: #fff8eb;
    border: 1px solid #f5dfb0;
    color: #8a5a00;
}

.env-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.env-table th,
.env-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #eef2f7;
    text-align: left;
    vertical-align: top;
}

.env-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
}

.env-table tr:last-child td {
    border-bottom: none;
}

.env-table .muted {
    color: var(--install-muted);
}

.env-badge {
    display: inline-block;
    min-width: 48px;
    padding: 2px 10px;
    border-radius: 999px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
}

.env-badge.ok {
    background: #ecfdf3;
    color: #15803d;
}

.env-badge.warn {
    background: #fff7ed;
    color: #c2410c;
}

.env-badge.err {
    background: #fef2f2;
    color: #dc2626;
}

.install-form {
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 16px;
}

.form-grid-full {
    grid-column: 1 / -1;
}

.install-form .layui-form-item {
    margin-bottom: 12px;
}

.install-form .layui-form-label {
    width: 100px;
    background: #f7f9fc;
    color: #4b5563;
}

.install-form .layui-input-block {
    margin-left: 100px;
}

.install-form .layui-input {
    border-color: #dbe3ee;
}

.install-form .layui-input:focus {
    border-color: #7ea0cf !important;
}

.field-tip {
    margin-top: 6px;
    font-size: 12px;
    color: var(--install-muted);
    line-height: 1.4;
}

.cover-row {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e6edf5;
}

.install-actions {
    width: 100%;
    text-align: center;
    padding: 4px 0 8px;
}

.install-submit {
    min-width: 180px;
    height: 42px;
    line-height: 42px;
    border-radius: 8px;
    background: var(--install-accent) !important;
    border-color: var(--install-accent) !important;
}

.install-submit:hover {
    opacity: 0.92;
}

.install-progress {
    margin-top: 12px;
    font-size: 13px;
    color: var(--install-muted);
}

.error {
    background: var(--install-danger);
    color: #fff;
    padding: 14px 16px;
    border-radius: 8px;
    text-align: left;
    line-height: 1.5;
}

@media screen and (max-width: 768px) {
    .install-page {
        width: min(100% - 20px, var(--install-width));
        padding: 24px 0 40px;
    }

    .install-hero h1 {
        font-size: 24px;
    }

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

    .install-card-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .env-table th:nth-child(2),
    .env-table td:nth-child(2),
    .env-table th:nth-child(5),
    .env-table td:nth-child(5) {
        display: none;
    }
}
