﻿/* ══════════════════════════════════════════════════════════
   Platform Auth Pages
   Shared styles for login, register, forgot/reset password,
   email verification, and account profile pages.
   ══════════════════════════════════════════════════════════ */

.platform-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: #f4f6f9;
}

.platform-auth-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.platform-auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.platform-auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 0.5rem;
    color: #1a1a2e;
}

.platform-auth-subtitle {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    margin: 0 0 1.5rem;
    line-height: 1.5;
}

.platform-auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.platform-auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

    .platform-auth-field label {
        font-size: 0.84rem;
        font-weight: 600;
        color: #374151;
    }

        .platform-auth-field label small {
            font-weight: 400;
            color: #9ca3af;
        }

    .platform-auth-field input {
        background: #fff;
        border: 1.5px solid #d1d5db;
        border-radius: 8px;
        padding: 0.65rem 0.875rem;
        font-size: 0.9rem;
        color: #1a1a2e;
        transition: border-color 0.15s, box-shadow 0.15s;
        width: 100%;
        box-sizing: border-box;
    }

        .platform-auth-field input:focus {
            outline: none;
            border-color: #2563eb;
            box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
        }

        .platform-auth-field input:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

.platform-auth-hint {
    font-size: 0.78rem;
    color: #9ca3af;
    line-height: 1.4;
}

.platform-auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.platform-auth-remember {
    display: flex;
    align-items: center;
}

    .platform-auth-remember label {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.84rem;
        color: #666;
        cursor: pointer;
    }

/* ── Buttons ── */

/*
 * Buttons are intentionally re-declared with a:link / a:visited variants
 * because the global site stylesheet defines anchor colors via a:link/:visited
 * pseudo-class selectors (specificity 0,0,1,1) — those beat a plain class
 * selector (0,0,1,0), causing button text to silently inherit the link color
 * instead of #fff. Listing the pseudo-class variants raises specificity to
 * match and keeps the button text the intended color whether the element is
 * a <button> or an <a>.
 */

.platform-auth-btn-primary,
a.platform-auth-btn-primary:link,
a.platform-auth-btn-primary:visited {
    display: block;
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: #2563eb;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: opacity 0.15s, transform 0.1s;
}

    .platform-auth-btn-primary:hover,
    a.platform-auth-btn-primary:hover {
        opacity: 0.9;
        transform: translateY(-1px);
        color: #fff;
    }

    .platform-auth-btn-primary:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
    }

.platform-auth-btn-secondary,
a.platform-auth-btn-secondary:link,
a.platform-auth-btn-secondary:visited {
    display: block;
    width: 100%;
    padding: 0.7rem 1.5rem;
    background: transparent;
    color: #6b7280;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
    box-sizing: border-box;
}

    .platform-auth-btn-secondary:hover,
    a.platform-auth-btn-secondary:hover {
        background: #f3f4f6;
        border-color: #9ca3af;
        color: #6b7280;
    }

/* ── Divider ── */

.platform-auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    color: #9ca3af;
    font-size: 0.8rem;
}

    .platform-auth-divider::before,
    .platform-auth-divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: #e5e7eb;
    }

/* ── Links ── */

.platform-auth-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 0.75rem 0;
    font-size: 0.84rem;
}

    .platform-auth-links a,
    .platform-auth-card a {
        color: #2563eb;
        text-decoration: none;
    }

        .platform-auth-links a:hover,
        .platform-auth-card a:hover {
            text-decoration: underline;
        }

/* ── Alerts ── */

.platform-auth-alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.platform-auth-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.platform-auth-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.platform-auth-alert a {
    color: inherit;
    text-decoration: underline;
}

/* ── Required star ── */

.req {
    color: #dc2626;
    margin-left: 2px;
}

/* ── Responsive ── */

@media (max-width: 480px) {
    .platform-auth-card {
        padding: 1.75rem 1.25rem;
        border-radius: 12px;
    }

    .platform-auth-row {
        grid-template-columns: 1fr;
    }
}
