/* Auth Pages — Shared Styles (dark theme, matching design system) */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0b0f1a 0%, #1a1a2e 100%);
    padding: 20px;
}

.auth-card {
    background: #11182a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
}

/* Header */
.auth-header {
    margin-bottom: 32px;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ff7f50, #ff4d4d);
    border-radius: 16px;
    margin-bottom: 24px;
}

.brand-logo img {
    width: 40px;
    height: 40px;
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px 0;
}

.subtitle {
    color: #9fb0d0;
    font-size: 1rem;
    margin: 0;
}

.subtitle strong {
    color: #fff;
}

/* Messages */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    text-align: left;
}

.error-list {
    margin: 8px 0 0 20px;
    padding: 0;
    font-size: 0.85rem;
}

.success-message {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.info-message {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.info-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.info-hint {
    color: #9fb0d0;
    font-size: 0.85rem;
    margin-top: 8px;
}

/* Google button */
.google-signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 24px;
    background: #fff;
    color: #3c4043;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.google-signin-btn:hover {
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 28px 0;
    color: #9fb0d0;
    font-size: 0.85rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.divider span {
    padding: 0 16px;
    white-space: nowrap;
}

/* Form */
.auth-form {
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #9fb0d0;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.form-group input::placeholder {
    color: #64748b;
}

.form-group input:focus {
    outline: none;
    border-color: #ff7f50;
    background: rgba(255, 127, 80, 0.05);
}

.field-hint {
    display: block;
    color: #64748b;
    font-size: 0.8rem;
    margin-top: 6px;
}

/* Waitlist access code — codes are 8 uppercase alphanumerics, so give them the same
   monospaced, spaced-out treatment as the standalone /code-entry page. */
.access-code-input {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    letter-spacing: 0.25em;
    text-transform: uppercase;
}

/* Checkbox rows. The rules above assume a stacked label-over-full-width-input layout, which is
   wrong for a checkbox — hence the explicit overrides rather than new base styles. */
.form-check-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.form-check-group .form-check-input {
    width: auto;
    flex: 0 0 auto;
    margin-top: 2px;
    padding: 0;
    accent-color: #ff7f50;
    /* 16px keeps the tap target usable on touch without dwarfing the label. */
    inline-size: 16px;
    block-size: 16px;
}

.form-check-group .form-check-label {
    /* Undo the uppercase caption styling — this is a sentence, not a field caption. */
    display: inline;
    margin-bottom: 0;
    color: #9fb0d0;
    font-size: 0.85rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    line-height: 1.5;
    cursor: pointer;
}

.form-check-group .form-check-label a {
    color: #fff;
    text-decoration: underline;
}

.form-check-group .form-check-label a:hover {
    color: #ff7f50;
}

/* Buttons */
.btn-primary {
    display: block;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #ff7f50, #ff4d4d);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 127, 80, 0.3);
}

.btn-secondary {
    display: block;
    width: 100%;
    padding: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: #9fb0d0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Form links */
.form-links {
    text-align: center;
    margin-top: 16px;
}

.form-links a {
    color: #ff7f50;
    font-size: 0.9rem;
    text-decoration: none;
}

.form-links a:hover {
    text-decoration: underline;
}

/* Footer */
.auth-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-footer p {
    color: #9fb0d0;
    font-size: 0.9rem;
    margin: 0 0 12px 0;
}

.auth-footer a {
    color: #ff7f50;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.legal-text {
    font-size: 0.8rem !important;
    color: #64748b !important;
    line-height: 1.4;
}

.legal-text a {
    color: #9fb0d0 !important;
}

.back-link {
    display: inline-block;
    color: #9fb0d0 !important;
    font-size: 0.9rem;
    text-decoration: none !important;
    transition: color 0.2s ease;
    margin-top: 4px;
}

.back-link:hover {
    color: #fff !important;
}

/* Responsive */
@media (max-width: 640px) {
    .auth-card {
        padding: 32px 24px;
        margin: 20px;
    }

    .auth-header h1 {
        font-size: 1.5rem;
    }
}
