/* ==========================================================================
   Mate Social - Login Page Stylesheet
   ========================================================================== */

:root {
    --primary: #5700fa;
    --primary-hover: #4800d4;
    --primary-dark: #310078;
    --primary-light: #f5f0ff;
    --text-dark: #16002f;
    --text-body: #3c344d;
    --text-muted: #5f5b68;
    --white: #ffffff;
    --border: #e7ddff;
    --bg-body: #faf8ff;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 9999px;
    --shadow-lg: 0 16px 40px rgba(87, 0, 250, 0.12);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-body);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-container {
    width: 100%;
    max-width: 440px;
}

.login-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    height: 42px;
    margin: 0 auto 1.25rem auto;
}

.login-header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    color: var(--text-dark);
    font-weight: 700;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.4rem;
}

/* Alert Notification Area */
.alert-box {
    padding: 0.9rem 1.1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    display: none;
}

.alert-box.info {
    display: block;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--border);
}

.alert-box.error {
    display: block;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-box.success {
    display: block;
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.95rem;
    background: var(--bg-body);
    color: var(--text-dark);
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(87, 0, 250, 0.1);
}

.toggle-password {
    position: absolute;
    right: 0.8rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.2rem;
    display: flex;
    align-items: center;
}

.toggle-password:hover {
    color: var(--primary);
}

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-body);
}

.checkbox-label input {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
}

.forgot-link {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 0.9rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-pill);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    box-shadow: 0 4px 14px rgba(87, 0, 250, 0.3);
}

.btn-submit:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(87, 0, 250, 0.4);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Back to Home Link */
.back-home {
    text-align: center;
    margin-top: 1.75rem;
}

.back-home a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.back-home a:hover {
    color: var(--primary);
}

/* Loading Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
    .login-card {
        padding: 1.75rem 1.25rem;
    }
}
