/* ============================================
   AUTENTICACIÓN - LOGIN / REGISTRO
   Página completa - Medi/Flores
   ============================================ */

/* --- Sección de auth --- */
.auth-section {
    min-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    background: #f5f5f5;
}

.auth-container {
    width: 100%;
    max-width: 480px;
    background: #ffffff;
    border-radius: 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* --- Tabs login/registro --- */
.auth-tabs {
    display: flex;
    background: #1a1a1a;
}

.auth-tab {
    flex: 1;
    padding: 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
    background: none;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    font-family: "poppins", sans-serif;
    position: relative;
}

.auth-tab:hover {
    color: rgba(255, 255, 255, 0.7);
}

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

.auth-tab.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 20%;
    width: 60%;
    height: 3px;
    background: #00ff00;
    border-radius: 0;
}

/* --- Formularios --- */
.auth-form {
    padding: 36px 40px 40px;
    display: none;
}

.auth-form.active {
    display: block;
    animation: authFadeIn 0.4s ease;
}

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

.auth-form h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 6px;
    font-family: "poppins", sans-serif;
}

.auth-form p.auth-subtitle {
    font-size: 14px;
    color: #999;
    margin-bottom: 30px;
}

/* --- Campos --- */
.auth-field {
    margin-bottom: 22px;
}

.auth-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.auth-field input {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid #e0e0e0;
    border-radius: 0;
    font-size: 14px;
    font-family: "poppins", sans-serif;
    color: #1a1a1a;
    background: #fafafa;
    transition: all 0.25s ease;
    outline: none;
    box-sizing: border-box;
}

.auth-field input:focus {
    border-color: #00ff00;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 255, 0, 0.08);
}

.auth-field input::placeholder {
    color: #bbb;
}

/* --- Row de 2 campos --- */
.auth-row {
    display: flex;
    gap: 16px;
}

.auth-row .auth-field {
    flex: 1;
}

/* --- Botón submit --- */
.auth-submit {
    display: block;
    width: 100%;
    padding: 16px;
    background: transparent;
    color: #00ff00;
    border: 1.5px solid #00ff00;
    border-radius: 0;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "poppins", sans-serif;
    margin-top: 10px;
}

.auth-submit:hover {
    background: #00ff00;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.3);
}

.auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* --- Mensajes --- */
.auth-error {
    background: #fff5f5;
    border-left: 3px solid #cc3333;
    color: #cc3333;
    padding: 12px 16px;
    border-radius: 0;
    font-size: 13px;
    margin-bottom: 20px;
    display: none;
    animation: authFadeIn 0.3s ease;
}

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

.auth-success {
    background: #f0fff0;
    border-left: 3px solid #00ff00;
    color: #2d8a00;
    padding: 12px 16px;
    border-radius: 0;
    font-size: 13px;
    margin-bottom: 20px;
    display: none;
    animation: authFadeIn 0.3s ease;
}

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

/* --- Dropdown de usuario --- */
.nav-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #ffffff;
    border-radius: 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    min-width: 240px;
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s ease;
    overflow: hidden;
}

.nav-user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-user-dropdown-header {
    padding: 18px 22px;
    background: #1a1a1a;
    color: #ffffff;
}

.nav-user-dropdown-header p {
    margin: 0;
}

.nav-user-dropdown-header .user-name {
    font-size: 15px;
    font-weight: 600;
    font-family: "poppins", sans-serif;
}

.nav-user-dropdown-header .user-email {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 2px;
}

.nav-user-dropdown-body {
    padding: 8px 0;
}

.nav-user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: "poppins", sans-serif;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.nav-user-dropdown-item:hover {
    background: #f5fff0;
    color: #2d8a00;
    text-decoration: none;
}

.nav-user-dropdown-item svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}

.nav-user-dropdown-item.logout {
    border-top: 1px solid #f0f0f0;
    color: #cc3333;
}

.nav-user-dropdown-item.logout:hover {
    background: #fff5f5;
    color: #aa0000;
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .nav-user-dropdown {
        border-radius: 0;
        box-shadow: none;
    }

    .nav-user-dropdown-header {
        padding: 14px 20px;
    }

    .nav-user-dropdown-item {
        padding: 12px 20px;
    }
}

@media (max-width: 575px) {
    .auth-container {
        border-radius: 0;
    }

    .auth-form {
        padding: 24px 20px 28px;
    }

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

    .auth-tabs .auth-tab {
        font-size: 12px;
        padding: 16px 10px;
    }

    .auth-form h3 {
        font-size: 20px;
    }
}
