/* --- Design System & Global Variables --- */
:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    --success: #16a34a;
    --success-light: #dcfce7;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-gradient: radial-gradient(circle at 50% 50%, #f8fafc 0%, #e2e8f0 100%);
    --card-bg: rgba(255, 255, 255, 0.9);
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(79, 70, 229, 0.08), 0 10px 10px -5px rgba(79, 70, 229, 0.04);
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg-gradient);
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.wrapper {
    width: 100%;
    max-width: 540px;
    margin: auto;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), var(--shadow-md);
    padding: 2.5rem 2rem;
    width: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Base style for header icon */
.header-icon {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

h1 {
    color: var(--text-main);
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.description {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: justify;
    margin-bottom: 2rem;
    font-weight: 400;
}

.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    display: block;
}

input[type="email"], select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-main);
    background-color: #ffffff;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    outline: none;
}

input[type="email"]:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
    cursor: pointer;
    font-weight: 500;
}

.info-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: -0.5rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.captcha-container {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}

button[type="submit"] {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

button[type="submit"]:active {
    transform: translateY(1px);
}

.alert-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 500;
}

.footer {
    margin-top: 2.5rem;
    text-align: center;
    font-size: 0.775rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-links {
    margin-top: 0.75rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.footer-links a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* --- Form Page Specific --- */
.header-icon-form {
    width: 56px;
    height: 56px;
    background: var(--primary-light);
    color: var(--primary);
    margin: 0 auto 1.5rem auto;
}

.header-icon-form svg {
    width: 28px;
    height: 28px;
}

/* --- Success Page Specific --- */
.card-success {
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.header-icon-success {
    width: 64px;
    height: 64px;
    background: var(--success-light);
    color: var(--success);
    margin-bottom: 1.5rem;
}

.header-icon-success svg {
    width: 32px;
    height: 32px;
}

.success-message {
    color: var(--text-main);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.email {
    color: var(--primary);
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 2rem;
    background: var(--primary-light);
    padding: 0.35rem 1rem;
    border-radius: 50px;
    display: inline-block;
}

.back-link {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: var(--radius-md);
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.back-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

.back-link:active {
    transform: translateY(1px);
}

/* --- Responsive Adjustments --- */
@media (max-width: 480px) {
    .card {
        padding: 2rem 1.25rem;
    }
    .card-success {
        padding: 2.5rem 1.25rem;
    }
    h1 {
        font-size: 1.4rem;
    }
}
