/* Authentication Pages Styles - Unified Design */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Background decorative elements */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

/* Main Container */
.auth-container {
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease-out;
}

/* Logo Section */
.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
}

.auth-logo h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.3);
}

.auth-tagline {
    font-size: 0.95rem;
    opacity: 0.95;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Card */
.auth-card {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.2),
        0 0 1px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

/* Headers */
.auth-card h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.5rem;
    text-align: center;
}

.auth-card .subtitle {
    text-align: center;
    color: #6b7280;
    margin: 0 0 2rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Messages */
.message-box {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    animation: slideIn 0.3s ease-out;
}

.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border-left: 4px solid #dc2626;
}

.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-left: 4px solid #10b981;
}

/* Form */
form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #374151;
    font-weight: 600;
    font-size: 0.9rem;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #f9fafb;
    color: #1f2937;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="text"]::placeholder {
    color: #9ca3af;
}

.help-text {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.4rem;
    line-height: 1.4;
}

/* Button */
button[type="submit"] {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    margin-top: 0.5rem;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

button[type="submit"]:active {
    transform: translateY(0);
}

button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Links */
.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.auth-links p {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.auth-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-links a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.link-secondary {
    display: inline-block;
    margin-top: 1rem;
    color: #6b7280;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.link-secondary:hover {
    color: #667eea;
}

/* Footer */
.auth-footer {
    text-align: center;
    color: white;
    font-size: 0.85rem;
    margin-top: 2rem;
    opacity: 0.9;
}

.auth-footer p {
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Special: Expired message */
.expired-message {
    text-align: center;
    padding: 2rem 0;
}

.expired-message h2 {
    color: #dc2626;
    margin-bottom: 1rem;
}

.expired-message .error {
    text-align: left;
}

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

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

/* Responsive Design */
@media (max-width: 640px) {
    body {
        padding: 15px;
    }
    
    .auth-container {
        max-width: 100%;
    }
    
    .auth-logo h1 {
        font-size: 1.75rem;
    }
    
    .auth-tagline {
        font-size: 0.875rem;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
    }
    
    .auth-card h2 {
        font-size: 1.5rem;
    }
    
    .auth-card .subtitle {
        font-size: 0.875rem;
    }
    
    input[type="email"],
    input[type="password"],
    input[type="text"] {
        padding: 0.75rem 0.875rem;
        font-size: 0.9rem;
    }
    
    button[type="submit"] {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 400px) {
    .auth-card {
        padding: 1.5rem 1.25rem;
    }
    
    .auth-logo {
        margin-bottom: 1.5rem;
    }
}

/* Accessibility */
input[type="email"]:focus-visible,
input[type="password"]:focus-visible,
input[type="text"]:focus-visible,
button:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Loading state */
.loading {
    position: relative;
    pointer-events: none;
}

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

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