* { box-sizing: border-box; }

:root {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #172033;
    background: #f4f7fb;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0f1730;
    color: #fff;
    padding: 0 20px;
    height: 56px;
}

.topbar-brand {
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: .02em;
}

.topbar-right {
    font-size: 13px;
}

.topbar-right a {
    color: #fff;
    text-decoration: none;
    background: #1a2650;
    padding: 7px 14px;
    border-radius: 8px;
    font-weight: 600;
}

.topbar-right a:hover {
    background: #1f4fd1;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(31,79,209,.10), transparent 32rem),
        #f4f7fb;
}

.page-shell {
    min-height: calc(100vh - 56px);
    display: grid;
    place-items: center;
    padding: 24px;
}

.card {
    width: min(100%, 620px);
    background: #fff;
    border: 1px solid #e5eaf2;
    border-radius: 20px;
    padding: clamp(24px, 5vw, 42px);
    box-shadow: 0 20px 60px rgba(20, 35, 70, .10);
}

.brand {
    font-weight: 800;
    letter-spacing: .04em;
    color: #1f4fd1;
    margin-bottom: 12px;
}

h1 { margin: 0 0 12px; font-size: clamp(28px, 5vw, 42px); line-height: 1.1; }
p { line-height: 1.65; }
.muted { color: #667085; }
.small { font-size: 13px; margin-top: 18px; }

.form-grid { display: grid; gap: 18px; margin-top: 26px; }
label { display: grid; gap: 8px; font-weight: 650; }

input, select {
    width: 100%;
    border: 1px solid #cfd7e6;
    border-radius: 12px;
    padding: 13px 14px;
    font: inherit;
    background: #fff;
}

input:focus, select:focus {
    outline: 3px solid rgba(31, 79, 209, .14);
    border-color: #1f4fd1;
}

.primary-button {
    display: block;
    border: 0;
    border-radius: 12px;
    padding: 14px 18px;
    background: #1f4fd1;
    color: white;
    font: inherit;
    font-weight: 750;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
}

.inline-button { display: inline-block; min-width: 190px; }

.link-button {
    display: block;
    width: 100%;
    background: none;
    border: 0;
    color: #1f4fd1;
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
    padding: 8px 0;
}

.checkbox-label {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #495a78;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.terms-toggle {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-size: 12px;
    color: #6b7280;
    text-decoration: underline;
    cursor: pointer;
}

.terms-toggle:hover {
    color: #172033;
}

.terms-line {
    font-size: 12px;
    color: #6b7280;
    margin: -6px 0 4px;
}

.mobile-row {
    display: flex;
    gap: 8px;
}

.country-code-select {
    flex: 0 0 150px;
}

.mobile-row input[type="tel"] {
    flex: 1;
    min-width: 0;
}

.terms-text {
    font-size: 11.5px;
    line-height: 1.6;
    color: #6b7280;
    background: #f5f7fb;
    border: 1px solid #e5eaf2;
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: -4px;
}

.alert {
    padding: 13px 15px;
    border-radius: 12px;
    margin: 18px 0;
}

.alert.error { background: #fff0f0; color: #a21414; border: 1px solid #ffd1d1; }
.alert.success { background: #ecfdf3; color: #08783e; border: 1px solid #b7efcf; }

.center { text-align: center; }

.spinner {
    width: 52px;
    height: 52px;
    margin: 0 auto 20px;
    border: 5px solid #e3e9f5;
    border-top-color: #1f4fd1;
    border-radius: 50%;
    animation: spin .9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.success-mark, .failure-mark {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    font-size: 36px;
    font-weight: 900;
}

.success-mark { background: #dcfce7; color: #15803d; }
.failure-mark { background: #fee2e2; color: #b91c1c; }

.admin-shell { padding: 24px; }
.table-wrap { overflow-x: auto; background: white; border-radius: 14px; border: 1px solid #e5eaf2; }
table { width: 100%; border-collapse: collapse; min-width: 1100px; }
th, td { padding: 12px; border-bottom: 1px solid #edf0f5; text-align: left; vertical-align: top; }
th { background: #f8fafc; }

@media (max-width: 560px) {
    .page-shell { padding: 12px; }
    .card { border-radius: 16px; padding: 22px; }
}
