/* Medimplify Authentication Styles */
:root {
    --primary-color: #3ab598;
    --primary-dark: #2a8a7a;
    --primary-light: #4bc4a8;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --white: #ffffff;
    --black: #000000;
    --light-gray: #f8f9fa;
    --border-color: #e9ecef;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.auth-body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* Background Pattern */
.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.auth-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(1deg); }
}

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Auth Card */
.auth-card {
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
}

.auth-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(58, 181, 152, 0.1);
}

.logo-subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 20px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.auth-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 0;
}

/* Auth Form */
.auth-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: flex;
    align-items: center;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-label i {
    margin-right: 8px;
    color: var(--primary-color);
    width: 16px;
    text-align: center;
}

.form-control {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: var(--white);
    color: var(--text-dark);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(58, 181, 152, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.form-check-input {
    margin-right: 10px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-bottom: 0;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    border-radius: 12px;
    padding: 14px 24px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--white);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: none;
    letter-spacing: 0.3px;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(58, 181, 152, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-block {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary i {
    margin-right: 8px;
}

/* Auth Links */
.auth-links {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.auth-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 8px 0;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.auth-link:hover {
    color: var(--primary-dark);
    background: rgba(58, 181, 152, 0.1);
    text-decoration: none;
}

.auth-link i {
    margin-right: 6px;
    width: 14px;
    text-align: center;
}

/* Auth Content */
.auth-content {
    margin-bottom: 30px;
}

.success-message,
.warning-message {
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.success-message {
    background: rgba(58, 181, 152, 0.1);
    border: 1px solid rgba(58, 181, 152, 0.2);
    color: var(--primary-dark);
}

.warning-message {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.2);
    color: #856404;
}

.success-message i,
.warning-message i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.success-message p,
.warning-message p {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.success-message p:last-child,
.warning-message p:last-child {
    margin-bottom: 0;
}

/* Validation */
.text-danger {
    color: #dc3545 !important;
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
}

.validation-summary-errors {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
    color: #dc3545;
    font-size: 0.9rem;
}

.validation-summary-errors ul {
    margin-bottom: 0;
    padding-left: 20px;
}

/* Responsive Design */
@media (max-width: 576px) {
    .auth-container {
        padding: 15px;
    }
    
    .auth-card {
        padding: 30px 25px;
        border-radius: 16px;
    }
    
    .logo-text {
        font-size: 2rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .form-control {
        padding: 10px 14px;
    }
    
    .btn-primary {
        padding: 12px 20px;
    }
}

@media (max-width: 400px) {
    .auth-card {
        padding: 25px 20px;
    }
    
    .logo-text {
        font-size: 1.8rem;
    }
}

/* Loading Animation */
.btn-primary.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Focus States for Accessibility */
.auth-link:focus,
.btn-primary:focus,
.form-control:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .auth-card {
        border: 2px solid var(--black);
    }
    
    .form-control {
        border: 2px solid var(--black);
    }
    
    .btn-primary {
        border: 2px solid var(--black);
    }
}
