:root {
    --bg: #0F172A;
    --surface: #1E293B;
    --muted-surface: #111827;
    --primary: #FF5252;
    --primary-hover: #FF8A65;
    --secondary: #006AA3;
    --accent: #00BFA5;
    --violet: #5C6BC0;
    --text: #E2E8F0;
    --text-muted: #94A3B8;
    --border: #1E293B;
    --glass: rgba(255, 255, 255, 0.03);
    --radius: 14px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);

    /* Mappings for signup-app compatibility */
    --card: var(--surface);
    --muted: var(--text-muted);
    --danger: #ef4444;
    --success: #22c55e;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: "Lato", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    line-height: 1.6;
}

.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(to bottom, rgba(15, 23, 42, .9), rgba(15, 23, 42, .6));
    backdrop-filter: saturate(140%) blur(6px);
    border-bottom: 1px solid rgba(255, 255, 255, .04);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
}

.brand img {
    height: 28px;
    width: auto;
    display: block;
}

.brand span {
    display: none; /* In www page the logo includes the text or they don't use it */
}

.container {
    max-width: 720px;
    margin: 24px auto 48px;
    padding: 0 16px;
}

.card {
    background: var(--glass);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.card h1 {
    margin: 0 0 1rem;
    font-size: 1.8rem;
}

.card p {
    color: var(--text-muted);
    margin: 0.5rem 0 0;
}

.grid {
    display: grid;
    gap: 1.5rem;
    align-items: start;
    margin-top: 1rem;
}

@media (min-width: 640px) {
    .grid-2 {
        grid-template-columns: 1fr 1fr;
    }
}

label {
    display: block;
    font-weight: 600;
    margin: 0 0 0.3rem;
    color: var(--text);
}

input[type="text"], input[type="email"], input[type="date"], input[type="number"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font-family: inherit;
    transition: border-color 0.2s ease;
}

input:focus {
    outline: none;
    border-color: var(--accent);
}

input::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
}

fieldset {
    border: none;
    padding: 0;
    margin: 14px 0;
}

legend {
    font-weight: 700;
    margin-bottom: 8px;
}

.radio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0.8rem 14px 0 0;
    color: var(--muted);
}

.actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 1.5rem;
}

#price {
    min-width: 200px; /* stabilize layout to avoid button shifting */
}

.btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.65rem 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s ease;
    line-height: 1;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-size: 1rem;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary);
    color: #111;
    box-shadow: 0 4px 12px rgba(255, 82, 82, 0.2);
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-ghost {
    border-color: rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .02);
    color: var(--text);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, .06);
}

.note {
    font-size: 0.92rem;
    color: var(--muted);
    min-height: 1.2rem;
}

#price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

#messages {
    margin-top: 10px;
    color: var(--danger);
    font-weight: 600;
}

.warning {
    margin-top: 6px;
    color: var(--danger);
    font-weight: 700;
    min-height: 1.2rem;
}

/* Hide number input spinners and match dark theme */
/* Chrome, Safari, Edge, Opera */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

.success {
    color: var(--success);
}

.summary {
    display: grid;
    gap: 12px;
    margin: 1rem 0 1.5rem;
    padding: 1.2rem;
    border-radius: var(--radius);
    background: var(--glass);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.kv {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.kv strong {
    color: var(--text);
}

.hp {
    position: absolute;
    left: -5000px;
    top: -5000px;
}

.footer {
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
    margin: 24px 0;
}