/* Neo-Tactile Authentication Pages Styling */
/* Matches BizPass homepage design system */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Neo-Tactile Color Palette */
    --bg-base: #E8E4DF;
    --bg-light: #F2EFEB;
    --bg-card: #EDEAE5;

    /* Accent Colors */
    --accent-sage: #858A6B;
    --accent-sage-dark: #6B7055;
    --accent-sage-light: #A3A88A;
    --accent-tan: #C4B8A5;
    --accent-brown: #8B7355;

    /* Text Colors */
    --text-primary: #3D3D3D;
    --text-secondary: #6C6C6C;
    --text-muted: #9A9A9A;
    --text-light: #FFFFFF;

    /* Status Colors */
    --color-success: #6B8A5E;
    --color-error: #B85C5C;

    /* Shadow Colors */
    --shadow-dark: rgba(163, 157, 147, 0.5);
    --shadow-light: rgba(255, 255, 255, 0.8);

    /* Neomorphic Shadows */
    --neo-shadow-raised:
        6px 6px 12px var(--shadow-dark),
        -6px -6px 12px var(--shadow-light);
    --neo-shadow-raised-sm:
        4px 4px 8px var(--shadow-dark),
        -4px -4px 8px var(--shadow-light);
    --neo-shadow-inset:
        inset 4px 4px 8px var(--shadow-dark),
        inset -4px -4px 8px var(--shadow-light);
    --neo-shadow-elevated:
        8px 8px 20px var(--shadow-dark),
        -8px -8px 20px var(--shadow-light);

    /* Spacing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

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

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-base);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Neomorphic Container */
.auth-container {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--neo-shadow-elevated);
    animation: fadeInUp 0.5s ease;
    position: relative;
}

/* Header */
.auth-header {
    text-align: center;
    margin-bottom: 36px;
}

.auth-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-sage);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    font-weight: 500;
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    padding-left: 4px;
}

/* Neomorphic Input Fields */
.form-group input {
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 500;
    background: var(--bg-base);
    color: var(--text-primary);
    box-shadow: var(--neo-shadow-inset);
    transition: all 0.2s ease;
}

.form-group input:focus {
    outline: none;
    box-shadow:
        var(--neo-shadow-inset),
        0 0 0 3px rgba(133, 138, 107, 0.2);
}

.form-group input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

/* Error Message */
.error-message {
    background: var(--bg-card);
    border-left: 4px solid var(--color-error);
    color: var(--color-error);
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--neo-shadow-raised-sm);
    display: none;
    margin-bottom: 16px;
}

.error-message.show {
    display: block;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* Success Message */
.success-message {
    background: var(--bg-card);
    border-left: 4px solid var(--color-success);
    color: var(--color-success);
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--neo-shadow-raised-sm);
    display: none;
    margin-bottom: 16px;
}

.success-message.show {
    display: block;
}

/* Primary Button */
.btn-primary {
    background: var(--accent-sage);
    color: var(--text-light);
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-xl);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: var(--neo-shadow-raised);
    margin-top: 8px;
}

.btn-primary:hover {
    background: var(--accent-sage-dark);
    transform: translateY(-2px);
    box-shadow: var(--neo-shadow-elevated);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--neo-shadow-inset);
}

.btn-primary:disabled {
    background: var(--accent-tan);
    cursor: not-allowed;
    transform: none;
    box-shadow: var(--neo-shadow-raised-sm);
    opacity: 0.7;
}

/* Secondary Button */
.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-xl);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: var(--neo-shadow-raised);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--neo-shadow-elevated);
}

.btn-secondary:active {
    box-shadow: var(--neo-shadow-inset);
    transform: translateY(0);
}

/* Footer Links */
.auth-footer {
    margin-top: 28px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-footer p {
    margin-bottom: 8px;
}

.auth-footer a {
    color: var(--accent-sage);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: var(--accent-sage-dark);
}

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

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

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--accent-tan);
    opacity: 0.5;
}

/* Info Box */
.info-box {
    background: var(--bg-base);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    box-shadow: var(--neo-shadow-inset);
}

.info-box strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Password Strength Indicator */
.password-strength {
    height: 4px;
    background: var(--bg-base);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
    box-shadow: var(--neo-shadow-inset);
}

.password-strength-bar {
    height: 100%;
    transition: width 0.3s, background 0.3s;
    border-radius: 2px;
}

.password-strength-bar.weak {
    width: 33%;
    background: var(--color-error);
}

.password-strength-bar.medium {
    width: 66%;
    background: #C4A86B;
}

.password-strength-bar.strong {
    width: 100%;
    background: var(--color-success);
}

/* Checkbox Styling */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: var(--bg-base);
    box-shadow: var(--neo-shadow-inset);
    appearance: none;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-group input[type="checkbox"]:checked {
    background: var(--accent-sage);
    box-shadow: var(--neo-shadow-raised-sm);
}

.checkbox-group input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: 700;
}

.checkbox-group label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 500;
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 20px;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.back-link:hover {
    color: var(--text-primary);
    background: var(--bg-base);
    box-shadow: var(--neo-shadow-raised-sm);
}

/* Social Login Buttons */
.social-login-btn {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: var(--neo-shadow-raised-sm);
    width: 100%;
}

.social-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--neo-shadow-raised);
}

.social-login-btn:active {
    box-shadow: var(--neo-shadow-inset);
}

.social-login-btn img {
    width: 20px;
    height: 20px;
}

/* Responsive Design */
@media (max-width: 520px) {
    .auth-container {
        padding: 36px 28px;
        border-radius: 20px;
    }

    .auth-header h1 {
        font-size: 1.75rem;
    }

    .form-group input,
    .btn-primary,
    .btn-secondary {
        font-size: 0.95rem;
        padding: 12px 16px;
    }
}

@media (max-width: 380px) {
    .auth-container {
        padding: 28px 20px;
    }

    .auth-header h1 {
        font-size: 1.5rem;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus Visible for Accessibility */
*:focus-visible {
    outline: 2px solid var(--accent-sage);
    outline-offset: 2px;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}
