/* ============================================
   LOOMS by Nowshin — Auth Pages (Login/Register)
   ============================================ */

/* ============================================
   Auth Section
   ============================================ */
.auth-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #FAF8F5 0%, #E8E3DC 100%);
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
}

/* ============================================
   Auth Card
   ============================================ */
.auth-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(44, 44, 44, 0.1);
    border: 1px solid #E8E3DC;
}

/* Logo */
.auth-logo {
    text-align: center;
    padding: 2rem 2rem 1.5rem;
    border-bottom: 1px solid #E8E3DC;
}

.auth-logo img {
    height: 40px;
    width: auto;
}

/* ============================================
   Tab Navigation
   ============================================ */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid #E8E3DC;
}

.auth-tab {
    flex: 1;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    font-family: "Cormorant Garamond", serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #6B7B8C;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.auth-tab:hover {
    color: #2C2C2C;
    background: #FAF8F5;
}

.auth-tab.active {
    color: #8B9D86;
    background: #ffffff;
}

.auth-tab::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: #8B9D86;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.auth-tab.active::after {
    transform: scaleX(1);
}

/* ============================================
   Tab Content
   ============================================ */
.auth-content {
    position: relative;
    min-height: 400px;
}

.auth-panel {
    padding: 2rem;
    display: none;
    animation: fadeIn 0.3s ease;
}

.auth-panel.active {
    display: block;
}

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

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

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

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #2C2C2C;
}

.form-row {
    display: flex;
    gap: 1rem;
}

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

/* Password Input Wrapper */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper .form-control {
    padding-right: 48px;
}

.password-wrapper .password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9BA8AB;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
    z-index: 2;
    line-height: 1;
}

.password-wrapper .password-toggle:hover {
    color: #8B9D86;
}

.password-wrapper .password-toggle i {
    font-size: 1rem;
}

/* Form Control */
.auth-form .form-control {
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1.5px solid #E8E3DC;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: #ffffff;
}

.auth-form .form-control:focus {
    border-color: #8B9D86;
    box-shadow: 0 0 0 4px rgba(139, 157, 134, 0.1);
    outline: none;
}

.auth-form .form-control::placeholder {
    color: #9BA8AB;
}

/* Input Hint */
.input-hint {
    font-size: 0.75rem;
    color: #9BA8AB;
    margin-top: 0.25rem;
}

/* ============================================
   Custom Checkbox
   ============================================ */
.custom-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #4A5568;
    position: relative;
    padding-left: 28px;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-checkbox .checkmark {
    position: absolute;
    left: 0;
    top: 2px;
    height: 18px;
    width: 18px;
    background: #ffffff;
    border: 1.5px solid #E8E3DC;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.custom-checkbox:hover .checkmark {
    border-color: #8B9D86;
}

.custom-checkbox input:checked ~ .checkmark {
    background: #8B9D86;
    border-color: #8B9D86;
}

