:root {
    --bg: #f6f8fb;
    --text: #172033;
    --muted: #65738a;
    --line: #dbe2ec;
    --primary: #1f7a5f;
    --primary-dark: #176249;
    --danger: #b42318;
    --panel: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
}

.signup-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 40px 20px;
}

.signup-shell {
    width: min(100%, 520px);
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 18px 42px rgba(23, 32, 51, 0.10);
}

.signup-header {
    margin-bottom: 24px;
}

.brand-link {
    color: var(--primary-dark);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.signup-header h1 {
    margin: 10px 0 0;
    font-size: 28px;
    line-height: 1.25;
    letter-spacing: 0;
}

.signup-form {
    display: grid;
    gap: 16px;
}

.field {
    display: grid;
    gap: 8px;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.field input,
.field select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    background: #ffffff;
    font: inherit;
    font-weight: 500;
}

.field input:focus,
.field select:focus {
    border-color: var(--primary);
    outline: 3px solid rgba(31, 122, 95, 0.16);
}

.new-business-field[hidden],
.join-code-field[hidden] {
    display: none;
}

.field-error {
    min-height: 0;
    color: var(--danger);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}

.field-error:empty {
    display: none;
}

.form-alert {
    padding: 12px 14px;
    border: 1px solid rgba(180, 35, 24, 0.25);
    border-radius: 8px;
    color: var(--danger);
    background: rgba(180, 35, 24, 0.06);
    font-size: 14px;
    font-weight: 700;
}

.submit-button {
    min-height: 50px;
    border: 1px solid var(--primary);
    border-radius: 8px;
    color: #ffffff;
    background: var(--primary);
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}

.submit-button:hover {
    border-color: var(--primary-dark);
    background: var(--primary-dark);
}

.submit-button:disabled {
    border-color: var(--line);
    color: var(--muted);
    background: #edf1f6;
    cursor: not-allowed;
}

.submitted-shell {
    text-align: center;
}

.submitted-copy {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.6;
}

.submitted-note {
    margin: 8px 0 24px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.home-button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid var(--primary);
    border-radius: 8px;
    color: #ffffff;
    background: var(--primary);
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
}

.home-button:hover {
    border-color: var(--primary-dark);
    background: var(--primary-dark);
}

@media (max-width: 520px) {
    .signup-page {
        align-items: start;
        padding: 20px 14px;
    }

    .signup-shell {
        padding: 24px 18px;
    }
}
