/**
 * Authentication (Login & Register) Stylesheet
 * Fully Responsive, Mobile First Design
 */

.auth-layout {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 150px);
    padding: 40px 15px;
    background-color: var(--bg-color, #f8f9fa);
}

.auth-container {
    background: var(--card-bg, #ffffff);
    width: 100%;
    max-width: 450px;
    padding: 35px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

/* Alert Messages */
.alert {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    text-align: center;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-success {
    background-color: #dcfce3;
    color: #166534;
    border: 1px solid #86efac;
}

/* Tabs */
.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #777;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
}

.auth-tab.active {
    color: var(--primary-color, #0056b3);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color, #0056b3);
}

/* Forms */
.auth-form {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.auth-form.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    transition: border 0.3s;
    background-color: #fafafa;
}

.form-group input:focus {
    border-color: var(--primary-color, #0056b3);
    outline: none;
    background-color: #fff;
}

/* Password Wrapper for Toggle Eye */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    padding-right: 40px; /* Space for the icon */
}

.toggle-password {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: #666;
}

.password-hint {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: #888;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555;
    cursor: pointer;
}

.forgot-password {
    color: var(--primary-color, #0056b3);
    text-decoration: none;
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Submit Button */
.btn-auth {
    width: 100%;
    background-color: var(--primary-color, #0056b3);
    color: #ffffff;
    border: none;
    padding: 14px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.btn-auth:hover {
    background-color: #004494;
    transform: translateY(-2px);
}

/* Responsive Queries */
@media screen and (max-width: 480px) {
    .auth-container {
        padding: 25px 20px;
        border-radius: 8px;
        border: none;
        box-shadow: none; /* Cleaner look on mobile */
    }

    .form-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}