/* Modern Authentication Styles - KW Mini Vans & Spare Parts */

:root {
    --kw-green: #32CD32;
    --kw-green-dark: #228B22;
    --kw-orange: #FF8C00;
    --kw-orange-dark: #FF6600;
    --kw-dark: #1a1a1a;
}

/* Login/Signup Page Container */
.auth-page-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
    margin: 0;
}

.auth-page-container::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(50, 205, 50, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 140, 0, 0.08) 0%, transparent 50%);
    top: 0;
    left: 0;
    z-index: 0;
}

.auth-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

/* Auth Card */
.auth-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    background: #ffffff;
    padding: 40px 30px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
}

.auth-logo {
    margin-bottom: 30px;
}

.auth-logo img {
    max-height: 150px;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .auth-logo img {
        max-height: 120px;
    }
}

@media (max-width: 576px) {
    .auth-logo img {
        max-height: 100px;
    }
}

.auth-header h1 {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

.auth-header p {
    font-size: 15px;
    color: #6c757d;
    margin: 0;
    font-weight: 400;
}

/* Tab Navigation */
.auth-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.auth-tab {
    flex: 1;
    padding: 18px 20px;
    text-align: center;
    background: transparent;
    border: none;
    color: #6c757d;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
}

.auth-tab:hover {
    color: var(--kw-green);
    background: rgba(50, 205, 50, 0.05);
}

.auth-tab.active {
    color: var(--kw-orange);
    background: white;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--kw-green) 0%, var(--kw-orange) 100%);
}

/* Form Content */
.auth-body {
    padding: 40px 30px;
}

.auth-tab-content {
    display: none;
}

.auth-tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form Groups */
.form-group-modern {
    margin-bottom: 24px;
}

.form-group-modern label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.form-group-modern label .required {
    color: var(--kw-orange);
    margin-left: 3px;
}

.form-input-modern {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: #fafafa;
    box-sizing: border-box;
}

.form-input-modern:focus {
    outline: none;
    border-color: var(--kw-green);
    background: white;
    box-shadow: 0 0 0 4px rgba(50, 205, 50, 0.1);
}

.form-input-modern.error {
    border-color: #dc3545;
    background: #fff5f5;
}

.form-input-modern.success {
    border-color: var(--kw-green);
    background: #f0fff4;
}

/* Password Input Group */
.password-input-group {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 8px;
    font-size: 18px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.password-toggle .toggle-icon {
    font-size: 18px;
    line-height: 1;
    display: block;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 8px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

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

.password-strength-bar.weak {
    width: 33%;
    background: #dc3545;
}

.password-strength-bar.medium {
    width: 66%;
    background: var(--kw-orange);
}

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

.password-strength-text {
    font-size: 12px;
    margin-top: 6px;
    color: #6c757d;
}

/* Form Helper Text */
.form-helper {
    font-size: 12px;
    color: #6c757d;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-helper.error {
    color: #dc3545;
}

.form-helper.success {
    color: var(--kw-green);
}

/* Checkbox Modern */
.checkbox-modern {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.checkbox-modern input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--kw-green);
}

.checkbox-modern label {
    font-size: 14px;
    color: #555;
    cursor: pointer;
    margin: 0;
}

.checkbox-modern a {
    color: var(--kw-orange);
    text-decoration: none;
    font-weight: 600;
}

.checkbox-modern a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn-auth {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.btn-auth-primary {
    background: linear-gradient(135deg, var(--kw-orange) 0%, var(--kw-orange-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.4);
}

.btn-auth-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.5);
}

.btn-auth-primary:active {
    transform: translateY(0);
}

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

.btn-auth-secondary {
    background: white;
    color: var(--kw-green);
    border: 2px solid var(--kw-green);
}

.btn-auth-secondary:hover {
    background: var(--kw-green);
    color: white;
}

/* Social Login */
.auth-divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    right: 0;
    height: 1px;
    background: #e0e0e0;
}

.auth-divider span {
    background: white;
    padding: 0 16px;
    color: #6c757d;
    font-size: 14px;
    position: relative;
}

.social-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.btn-social {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-social:hover {
    border-color: var(--kw-green);
    background: #f0fff4;
    transform: translateY(-2px);
}

.btn-social.google {
    color: #db4437;
}

.btn-social.google:hover {
    border-color: #db4437;
    background: #fff5f5;
}

.btn-social.facebook {
    color: #4267B2;
}

.btn-social.facebook:hover {
    border-color: #4267B2;
    background: #f0f4ff;
}

/* Messages */
.auth-message {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.auth-message.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-message.error {
    background: #fff5f5;
    color: #dc3545;
    border: 1px solid #fecaca;
}

.auth-message.success {
    background: #f0fff4;
    color: var(--kw-green-dark);
    border: 1px solid #86efac;
}

/* Forgot Password Link */
.forgot-password-link {
    text-align: center;
    margin-top: 16px;
}

.forgot-password-link a {
    color: var(--kw-orange);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

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

/* Loading Spinner */
.btn-auth.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-auth.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive */
@media (max-width: 576px) {
    .auth-page-container {
        padding: 20px 15px;
    }
    
    .auth-header {
        padding: 30px 20px;
    }
    
    .auth-header h1 {
        font-size: 24px;
    }
    
    .auth-body {
        padding: 30px 20px;
    }
    
    .social-login {
        grid-template-columns: 1fr;
    }
    
    .auth-tab {
        padding: 14px 12px;
        font-size: 14px;
    }
}

/* Accessibility */
.form-input-modern:focus-visible {
    outline: 3px solid var(--kw-green);
    outline-offset: 2px;
}

.btn-auth:focus-visible,
.btn-social:focus-visible {
    outline: 3px solid var(--kw-orange);
    outline-offset: 2px;
}

/* Animations */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.form-group-modern.shake {
    animation: shake 0.5s ease-in-out;
}

