@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,400&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --gold: #f39c12;
    --gold-light: #f1c40f;
    --gold-dark: #D4881A;
    --surface: rgba(255, 255, 255, 0.95);
    --surface-2: rgba(255, 255, 255, 0.6);
    --border: rgba(180, 190, 210, 0.5);
    --border-focus: rgba(243, 156, 18, 0.5);
    --text: #1e2a3a;
    --text-muted: #5a6880;
    --text-subtle: #8a9ab5;
    --radius: 14px;
    --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body { min-height: 100%; }

body {
    font-family: 'DM Sans', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--text);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 24px 16px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -200px; left: 50%;
    transform: translateX(-50%);
    width: clamp(400px, 80vw, 900px);
    height: clamp(400px, 60vh, 700px);
    background: radial-gradient(ellipse at center, rgba(243, 156, 18, 0.07) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    bottom: -100px; right: -100px;
    width: 400px; height: 400px;
    background: radial-gradient(ellipse at center, rgba(195, 207, 226, 0.4) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ── Main wrapper ── */
.main-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 960px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(245, 166, 35, 0.05),
        0 32px 80px rgba(0, 0, 0, 0.12),
        0 8px 24px rgba(0, 0, 0, 0.08);
    display: flex;
    animation: fadeUp 0.5s ease both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Left panel ── */
.left-panel {
    flex: 0 0 clamp(220px, 38%, 340px);
    background: linear-gradient(155deg, var(--gold) 0%, var(--gold-dark) 100%);
    padding: clamp(32px, 5vw, 52px) clamp(24px, 4vw, 40px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.left-panel::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.left-panel::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -40px;
    width: 240px; height: 240px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.left-brand {
    font-family: 'Sora', sans-serif;
    font-size: clamp(22px, 4vw, 28px);
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.left-tagline {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    font-style: italic;
    margin-bottom: clamp(28px, 4vw, 40px);
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.left-title {
    font-family: 'Sora', sans-serif;
    font-size: clamp(15px, 2.5vw, 18px);
    font-weight: 600;
    color: #fff;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.features-list {
    list-style: none;
    position: relative;
    z-index: 1;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    line-height: 1.4;
}

.feature-check {
    flex-shrink: 0;
    width: 18px; height: 18px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.feature-check svg { stroke: #fff; }

/* ── Right panel ── */
.right-panel {
    flex: 1;
    padding: clamp(28px, 5vw, 48px) clamp(20px, 5vw, 48px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    max-height: 100vh;
}

.form-header { margin-bottom: 20px; }

.form-header h2 {
    font-family: 'Sora', sans-serif;
    font-size: clamp(18px, 3.5vw, 22px);
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
    margin-bottom: 4px;
}

.form-header p { font-size: 13px; color: var(--text-muted); }

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.divider-line { flex: 1; height: 1px; background: var(--border); }

.divider-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-subtle);
}

/* Alerts */
.error-box {
    background: rgba(224, 82, 82, 0.08);
    border: 1px solid rgba(224, 82, 82, 0.25);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 16px;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%  { transform: translateX(-6px); }
    40%  { transform: translateX(6px); }
    60%  { transform: translateX(-4px); }
    80%  { transform: translateX(4px); }
}

.error-box p {
    font-size: 13px;
    color: #c0392b;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 4px;
}

.error-box p:last-child { margin-bottom: 0; }

.success-box {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #065f46;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Form grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
    margin-bottom: 12px;
}

.form-group { display: flex; flex-direction: column; }
.form-group.full-width { grid-column: 1 / -1; }

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text);
    font-size: 12.5px;
    font-family: 'DM Sans', sans-serif;
}

.required-star { color: var(--gold-dark); margin-left: 2px; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13.5px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    transition: var(--transition);
    background: var(--surface-2);
    color: var(--text);
    outline: none;
    -webkit-appearance: none;
}

textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

input::placeholder,
textarea::placeholder { color: var(--text-subtle); }

select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a9ab5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--border-focus);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.08);
}

.helper-text {
    font-size: 11.5px;
    color: var(--text-subtle);
    margin-top: 5px;
    font-family: 'DM Sans', sans-serif;
}

/* Password group */
.password-input-group { display: flex; align-items: center; }

.password-input-group input {
    border-radius: var(--radius) 0 0 var(--radius);
    flex: 1;
}

.password-toggle {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-left: none;
    color: var(--text-muted);
    padding: 10px 14px;
    border-radius: 0 var(--radius) var(--radius) 0;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
}

.password-toggle:hover {
    background: rgba(243, 156, 18, 0.08);
    color: var(--gold-dark);
    border-color: var(--border-focus);
}

/* Section divider inside grid */
.section-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    grid-column: 1 / -1;
    margin: 4px 0 2px;
}

.section-divider-line { flex: 1; height: 1px; background: var(--border); }

.section-divider-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-subtle);
}

/* Submit button */
.submit-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(13px, 2.5vw, 15px);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(243, 156, 18, 0.3);
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
    margin-top: 4px;
}

.submit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.12);
    opacity: 0;
    transition: opacity var(--transition);
}

.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(243, 156, 18, 0.4); }
.submit-btn:hover::before { opacity: 1; }
.submit-btn:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3); }

/* Form footer */
.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.back-link a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--text-subtle);
    text-decoration: none;
    font-weight: 400;
    transition: color var(--transition);
}

.back-link a:hover { color: var(--text-muted); }

.signin-link { font-size: 13px; color: var(--text-muted); }
.signin-link a { color: var(--gold); text-decoration: none; font-weight: 500; transition: color var(--transition); }
.signin-link a:hover { color: var(--gold-light); }

/* Success overlay */
.success-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.97);
    z-index: 1000;
    animation: fadeUp 0.4s ease both;
    gap: 16px;
}

.success-overlay-icon {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(243, 156, 18, 0.3);
}

.success-overlay h3 {
    font-family: 'Sora', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    text-align: center;
}

.success-overlay p {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    max-width: 340px;
    line-height: 1.6;
}

.success-overlay .redirect-note { font-size: 12px; color: var(--text-subtle); }

/* ── Responsive ── */
@media (max-width: 700px) {
    .main-card { flex-direction: column; border-radius: 20px; }
    .left-panel { flex: none; padding: 28px 24px; }
    .left-tagline { margin-bottom: 20px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-group.full-width { grid-column: auto; }
    .form-footer { flex-direction: column; align-items: flex-start; }
    .right-panel { max-height: none; }
}

@media (min-width: 1100px) {
    .main-card { max-width: 1000px; }
}