/* ============================================
   Auth Modal Styles
   ============================================ */

/* Header User Styles */
.header-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-user__name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* Header Buttons for Logged-in Users */
.header__userbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn--add-forecast svg {
    flex-shrink: 0;
}

.btn--logout {
    transition: all 0.3s ease;
}

.btn--logout:hover {
    opacity: 0.8;
}

/* Activation Message */
.auth-activation-message {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 10001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
}

.auth-activation-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.auth-activation-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ============================================
   Modal Styles
   ============================================ */

/* Modal Overlay */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    font-family: Roboto, sans-serif, sans-serif;
}
.auth-tabs button{
    font-family: Roboto, sans-serif, sans-serif;
}
.auth-modal.active {
    opacity: 1;
    visibility: visible;
}

.auth-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

/* Modal Container */
.auth-modal__container {
    position: relative;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    margin: 5vh auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.auth-modal.active .auth-modal__container {
    transform: translateY(0);
}

/* Close Button */
.auth-modal__close {
    position: absolute;
    top: 5px;
    right: 15px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: color 0.3s ease, transform 0.3s ease;
    z-index: 10;
}

.auth-modal__close:hover {
    color: #000;
    transform: rotate(90deg);
}

/* Modal Content */
.auth-modal__content {
    padding: 40px 30px 30px;
}

/* Tabs */
.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 30px;
    border-radius: 8px;
    background: #f5f5f5;
    padding: 4px;
}

.auth-tabs__btn {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    border-radius: 6px;
    position: relative;
}

.auth-tabs__btn:hover {
    color: #333;
}

.auth-tabs__btn.active {
    background: #fff;
    color: #102938;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Messages */
.auth-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.auth-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.auth-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Form Container */
.auth-form-container {
    display: none;
}

.auth-form-container.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-form__group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-form__label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.auth-form__label .required {
    color: #4c71fa;
}

.auth-form__input {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    outline: none;
}

.auth-form__input:focus {
    border-color: #4c71fa;
    box-shadow: 0 0 0 3px rgba(76, 113, 250, 0.1);
}

.auth-form__input.error {
    border-color: #dc3545;
}

.auth-form__hint {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 4px;
    line-height: 1.3;
}

.auth-form__error {
    font-size: 13px;
    color: #dc3545;
    display: none;
    animation: slideDown 0.3s ease;
}

.auth-form__error.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Checkbox */
.auth-form__checkbox {
    margin: 5px 0;
}

.auth-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.auth-checkbox input[type="checkbox"] {
    margin-top: 3px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.auth-checkbox__text {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.auth-checkbox__text a {
    color: #4c71fa;
    text-decoration: underline;
}

.auth-checkbox__text a:hover {
    text-decoration: none;
}

/* Submit Button */
.auth-form__submit {
    padding: 14px 30px;
    background: #4c71fa;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.auth-form__submit:hover {
    background: #3a5ad8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 113, 250, 0.3);
}

.auth-form__submit:active {
    transform: translateY(0);
}

.auth-form__submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* reCAPTCHA */
.g-recaptcha {
    display: flex;
    justify-content: center;
}

/* Loading State */
.auth-form.loading {
    opacity: 0.6;
    pointer-events: none;
}

.auth-form.loading .auth-form__submit::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 10px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

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

/* ============================================
   Responsive Styles
   ============================================ */

@media (max-width: 768px) {
    .auth-modal__container {
        width: 95%;
        max-height: 95vh;
        margin: 2.5vh auto;
    }

    .auth-modal__content {
        padding: 35px 20px 25px;
    }

    .auth-tabs__btn {
        font-size: 15px;
        padding: 10px 15px;
    }

    .auth-form__input {
        padding: 10px 14px;
        font-size: 14px;
    }

    .auth-form__submit {
        padding: 12px 25px;
        font-size: 15px;
    }

    .header-user {
        gap: 10px;
    }

    .header-user__name {
        font-size: 13px;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .auth-activation-message {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        font-size: 13px;
        padding: 12px 15px;
    }
}

@media (max-width: 480px) {
    .auth-modal__content {
        padding: 30px 15px 20px;
    }

    .auth-tabs__btn {
        font-size: 14px;
        padding: 9px 12px;
    }

    .auth-form {
        gap: 15px;
    }
}

/* Smooth Scrollbar */
.auth-modal__container::-webkit-scrollbar {
    width: 8px;
}

.auth-modal__container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 12px 12px 0;
}

.auth-modal__container::-webkit-scrollbar-thumb {
    background: #4c71fa;
    border-radius: 4px;
}

.auth-modal__container::-webkit-scrollbar-thumb:hover {
    background: #3a5ad8;
}

