:root {
    font-family: var(--tbp-splash-font-family, "Segoe UI", Arial, sans-serif);
    background: var(--tbp-page-background, #f4f7fb);
    color: var(--tbp-text-primary, #18202f);
}

body {
    margin: 0;
    min-height: 100vh;
    overflow: hidden;
    background: var(--tbp-page-background, #f4f7fb);
}

button,
input,
select,
textarea {
    font: inherit;
}

h1:focus {
    outline: none;
}

code {
    color: var(--tbp-text-muted, #44506a);
    font-size: .92em;
}

.platform-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
}

.platform-header {
    margin-bottom: 28px;
}

.platform-kicker {
    margin: 0 0 8px;
    color: var(--tbp-primary, #2f6fed);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.platform-header h1 {
    margin: 0;
    color: var(--tbp-text-strong, #121826);
    font-size: 2.35rem;
    font-weight: 700;
}

.platform-summary {
    max-width: 720px;
    margin: 12px 0 0;
    color: var(--tbp-text-muted, #566278);
    line-height: 1.55;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.retry-button {
    height: 38px;
    padding: 0 16px;
    border: 1px solid var(--tbp-primary-border, #1f5ed0);
    border-radius: var(--tbp-radius-control, 6px);
    color: #ffffff;
    background: var(--tbp-primary, #2f6fed);
    font-weight: 700;
}

.retry-button {
    margin-top: 18px;
    cursor: pointer;
}

.status-panel {
    min-height: 154px;
    padding: 20px;
    border: 1px solid var(--tbp-border-subtle, #dde4f0);
    border-radius: var(--tbp-radius-panel, 8px);
    background: var(--tbp-surface-background, #ffffff);
    box-shadow: var(--tbp-shadow-panel, 0 8px 24px rgba(20, 31, 52, .06));
}

.status-label {
    display: block;
    margin-bottom: 12px;
    color: var(--tbp-text-soft, #68758c);
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-value {
    display: block;
    margin-bottom: 10px;
    color: var(--tbp-text-primary, #202b3d);
    font-size: 1.35rem;
}

.status-panel p {
    margin: 0;
    color: var(--tbp-text-muted, #58667d);
    line-height: 1.45;
}

.status-panel small {
    display: block;
    margin-top: 12px;
    color: var(--tbp-danger-text, #7a4651);
    line-height: 1.45;
}

.status-ok {
    border-color: var(--tbp-success-border, #b8dfca);
    background: var(--tbp-success-surface, #f3fbf6);
}

.status-error {
    border-color: var(--tbp-danger-border, #efc0c7);
    background: var(--tbp-danger-surface, #fff7f8);
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    padding: 1rem;
    color: white;
    background: #b32121;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

.installation-shell {
    height: 100vh;
    box-sizing: border-box;
    padding: 42px 18px;
    overflow: auto;
    background: var(--tbp-page-background, #f4f7fb);
}

.installation-panel {
    box-sizing: border-box;
    width: min(920px, 100%);
    margin: 0 auto;
    padding: 24px;
    border: 1px solid var(--tbp-border-subtle, #dde4f0);
    border-radius: var(--tbp-radius-panel, 8px);
    background: var(--tbp-surface-background, #ffffff);
    box-shadow: var(--tbp-shadow-panel, 0 8px 24px rgba(20, 31, 52, .06));
}

.installation-heading {
    padding-bottom: 18px;
    border-bottom: 1px solid var(--tbp-border-subtle, #e7ebf2);
}

.installation-heading h1 {
    margin: 0;
    color: var(--tbp-text-strong, #121826);
    font-size: 1.8rem;
}

.installation-heading p:not(.platform-kicker) {
    margin: 8px 0 0;
    color: var(--tbp-text-muted, #566278);
}

.installation-form-section {
    margin-top: 18px;
}

.installation-form-section h2 {
    margin: 0;
    color: var(--tbp-text-strong, #121826);
    font-size: .94rem;
}

.installation-form-section p {
    margin: 5px 0 0;
    color: var(--tbp-text-muted, #566278);
    font-size: .86rem;
}

.installation-grid {
    --tbp-input-height: 36px;
    --tbp-dashboard-form-label-font-size: .86rem;
    --tbp-dashboard-form-font-size: .86rem;
    display: grid;
    align-items: start;
    grid-template-columns: minmax(0, 1fr) 160px;
    gap: 14px;
    padding-top: 18px;
}

.installation-grid-wide {
    grid-column: 1 / -1;
}

.installation-grid label,
.installation-options label {
    display: grid;
    gap: 6px;
    color: var(--tbp-text-muted, #5d6878);
    font-size: .86rem;
    font-weight: 600;
}

.installation-input {
    width: 100%;
    height: 36px;
    box-sizing: border-box;
    padding: 0 10px;
    border: 1px solid var(--tbp-border-control, #cfd6e4);
    border-radius: var(--tbp-radius-control, 6px);
    color: var(--tbp-text-primary, #1e2736);
    background: var(--tbp-surface-background, #ffffff);
}

.installation-input:focus {
    border-color: var(--tbp-primary, #2f6fed);
    outline: 2px solid color-mix(in srgb, var(--tbp-primary, #2f6fed) 16%, transparent);
}

.installation-options {
    display: grid;
    gap: 10px;
    margin-top: 18px;
    padding: 14px;
    border: 1px solid var(--tbp-border-subtle, #e7ebf2);
    border-radius: var(--tbp-radius-panel, 8px);
    background: var(--tbp-surface-muted, #f8fafc);
}

.installation-options label {
    display: flex;
    align-items: center;
    gap: 9px;
}

.installation-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.installation-primary,
.installation-secondary {
    height: 36px;
    padding: 0 14px;
    border-radius: var(--tbp-radius-control, 6px);
    font-weight: 700;
    cursor: pointer;
}

.installation-primary {
    border: 1px solid var(--tbp-primary-border, #1f5ed0);
    color: #ffffff;
    background: var(--tbp-primary, #2f6fed);
}

.installation-secondary {
    border: 1px solid var(--tbp-border-control, #cfd6e4);
    color: var(--tbp-text-primary, #1e2736);
    background: #ffffff;
}

.installation-primary:disabled,
.installation-secondary:disabled {
    cursor: wait;
    opacity: .72;
}

.installation-alert {
    display: grid;
    gap: 4px;
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: var(--tbp-radius-panel, 8px);
    font-size: .9rem;
}

.installation-alert span {
    color: var(--tbp-text-muted, #566278);
}

.installation-alert-ok {
    border: 1px solid var(--tbp-success-border, #b8dfca);
    background: var(--tbp-success-surface, #f3fbf6);
}

.installation-alert-warning {
    border: 1px solid #f2d08d;
    background: #fff9ea;
}

.installation-alert-error {
    border: 1px solid var(--tbp-danger-border, #efc0c7);
    background: var(--tbp-danger-surface, #fff7f8);
}

@media (max-width: 860px) {
    .platform-shell {
        padding: 32px 0;
    }

    .status-grid {
        grid-template-columns: 1fr;
    }

    .installation-grid {
        grid-template-columns: 1fr;
    }

    .installation-actions {
        justify-content: stretch;
        flex-direction: column;
    }
}
