/* ============================================
   AUTH MODAL STYLES
   ============================================ */

.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.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);
}

.auth-modal__container {
    position: relative;
    background: #fff;
    width: 90%;
    max-width: 450px;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    z-index: 10;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

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

.auth-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.auth-modal__title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.auth-modal__subtitle {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin-bottom: 30px;
}

.auth-modal__form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.auth-modal__group label {
    font-size: 13px;
    font-weight: 600;
    color: #444;
}

.auth-modal__group input {
    padding: 12px 15px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.auth-modal__group input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.auth-modal__submit {
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 10px;
}

.auth-modal__submit:hover {
    background: var(--color-primary-dark);
}

.auth-modal__switch {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: #666;
}

.auth-modal__switch a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-modal__switch a:hover {
    text-decoration: underline;
}

/* Mensajes de feedback */
.auth-modal__message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.auth-modal__message--success {
    background: #d4edda;
    color: #155724;
}

.auth-modal__message--error {
    background: #f8d7da;
    color: #721c24;
}

/* Menú de Cuenta (Dropdown) */
.user-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 220px;
    background: var(--color-white);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    padding: 10px;
    display: none;
    flex-direction: column;
    z-index: 1000;
    border: 1px solid var(--color-border);
    animation: menuFadeIn 0.2s ease-out;
}

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

.user-menu--active {
    display: flex;
}

.user-menu__header {
    padding: 10px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 5px;
}

.user-menu__name {
    display: block;
    font-weight: 700;
    color: var(--color-primary);
    font-size: 14px;
}

.user-menu__phone {
    font-size: 12px;
    color: #666;
}

.user-menu__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    font-size: 14px;
    color: var(--color-text);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.user-menu__item:hover {
    background: var(--color-neutral);
    color: var(--color-primary);
}

.user-menu__item svg {
    width: 18px;
    height: 18px;
    opacity: 0.7;
}

.user-menu__item--logout {
    color: #e74c3c;
    margin-top: 5px;
    border-top: 1px solid var(--color-border);
    border-radius: 0 0 8px 8px;
}

.user-menu__item--logout:hover {
    background: #fff5f5;
    color: #c0392b;
}

/* Ajuste de posición para el header */
.header__actions {
    position: relative;
}

.header__middle-row__container {
    position: relative;
}


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

/* Estado Logueado */
.header__btn--logged-in {
    border: 2px solid var(--color-primary) !important;
    color: var(--color-primary) !important;
}
