﻿* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #334155 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Header ── */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 28px;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}

.site-header .brand .logo {
    height: 36px;
    object-fit: contain;
}

.site-header .brand-name {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.2px;
}

.site-header .back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #E2E8F0;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.site-header .back-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
}

/* ── Main ── */
.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 32px 16px;
}

.form-container {
    background: #fff;
    border-radius: 16px;
    padding: 36px 40px 32px;
    width: 480px;
    max-width: 94vw;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.form-container h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0F172A;
    text-align: center;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.input-group {
    margin-bottom: 18px;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.82rem;
    color: #334155;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1.5px solid #E2E8F0;
    font-size: 0.88rem;
    color: #0F172A;
    background: #F8FAFC;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
    font-family: inherit;
}

.input-group input:focus,
.input-group select:focus {
    border-color: #3B82F6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-group input::placeholder { color: #94A3B8; }

.input-note {
    display: block;
    margin-top: 4px;
    font-size: 0.72rem;
    color: #94A3B8;
}

.btn-primary {
    width: 100%;
    padding: 11px;
    border: none;
    background: #3B82F6;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    margin-top: 4px;
}

.btn-primary:hover { background: #2563EB; }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.success-message {
    padding: 24px;
    background: #F0FDF4;
    border-radius: 12px;
    border: 1px solid #BBF7D0;
    text-align: center;
}

.success-message h4 {
    font-size: 1rem;
    color: #16A34A;
    margin-bottom: 8px;
}

.success-message p {
    font-size: 0.85rem;
    color: #334155;
    line-height: 1.5;
    margin-bottom: 6px;
}

.success-message a {
    color: #3B82F6;
    text-decoration: none;
    font-weight: 500;
}

.success-message a:hover { text-decoration: underline; }

.email-status {
    font-weight: 600;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
}

.email-status.sent { color: #166534; background: #DCFCE7; }
.email-status.not-sent { color: #92400E; background: #FEF3C7; }

/* ── Footer ── */
.site-footer {
    text-align: center;
    padding: 14px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
    background: rgba(15, 23, 42, 0.35);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-weight: 500;
}

.site-footer a:hover { color: #fff; text-decoration: underline; }

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(100%);
    transition: transform 0.3s ease, opacity 0.3s ease;
    font-size: 0.85rem;
    min-width: 260px;
    max-width: 360px;
    font-weight: 500;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

/* ── Mobile / Small Screen ── */
@media (max-width: 600px) {
    .input-group input,
    .input-group select {
        font-size: 16px;
        padding: 12px;
    }

    .form-container {
        padding: 28px 22px 24px;
    }

    .form-container h3 {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }

    .site-header {
        padding: 10px 16px;
    }

    .site-header .brand .logo { height: 30px; }

    .site-header .brand-name { font-size: 0.85rem; }

    .site-header .back-link { padding: 7px 10px; font-size: 0.78rem; }
}

@media (max-height: 560px) {
    body {
        justify-content: flex-start;
    }

    .main-content {
        padding: 16px;
    }
}