/* =========================================
   Auth Page Redesign (Login/Register)
   ========================================= */
.auth-page-wrapper {
    min-height: calc(100vh - 160px);
    /* Adjust based on header/footer */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8f9fa;
    /* Light grey premium background */
    padding: 60px 20px;
}

.auth-container {
    width: 100%;
    max-width: 480px;
    perspective: 1000px;
}

.auth-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    /* Soft elegant shadow */
    overflow: hidden;
    padding: 0;
    transition: transform 0.3s ease;
}

.auth-header {
    text-align: center;
    padding: 40px 30px 20px;
    background: #fff;
}

.auth-title {
    font-family: var(--font-header, 'Playfair Display', serif);
    font-size: 28px;
    color: var(--text-main);
    margin-bottom: 10px;
}

.auth-subtitle {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
}

/* Tabs */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    margin: 0 30px;
    position: relative;
}

.tab-btn {
    flex: 1;
    text-align: center;
    padding: 15px 0;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Slider Highlight */
.tab-highlight {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 50%;
    height: 2px;
    background: var(--primary-color);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

html[dir="rtl"] .tab-highlight {
    left: auto;
    right: 0;
}

/* Content */
.auth-content {
    padding: 30px;
}

.auth-form-wrapper {
    display: none;
    animation: fadeIn 0.4s ease;
}

.auth-form-wrapper.active {
    display: block;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Elements */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-main);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 15px;
    color: #aaa;
    font-size: 16px;
    transition: color 0.3s;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    /* Space for icon */
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fdfdfd;
}

.input-wrapper input:focus {
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.02);
    /* Very subtle focus ring */
    outline: none;
}

.input-wrapper input:focus+i,
.input-wrapper input:focus~i

/* In case I put icon after, but I put before. CSS can't select previous sibling. */
    {
    color: var(--primary-color);
}

/* Fix for icon color change on focus using :focus-within on parent if plain CSS */
.input-wrapper:focus-within i {
    color: var(--primary-color);
}


/* RTL Fixes for Inputs */
html[dir="rtl"] .input-wrapper input {
    padding: 12px 45px 12px 15px;
}

html[dir="rtl"] .input-wrapper i {
    left: auto;
    right: 15px;
}

/* Form Extras */
.form-extras {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 13px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-light);
}

.forgot-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

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

/* Buttons */
.btn-full {
    width: 100%;
    display: block;
}

.btn-large {
    padding: 14px;
    font-size: 16px;
    letter-spacing: 0.5px;
}

/* Register Specific */
.form-row {
    display: flex;
    gap: 15px;
}

.form-row .half {
    flex: 1;
}

.input-hint {
    font-size: 11px;
    color: #888;
    margin-top: 5px;
}

.auth-alert {
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-alert.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Responsive */
@media (max-width: 480px) {
    .auth-page-wrapper {
        padding: 20px 15px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
}