.custom-checkbox .checkmark::after {
    content: '';
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark::after {
    display: block;
}

.custom-checkbox a {
    color: #8B9D86;
    text-decoration: none;
    font-weight: 500;
}

.custom-checkbox a:hover {
    text-decoration: underline;
}

/* ============================================
   Form Options (Remember/Forgot)
   ============================================ */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forgot-link {
    font-size: 0.9rem;
    color: #8B9D86;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: #6B7D66;
    text-decoration: underline;
}

/* ============================================
   Submit Button
   ============================================ */
.auth-form .btn-looms {
    margin-top: 0.5rem;
    padding: 0.95rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    position: relative;
}

.auth-form .btn-looms .btn-loader {
    display: none;
}

.auth-form .btn-looms.loading .btn-text {
    visibility: hidden;
}

.auth-form .btn-looms.loading .btn-loader {
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* ============================================
   Error Message
   ============================================ */
.auth-error {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 10px;
    color: #DC2626;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    animation: shakeError 0.4s ease;
}

.auth-error i {
    font-size: 1rem;
    flex-shrink: 0;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* ============================================
   Benefits Section
   ============================================ */
.auth-benefits {
    padding: 4rem 0;
    background: #ffffff;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: #FAF8F5;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.benefit-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.benefit-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #8B9D86, #6B7D66);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.benefit-content h4 {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2C2C2C;
    margin-bottom: 0.35rem;
}

.benefit-content p {
    font-size: 0.85rem;
    color: #6B7B8C;
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   Forgot Password Page
   ============================================ */
.forgot-header {
    text-align: center;
    margin-bottom: 2rem;
}

.forgot-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #8B9D86 0%, #6B7D66 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    color: #ffffff;
    font-size: 1.75rem;
}

.forgot-title {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2C2C2C;
    margin-bottom: 0.5rem;
}

.forgot-text {
    font-size: 0.95rem;
    color: #6B7B8C;
    line-height: 1.6;
    margin: 0;
}

.back-to-login {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #E8E3DC;
}

.back-to-login a {
    color: #6B7B8C;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-to-login a:hover {
    color: #8B9D86;
}

/* Success Panel */
.success-content {
    text-align: center;
    padding: 1rem 0;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: #ffffff;
    font-size: 2rem;
}

.success-title {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2C2C2C;
    margin-bottom: 0.75rem;
}

.success-text {
    font-size: 0.95rem;
    color: #6B7B8C;
    margin-bottom: 0.25rem;
}

.success-email {
    font-size: 1rem;
    font-weight: 600;
    color: #2C2C2C;
    margin-bottom: 1rem;
}

.success-note {
    font-size: 0.85rem;
    color: #9BA8AB;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.success-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.success-actions .btn {
    padding: 0.85rem 1.5rem;
}

.success-actions .btn-looms-outline {
    background: transparent;
    border: 2px solid #E8E3DC;
    color: #6B7B8C;
}

.success-actions .btn-looms-outline:hover {
    border-color: #8B9D86;
    color: #8B9D86;
    background: rgba(139, 157, 134, 0.05);
}

/* Help Section */
.auth-help {
    padding: 3rem 0;
    background: #ffffff;
}

.help-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: #FAF8F5;
    border-radius: 16px;
    max-width: 500px;
    margin: 0 auto;
}

.help-icon {
    width: 50px;
    height: 50px;
    background: #E8E3DC;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8B9D86;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.help-content h4 {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2C2C2C;
    margin-bottom: 0.35rem;
}

.help-content p {
    font-size: 0.85rem;
    color: #6B7B8C;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.help-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: #8B9D86;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s ease;
}

.help-link:hover {
    color: #6B7D66;
    gap: 0.5rem;
}

/* ============================================
   Reset Password Page
   ============================================ */
.reset-header {
    text-align: center;
    margin-bottom: 2rem;
}

.reset-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #8B9D86 0%, #6B7D66 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    color: #ffffff;
    font-size: 1.75rem;
}

.reset-title {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2C2C2C;
    margin-bottom: 0.5rem;
}

.reset-text {
    font-size: 0.95rem;
    color: #6B7B8C;
    line-height: 1.6;
    margin: 0;
}

/* Password Requirements */
.password-requirements {
    margin-top: 0.75rem;
    padding: 1rem;
    background: #FAF8F5;
    border-radius: 10px;
}

.password-requirements .req-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #2C2C2C;
    margin-bottom: 0.5rem;
}

.password-requirements .req-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
}

.password-requirements .req-list li {
    font-size: 0.8rem;
    color: #9BA8AB;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
}

.password-requirements .req-list li i {
    font-size: 0.5rem;
    transition: all 0.2s ease;
}

.password-requirements .req-list li.valid {
    color: #10B981;
}

.password-requirements .req-list li.valid i {
    font-size: 0.75rem;
}

.password-requirements .req-list li.valid i::before {
    content: "\f00c";
}

/* Password Match Indicator */
.password-match {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #10B981;
    display: none;
    align-items: center;
    gap: 0.4rem;
}

.password-match.show {
    display: flex;
}

.password-match.no-match {
    color: #EF4444;
}

.password-match.no-match i::before {
    content: "\f057";
}

/* Expired Token Panel */
.expired-content {
    text-align: center;
    padding: 1rem 0;
}

.expired-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: #ffffff;
    font-size: 2rem;
}

.expired-title {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2C2C2C;
    margin-bottom: 0.75rem;
}

.expired-text {
    font-size: 0.95rem;
    color: #6B7B8C;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Security Tips Section */
.auth-tips {
    padding: 3rem 0;
    background: #ffffff;
}

.tips-card {
    max-width: 600px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    background: #FAF8F5;
    border-radius: 16px;
}

.tips-card h4 {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2C2C2C;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tips-card h4 i {
    color: #8B9D86;
}

.tips-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: #6B7B8C;
}

.tip-item i {
    width: 24px;
    color: #8B9D86;
    text-align: center;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 991.98px) {
    .auth-section {
        padding: 3rem 0;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 767.98px) {
    .auth-section {
        padding: 2rem 0;
        min-height: auto;
    }

    .auth-card {
        border-radius: 16px;
    }

    .auth-logo {
        padding: 1.5rem 1.5rem 1rem;
    }

    .auth-tab {
        font-size: 1rem;
        padding: 0.85rem 1rem;
    }

    .auth-panel {
        padding: 1.5rem;
    }

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

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .auth-benefits {
        padding: 3rem 0;
    }

    .benefit-item {
        padding: 1.25rem;
    }
}

@media (max-width: 575.98px) {
    .auth-section {
        padding: 1rem 0;
        background: #FAF8F5;
    }

    .auth-card {
        border-radius: 0;
        box-shadow: none;
        border: none;
    }

    .auth-logo img {
        height: 35px;
    }
}