/* assets/css/auth.css - Shared Login & Register Styles */

body.auth-page {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    background-image: 
        radial-gradient(ellipse at top, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    background-attachment: fixed;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-primary);
}

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 440px;
    padding: 20px;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auth Card */
.auth-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    padding: 45px 40px;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

/* Logo Section */
.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo img {
    height: 50px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.auth-logo img:hover {
    transform: scale(1.05);
}

.auth-logo h1 {
    font-size: 1.6em;
    font-weight: 700;
    margin: 20px 0 8px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-logo p {
    color: var(--text-secondary);
    font-size: 0.95em;
    margin: 0;
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9em;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label i {
    font-size: 0.85em;
    opacity: 0.7;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1em;
    transition: color 0.3s ease;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 18px 14px 46px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 1em;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.input-wrapper input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px var(--glow-primary);
}

.input-wrapper input:focus + i.input-icon,
.input-wrapper input:focus ~ i.input-icon {
    color: var(--accent-primary);
}

.input-wrapper:focus-within i.input-icon {
    color: var(--accent-primary);
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    font-size: 1em;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--text-primary);
}

/* Input Validation States */
.input-wrapper.valid input {
    border-color: #22c55e;
}

.input-wrapper.invalid input {
    border-color: #ef4444;
}

.input-wrapper.valid i.input-icon {
    color: #22c55e;
}

.input-wrapper.invalid i.input-icon {
    color: #ef4444;
}

/* Validation Message */
.validation-message {
    font-size: 0.8em;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.2s ease;
}

.validation-message.show {
    opacity: 1;
    transform: translateY(0);
}

.validation-message.error {
    color: #ef4444;
}

.validation-message.success {
    color: #22c55e;
}

/* Password Requirements */
.password-requirements {
    background: var(--bg-tertiary);
    border-radius: 10px;
    padding: 12px 15px;
    margin-top: 5px;
    border: 1px solid var(--border-color);
}

.password-requirements p {
    font-size: 0.8em;
    color: var(--text-secondary);
    margin: 0 0 8px;
    font-weight: 600;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.password-requirements li {
    font-size: 0.75em;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s ease;
}

.password-requirements li i {
    font-size: 0.9em;
    width: 14px;
    text-align: center;
}

.password-requirements li.valid {
    color: #22c55e;
}

.password-requirements li.valid i {
    color: #22c55e;
}

/* Submit Button */
.auth-submit {
    padding: 15px 28px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    font-family: inherit;
    width: 100%;
    margin-top: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.auth-submit:active {
    transform: translateY(0);
}

.auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-submit .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
}

.auth-submit.loading .spinner {
    display: inline-block;
}

.auth-submit.loading .btn-text {
    opacity: 0.7;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Alert Messages */
.auth-alert {
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fadeInUp 0.3s ease-out;
}

.auth-alert i {
    font-size: 1.2em;
}

.auth-alert.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.auth-alert.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.auth-alert.warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

/* Footer Links */
.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin: 0;
}

.auth-footer a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: var(--accent-secondary);
}

/* Back to Home Link */
.back-home {
    text-align: center;
    margin-top: 20px;
}

.back-home a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.back-home a:hover {
    color: var(--text-primary);
}

.back-home a i {
    font-size: 0.9em;
}

/* Responsive */
@media screen and (max-width: 500px) {
    .auth-container {
        padding: 15px;
    }
    
    .auth-card {
        padding: 35px 25px;
        border-radius: 20px;
    }
    
    .auth-logo h1 {
        font-size: 1.4em;
    }
    
    .password-requirements ul {
        grid-template-columns: 1fr;
    }
}
